Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11033

Contacts plugin Appium tests: modifying a contact can take more than a minute on an emulator

Details

    Description

      https://ci.apache.org/builders/cordova-android-win/builds/2053/steps/running-appium-tests/logs/stdio

      Error: [executeAsync(null,["Dooney Evans","Urist","McContact"])] Error response status: 28, , ScriptTimeout - A script did not complete before its timeout expired. Selenium error: asynchronous script timeout: result was not received in 60 seconds
      

      Attachments

        Activity

          githubbot ASF GitHub Bot added a comment -

          GitHub user alsorokin opened a pull request:

          https://github.com/apache/cordova-plugin-contacts/pull/118

          CB-11033 Appium tests: Increased the timeout for updating the contact

          https://issues.apache.org/jira/browse/CB-11033

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/MSOpenTech/cordova-plugin-contacts CB-11033

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-plugin-contacts/pull/118.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #118


          commit 0d33af8e4e197fc9204566b165cb5983ab442db8
          Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
          Date: 2016-04-07T09:17:55Z

          CB-11033 Appium tests: Increased the timeout for updating the contact


          githubbot ASF GitHub Bot added a comment - GitHub user alsorokin opened a pull request: https://github.com/apache/cordova-plugin-contacts/pull/118 CB-11033 Appium tests: Increased the timeout for updating the contact https://issues.apache.org/jira/browse/CB-11033 You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-contacts CB-11033 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-contacts/pull/118.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #118 commit 0d33af8e4e197fc9204566b165cb5983ab442db8 Author: Alexander Sorokin <alexander.sorokin@akvelon.com> Date: 2016-04-07T09:17:55Z CB-11033 Appium tests: Increased the timeout for updating the contact

          Commit 0d33af8e4e197fc9204566b165cb5983ab442db8 in cordova-plugin-contacts's branch refs/heads/master from alsorokin
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=0d33af8 ]

          CB-11033 Appium tests: Increased the timeout for updating the contact

          jira-bot ASF subversion and git services added a comment - Commit 0d33af8e4e197fc9204566b165cb5983ab442db8 in cordova-plugin-contacts's branch refs/heads/master from alsorokin [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=0d33af8 ] CB-11033 Appium tests: Increased the timeout for updating the contact
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-plugin-contacts/pull/118

          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-contacts/pull/118

          Commit 959c3983e01ae9e87c720b5206327c2ec9f64331 in cordova-plugin-contacts's branch refs/heads/master from alsorokin
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=959c398 ]

          CB-11033 Appium tests: more timeout tweaks

          jira-bot ASF subversion and git services added a comment - Commit 959c3983e01ae9e87c720b5206327c2ec9f64331 in cordova-plugin-contacts's branch refs/heads/master from alsorokin [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=959c398 ] CB-11033 Appium tests: more timeout tweaks

          Logs of the failure for reference:

          [MEDIC LOG Mon, 25 Apr 2016 06:50:54 GMT] Starting new spec: contacts.ui.spec.2 Update an existing contact
           > CALL context("WEBVIEW_org.apache.mobilespec") 
           > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
           > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
           > CALL setAsyncScriptTimeout(60000) 
           > POST /session/:sessionID/timeouts/async_script {"ms":60000}
           > RESPONSE setAsyncScriptTimeout(60000) 
           > CALL executeAsync(null,[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]) 
           > POST /session/:sessionID/execute_async {"script":"return (function (contactname, callback) {\n                navigator.contacts.create({\n                    'displayName': contactname.formatted,\n                    'name': contactname,\n                    'note': 'DeleteMe'\n                }).save(callback, callback);\n            }).apply(null, arguments);","args":[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]}
           > RESPONSE executeAsync(null,[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]) {"addresses":null,"birthday":{},"categories":null,"clone":{},"displayName":"Dooney Evans","emails":null,"id":"7362","ims":null,"name":{"familyName":"Evans","formatted":"Dooney Evans","givenName":"Dooney"},"nickname":null,"note":"DeleteMe","organizations":null,"phoneNumbers":null,"photos":null,"rawId":"7362","remove":{},"save":{},"urls":null}
           > CALL context("WEBVIEW_org.apache.mobilespec") 
           > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
           > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
           > CALL setAsyncScriptTimeout(300000) 
           > POST /session/:sessionID/timeouts/async_script {"ms":300000}
           > RESPONSE setAsyncScriptTimeout(300000) 
           > CALL executeAsync(null,["Dooney Evans","Urist","McContact"]) 
           > POST /session/:sessionID/execute_async {"script":"return (function (oldname, newgivenname, newfamilyname, callback) {\n                var obj = new ContactFindOptions();\n                obj.filter = oldname;\n                obj.multiple = false;\n\n                navigator.contacts.find(['displayName', 'name'], function(contacts) {\n                    if (contacts.length === 0) {\n                        callback({ 'code': -35142 });\n                        return;\n                    }\n                    var contact = contacts[0];\n                    contact.displayName = newgivenname + ' ' + newfamilyname;\n                    var name = new ContactName();\n                    name.givenName = newgivenname;\n                    name.familyName = newfamilyname;\n                    contact.name = name;\n                    contact.save(callback, callback);\n                }, callback, obj);\n            }).apply(null, arguments);","args":["Dooney Evans","Urist","McContact"]}
           > CALL context("WEBVIEW_org.apache.mobilespec") 
           > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
           > CALL currentContext() 
           > GET /session/:sessionID/context 
           > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
           > CALL setAsyncScriptTimeout(60000) 
           > POST /session/:sessionID/timeouts/async_script {"ms":60000}
           > RESPONSE currentContext() "WEBVIEW_org.apache.mobilespec"
           > CALL context("NATIVE_APP") 
           > POST /session/:sessionID/context {"name":"NATIVE_APP"}
           > RESPONSE setAsyncScriptTimeout(60000) 
           > CALL executeAsync(null,[]) 
           > POST /session/:sessionID/execute_async {"script":"return (function (callback) {\n                var obj = new ContactFindOptions();\n                obj.filter = 'DeleteMe';\n                obj.multiple = true;\n                navigator.contacts.find(['note'], function(contacts) {\n                    var removes = [];\n                    contacts.forEach(function(contact) {\n                        removes.push(contact);\n                    });\n                    if (removes.length === 0) {\n                        return;\n                    }\n\n                   var nextToRemove;\n                   if (removes.length > 0) {\n                        nextToRemove = removes.shift();\n                    }\n\n                    function removeNext(item) {\n                        if (typeof item === 'undefined') {\n                            callback();\n                            return;\n                        }\n\n                        if (removes.length > 0) {\n                            nextToRemove = removes.shift();\n                        } else {\n                            nextToRemove = undefined;\n                        }\n\n                        item.remove(function removeSucceeded() {\n                            removeNext(nextToRemove);\n                        }, function removeFailed() {\n                            removeNext(nextToRemove);\n                        });\n                    }\n                    removeNext(nextToRemove);\n                }, callback, obj);\n            }).apply(null, arguments);","args":[]}
           > RESPONSE context("NATIVE_APP") 
           > CALL saveScreenshot("/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png") 
           > GET /session/:sessionID/screenshot 
          [MEDIC LOG Mon, 25 Apr 2016 06:55:58 GMT] Spec failed: contacts.ui.spec.2 Update an existing contact
          [MEDIC LOG Mon, 25 Apr 2016 06:55:58 GMT] Starting new spec: contacts.ui.spec.3 Create a contact with no name
           > CALL context("WEBVIEW_org.apache.mobilespec") 
           > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
           > RESPONSE saveScreenshot("/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png") "/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png"
           > CALL context("WEBVIEW_org.apache.mobilespec") 
           > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"}
           > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
           > CALL setAsyncScriptTimeout(60000) 
           > POST /session/:sessionID/timeouts/async_script {"ms":60000}
           > RESPONSE context("WEBVIEW_org.apache.mobilespec") 
           > CALL quit() 
           > DELETE /session/:sessionID 
           > RESPONSE setAsyncScriptTimeout(60000) 
           > CALL executeAsync(null,[{}]) 
           > POST /session/:sessionID/execute_async {"script":"return (function (contactname, callback) {\n                navigator.contacts.create({\n                    'displayName': contactname.formatted,\n                    'name': contactname,\n                    'note': 'DeleteMe'\n                }).save(callback, callback);\n            }).apply(null, arguments);","args":[{}]}
           > CALL currentContext() 
           > GET /session/:sessionID/context 
          [MEDIC LOG Mon, 25 Apr 2016 06:56:03 GMT] Uncaught exception! Killing server and exiting in 2 seconds...
          [MEDIC LOG Mon, 25 Apr 2016 06:56:04 GMT] Appium process exited.
          
          Ending your web drivage..
          
          [MEDIC LOG Mon, 25 Apr 2016 06:56:04 GMT] Uncaught exception! Killing server and exiting in 2 seconds...
          [MEDIC LOG Mon, 25 Apr 2016 06:56:06 GMT] FATAL: Error: [currentContext()] Error response status: 6,  Selenium error: A session is either terminated or not started
              at exports.newError (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/utils.js:139:13)
              at /Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/callbacks.js:75:19
              at /Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/webdriver.js:174:5
              at Request._callback (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/http-utils.js:87:7)
              at Request.self.callback (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:368:22)
              at Request.emit (events.js:110:17)
              at Request.<anonymous> (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:1219:14)
              at Request.emit (events.js:129:20)
              at IncomingMessage.<anonymous> (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:1167:12)
              at IncomingMessage.emit (events.js:129:20)
          
          alsorokin Alexander Sorokin added a comment - Logs of the failure for reference: [MEDIC LOG Mon, 25 Apr 2016 06:50:54 GMT] Starting new spec: contacts.ui.spec.2 Update an existing contact > CALL context("WEBVIEW_org.apache.mobilespec") > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"} > RESPONSE context("WEBVIEW_org.apache.mobilespec") > CALL setAsyncScriptTimeout(60000) > POST /session/:sessionID/timeouts/async_script {"ms":60000} > RESPONSE setAsyncScriptTimeout(60000) > CALL executeAsync(null,[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]) > POST /session/:sessionID/execute_async {"script":"return (function (contactname, callback) {\n navigator.contacts.create({\n 'displayName': contactname.formatted,\n 'name': contactname,\n 'note': 'DeleteMe'\n }).save(callback, callback);\n }).apply(null, arguments);","args":[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]} > RESPONSE executeAsync(null,[{"formatted":"Dooney Evans","familyName":"Evans","givenName":"Dooney"}]) {"addresses":null,"birthday":{},"categories":null,"clone":{},"displayName":"Dooney Evans","emails":null,"id":"7362","ims":null,"name":{"familyName":"Evans","formatted":"Dooney Evans","givenName":"Dooney"},"nickname":null,"note":"DeleteMe","organizations":null,"phoneNumbers":null,"photos":null,"rawId":"7362","remove":{},"save":{},"urls":null} > CALL context("WEBVIEW_org.apache.mobilespec") > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"} > RESPONSE context("WEBVIEW_org.apache.mobilespec") > CALL setAsyncScriptTimeout(300000) > POST /session/:sessionID/timeouts/async_script {"ms":300000} > RESPONSE setAsyncScriptTimeout(300000) > CALL executeAsync(null,["Dooney Evans","Urist","McContact"]) > POST /session/:sessionID/execute_async {"script":"return (function (oldname, newgivenname, newfamilyname, callback) {\n var obj = new ContactFindOptions();\n obj.filter = oldname;\n obj.multiple = false;\n\n navigator.contacts.find(['displayName', 'name'], function(contacts) {\n if (contacts.length === 0) {\n callback({ 'code': -35142 });\n return;\n }\n var contact = contacts[0];\n contact.displayName = newgivenname + ' ' + newfamilyname;\n var name = new ContactName();\n name.givenName = newgivenname;\n name.familyName = newfamilyname;\n contact.name = name;\n contact.save(callback, callback);\n }, callback, obj);\n }).apply(null, arguments);","args":["Dooney Evans","Urist","McContact"]} > CALL context("WEBVIEW_org.apache.mobilespec") > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"} > CALL currentContext() > GET /session/:sessionID/context > RESPONSE context("WEBVIEW_org.apache.mobilespec") > CALL setAsyncScriptTimeout(60000) > POST /session/:sessionID/timeouts/async_script {"ms":60000} > RESPONSE currentContext() "WEBVIEW_org.apache.mobilespec" > CALL context("NATIVE_APP") > POST /session/:sessionID/context {"name":"NATIVE_APP"} > RESPONSE setAsyncScriptTimeout(60000) > CALL executeAsync(null,[]) > POST /session/:sessionID/execute_async {"script":"return (function (callback) {\n var obj = new ContactFindOptions();\n obj.filter = 'DeleteMe';\n obj.multiple = true;\n navigator.contacts.find(['note'], function(contacts) {\n var removes = [];\n contacts.forEach(function(contact) {\n removes.push(contact);\n });\n if (removes.length === 0) {\n return;\n }\n\n var nextToRemove;\n if (removes.length > 0) {\n nextToRemove = removes.shift();\n }\n\n function removeNext(item) {\n if (typeof item === 'undefined') {\n callback();\n return;\n }\n\n if (removes.length > 0) {\n nextToRemove = removes.shift();\n } else {\n nextToRemove = undefined;\n }\n\n item.remove(function removeSucceeded() {\n removeNext(nextToRemove);\n }, function removeFailed() {\n removeNext(nextToRemove);\n });\n }\n removeNext(nextToRemove);\n }, callback, obj);\n }).apply(null, arguments);","args":[]} > RESPONSE context("NATIVE_APP") > CALL saveScreenshot("/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png") > GET /session/:sessionID/screenshot [MEDIC LOG Mon, 25 Apr 2016 06:55:58 GMT] Spec failed: contacts.ui.spec.2 Update an existing contact [MEDIC LOG Mon, 25 Apr 2016 06:55:58 GMT] Starting new spec: contacts.ui.spec.3 Create a contact with no name > CALL context("WEBVIEW_org.apache.mobilespec") > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"} > RESPONSE saveScreenshot("/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png") "/Users/buildbot/slaves/apache/cordova-android-osx/appium_screenshots/2016-04-24_23.55.58.png" > CALL context("WEBVIEW_org.apache.mobilespec") > POST /session/:sessionID/context {"name":"WEBVIEW_org.apache.mobilespec"} > RESPONSE context("WEBVIEW_org.apache.mobilespec") > CALL setAsyncScriptTimeout(60000) > POST /session/:sessionID/timeouts/async_script {"ms":60000} > RESPONSE context("WEBVIEW_org.apache.mobilespec") > CALL quit() > DELETE /session/:sessionID > RESPONSE setAsyncScriptTimeout(60000) > CALL executeAsync(null,[{}]) > POST /session/:sessionID/execute_async {"script":"return (function (contactname, callback) {\n navigator.contacts.create({\n 'displayName': contactname.formatted,\n 'name': contactname,\n 'note': 'DeleteMe'\n }).save(callback, callback);\n }).apply(null, arguments);","args":[{}]} > CALL currentContext() > GET /session/:sessionID/context [MEDIC LOG Mon, 25 Apr 2016 06:56:03 GMT] Uncaught exception! Killing server and exiting in 2 seconds... [MEDIC LOG Mon, 25 Apr 2016 06:56:04 GMT] Appium process exited. Ending your web drivage.. [MEDIC LOG Mon, 25 Apr 2016 06:56:04 GMT] Uncaught exception! Killing server and exiting in 2 seconds... [MEDIC LOG Mon, 25 Apr 2016 06:56:06 GMT] FATAL: Error: [currentContext()] Error response status: 6, Selenium error: A session is either terminated or not started at exports.newError (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/utils.js:139:13) at /Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/callbacks.js:75:19 at /Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/webdriver.js:174:5 at Request._callback (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/wd/lib/http-utils.js:87:7) at Request.self.callback (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:368:22) at Request.emit (events.js:110:17) at Request.<anonymous> (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:1219:14) at Request.emit (events.js:129:20) at IncomingMessage.<anonymous> (/Users/buildbot/slaves/apache/cordova-android-osx/cordova-medic/node_modules/request/request.js:1167:12) at IncomingMessage.emit (events.js:129:20)

          People

            alsorokin Alexander Sorokin
            alsorokin Alexander Sorokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: