Titanium JIRA Archive
Alloy (ALOY)

[ALOY-497] Alloy: Journal sample runtime error switching between different platforms

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-06-03T19:44:32.000+0000
Affected Version/sAlloy 1.4.0, Alloy 1.0.0
Fix Version/sAlloy 1.0.0, 2013 Sprint 03
ComponentsSamples & Templates
Labelsqe-sdk3.0.2, regression
ReporterFederico Casali
AssigneeTim Poulsen
Created2013-02-05T03:50:31.000+0000
Updated2014-06-22T13:21:12.000+0000

Description

Problem

Runtime error when pressing the menu button in the Journal Sample app in Android

Steps

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

FileDateSize
device-2013-02-04-194049.png2013-02-05T03:50:31.000+000066520
journal_android.log2013-02-05T03:50:31.000+00001589
journal_ios.log2013-02-05T23:42:56.000+0000458
Runtime error_Android.png2014-06-03T10:26:32.000+000062229
Screen Shot 2013-02-05 at 3.00.49 PM.png2013-02-05T23:42:56.000+0000121529

Comments

  1. Tony Lukasavage 2013-02-05

    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:
       alloy compile
       
    would cause the problem, but this would work fine:
       alloy compile --config platform=android
       
    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.
  2. Federico Casali 2013-02-05

    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:
    	
       alloy compile --config platform=android
       
    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:
    	
       alloy compile --config platform=android
       
    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:
    	
       alloy compile --config platform=ios
       
    7. Build-run again for iOS result: Journal app works as expected
  3. Tony Lukasavage 2013-02-05

    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.
  4. Tony Lukasavage 2013-02-06

    All JS files are regenerated and copied in on each build to ensure that compiler directives are accounted for.
  5. Federico Casali 2013-02-07

    Verified as fixed with the latest 1_0_X version (Git commit b97ead593b6e7c2b2a3beae4cb9a8720dd3931b6) All JS files are regenerated on each build.
  6. Neha Mittal 2014-06-03

    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.
  7. Federico Casali 2014-06-03

JSON Source