[TIMOB-10069] Anvil: launching browser for mobile web on Jelly Bean can cause Anvil to freeze and browser tests to never run
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2017-05-01T22:21:07.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | MobileWeb, Tooling |
Labels | anvil, core, linvalid |
Reporter | Opie Cyrus |
Assignee | Eric Merriman |
Created | 2012-07-20T23:27:54.000+0000 |
Updated | 2017-05-22T22:14:31.000+0000 |
Description
Launching browser for mobile web on Jelly Bean can cause Anvil to freeze and browser tests to never run. One change that needs to be made is to no longer specify the activity via the "-n" argument and let the OS choose the activity to handle the intent since the name of the browser activity is different on 4.1.
Another problem is that even with the above change, there appears to be some kind of new timing issue on 4.1 that despite the intent being handled, the tests never run. Might be due to a state shift when resuming the browser from a previous run test but appears to be a timing issue in some form since the behavior is not consistent.
Running the ti.cloud Anvil tests for MobileWeb on an Android 2.3.4 device, I discovered that the default browser does not properly support CORS requests. Thus, all of the tests are failing. I installed the Firefox browser, set it as the default browser, and re-ran the tests. Anvil was still invoking the built-in browser. I modified the mobileweb.js file to directly invoke the firefox browser and re-ran the tests. Anvil then invoked the Firefox browser to run the tests -- ALL of the tests PASSED using the Firefox browser on device. It also ran much faster. Modifying Anvil to invoke the default browser would be one step toward enabling us to test different browsers on device. A further option would be to allow an option to select the browser for a configuration (either via a command line argument or tiapp.xml setting in the configuration folder). I removed the -n option in mobileweb.js to allow Anvil to invoke the default browser
The -n option has been changed in the recent driver implementation. The firefox configuration should be done on device IMO via setting firefox as the default browser.
Closing ticket as "Won't Fix" as Anvil is no longer supported.