[ALOY-497] Alloy: Journal sample runtime error switching between different platforms
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-03T19:44:32.000+0000 |
Affected Version/s | Alloy 1.4.0, Alloy 1.0.0 |
Fix Version/s | Alloy 1.0.0, 2013 Sprint 03 |
Components | Samples & Templates |
Labels | qe-sdk3.0.2, regression |
Reporter | Federico Casali |
Assignee | Tim Poulsen |
Created | 2013-02-05T03:50:31.000+0000 |
Updated | 2014-06-22T13:21:12.000+0000 |
Description
Problem
Runtime error when pressing the menu button in the Journal Sample app in AndroidSteps
1. Install and run the app 2. Click on the menu button Result: Runtime Error - attached screenshot and log No issues on iOS devices.Attachments
File | Date | Size |
---|---|---|
device-2013-02-04-194049.png | 2013-02-05T03:50:31.000+0000 | 66520 |
journal_android.log | 2013-02-05T03:50:31.000+0000 | 1589 |
journal_ios.log | 2013-02-05T23:42:56.000+0000 | 458 |
Runtime error_Android.png | 2014-06-03T10:26:32.000+0000 | 62229 |
Screen Shot 2013-02-05 at 3.00.49 PM.png | 2013-02-05T23:42:56.000+0000 | 121529 |
You would get that error if you attempted to run this app on android but did not specify android in the compile command. For example:
would cause the problem, but this would work fine:
I have confirmed that this app works fine on Android when given the appropriate compile options. If there is more information about your specific workflow ("install and run" was kind of vague), we can address it. In the meantime the ticket will be closed.
From Studio: 1. create a new Alloy Project from Studio and copy the 'models/journal' Sample code in there 2. Build-run for iOS result: Journal app works as expected 3. Build-run for Android result: Bug reproduced - Journal app runs and clicking on the menu the runtime error is thrown 4. cd to the project folder from terminal and run:
5. Build-run again for Android result: Bug still reproducible - Journal app runs and clicking on the menu the runtime error is thrown 6. cd to the project folder and manually delete the Resources folder, then from terminal run:
7. Build-run again for Android result: Journal app works as expected 8. Build-run for iOS result: App does not start (Application Error - see screenshot and Error log attached) 9. cd to the project folder and manually delete the Resources folder, then from terminal run:
7. Build-run again for iOS result: Journal app works as expected
I need to make sure the files are regenerated and copied in again when platforms change. Since they can include compiler directives affected by deploy type and platform I should probably be regenerating any JS file.
All JS files are regenerated and copied in on each build to ensure that compiler directives are accounted for.
Verified as fixed with the latest 1_0_X version (Git commit b97ead593b6e7c2b2a3beae4cb9a8720dd3931b6) All JS files are regenerated on each build.
This is a regression since it is working fine with alloy 1.3.1 GA. I am able to reproduce the issue, getting run time error on Android platform using below environment: Appc Studio: 3.3.0.201405271647 SDK build: 3.3.0.v20140602174112 acs: 1.0.14 npm: 1.3.2 alloy: 1.4.0-beta CLI: titanium-3.3.0-beta2 titanium-code-processor:1.1.1 Xcode: 5.1.1 Osx: Mavericks(10.9.2) Device: Galaxy Nexus (4.1.1) Works fine on iOS device. Please refer the attached screenshot for your reference. Hence reopening the issue.