Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1331] Windows: App crashes with 'Cannot find variable: OS_BLACKBERRY

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-11-23T02:54:05.000+0000
Affected Version/salloy 1.7.25
Fix Version/sRelease 5.2.0, alloy 1.7.26
ComponentsRuntime
Labelsqe-5.1.0
ReporterEwan Harris
AssigneeFeon Sua Xin Miao
Created2015-11-16T23:34:31.000+0000
Updated2016-01-13T22:22:24.000+0000

Description

Description

When building an Alloy app for Windows Platform the app crashes with the below error The error originates from [this line in alloy.js](https://github.com/appcelerator/alloy/blob/1fb9878e769c6afee6f46516c08b4708830e26a6/Alloy/lib/alloy.js#L486) and removing the OS_BLACKBERRY check allows the app to launch.
[ERROR] :  Application Error: {
[ERROR] :    "line": 2,
[ERROR] :    "column": 10,
[ERROR] :    "message": "Error while require(/app) Error while require(alloy) Can't find variable: OS_BLACKBERRY",
[ERROR] :    "native_stack": [
[ERROR] :      "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
[ERROR] :    ]
[ERROR] :  }

Steps to reproduce

1. Create an Alloy app using appc new 2. Build the app to Windows Platform using appc run -p windows

Actual Result

App crashes with the below
[ERROR] :  Application Error: {
[ERROR] :    "line": 2,
[ERROR] :    "column": 10,
[ERROR] :    "message": "Error while require(/app) Error while require(alloy) Can't find variable: OS_BLACKBERRY",
[ERROR] :    "native_stack": [
[ERROR] :      "JSExportClass<class Titanium::GlobalObject>::CallNamedFunction"
[ERROR] :    ]
[ERROR] :  }

Expected result

App should not crash

Comments

  1. Feon Sua Xin Miao 2015-11-17

    PR: https://github.com/appcelerator/alloy/pull/740
  2. Chee Kiat Ng 2015-11-17

    PR merged.
  3. Ewan Harris 2015-11-17

    Verified using: OS: Microsoft Windows 10 Pro 10.0.10240 Appc core: 5.1.0-60 (Alloy 1.7.26) Appc NPM: 4.2.1 Ti SDK: 5.1.0.v20151116164430 Appc Studio: 4.4.0.201511130407 Node: v4.2.1 NPM: 2.14.7 Alloy apps no longer crash on launch Closing ticket

JSON Source