Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1605] Android: Unable to build alloy apps using master

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2018-03-05T11:24:17.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK
Labelsqe-7.1.0
ReporterJosh Longton
AssigneeChristopher Williams
Created2018-02-13T16:55:14.000+0000
Updated2018-03-05T11:24:17.000+0000

Description

On master, I am unable to build to Alloy applications

Steps to reproduce

Pull the latest build from master

Create a new alloy application

Build the default alloy application

Error on device

{noformat} [ERROR] TiExceptionHandler: (main) [33,33] ----- Titanium Javascript Runtime Error ----- [ERROR] TiExceptionHandler: (main) [1,34] - In /alloy/underscore.js:924,80 [ERROR] TiExceptionHandler: (main) [0,34] - Message: Uncaught TypeError: Cannot read property '_' of undefined [ERROR] TiExceptionHandler: (main) [0,34] - Source: }var _Mathfloor=Math.floor,_Mathmax=Math.max,root=this,previousUnderscore=root._,ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,nativeCreate=Object.create,Ctor=function(){},_=function(obj){return obj instanceof _?obj:this instanceof _?void(this._wrapped=obj):new _(obj)};'undefined'==typeof exports?root._=_:('undefined'!=typeof module&&module.exports&&(exports=module.exports=_),exports._=_),_.VERSION='1.8.3';var optimizeCb=function(func,context,argCount){if(void 0===context)return func;switch(null==argCount?3:argCount){case 1:return function(value){return func.call(context,value)};case 2:return function(value,other){return func.call(context,value,other)};case 3:return function(value,index,collection){return func.call(context,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(context,accumulator,value,index,collection)};}return function(){return func.apply(context,arguments)}},cb=function(value,context,argCount){return null==value?_.identity:_.isFunction(value)?optimizeCb(value,context,argCount):_.isObject(value)?_.matcher(value):_.property(value)};_.iteratee=function(value,context){return cb(value,context,Infinity)};var createAssigner=function(keysFunc,undefinedOnly){return function(obj){var length=arguments.length;if(2>length||null==obj)return obj;for(var index=1;indexError on emulator {noformat} [ERROR] TiExceptionHandler: (main) [41,41] ----- Titanium Javascript Runtime Error ----- [ERROR] TiExceptionHandler: (main) [0,41] - In /alloy/underscore.js:15,33 [ERROR] TiExceptionHandler: (main) [0,41] - Message: Uncaught TypeError: Cannot read property '_' of undefined [ERROR] TiExceptionHandler: (main) [0,41] - Source: var previousUnderscore = root._; [WARN] W/ : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 [WARN] W/ : Process pipe failed [ERROR] V8Exception: Exception occurred at /alloy/underscore.js:15: Uncaught TypeError: Cannot read property '_' of undefined [INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.appc.test.TesterActivity@62ba9f6 [WARN] W/ : Unrecognized GLES max version string in extensions: ANDROID_EMU_CHECKSUM_HELPER_v1 [INFO] OpenGLRenderer: Initialized EGL, version 1.4 [ERROR] EGL_emulation: tid 6876: eglSurfaceAttrib(1261): error 0x3009 (EGL_BAD_MATCH) [WARN] OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb1135dc0, error=EGL_BAD_MATCH [ERROR] EGL_emulation: tid 6876: eglSurfaceAttrib(1261): error 0x3009 (EGL_BAD_MATCH) [WARN] OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb1135e40, error=EGL_BAD_MATCH {noformat}

Comments

  1. Ewan Harris 2018-02-13

    This is caused by the babel step introduced into the SDK, it can be solved by using a newer babel https://github.com/appcelerator/node-titanium-sdk/pull/23 or https://github.com/appcelerator/node-titanium-sdk/pull/24
  2. David Bankier 2018-03-02

    Hmmm... Running two different projects on 7.0.1.GA. Both recently upgraded. One gets this error and the other is fine. The compiled /build/android/assets/alloy/underscore.js files however are different. Not sure how...
  3. David Bankier 2018-03-02

    Ok. In my case, I had a .babelrc file, that once removed, fixed it.
  4. Ewan Harris 2018-03-02

    [~dbankier] Where was the .babelrc located? We don't support overriding our defined config currently but I think babel might walk up the directory tree to find config files.
  5. David Bankier 2018-03-04

    Project root.
  6. Ewan Harris 2018-03-05

    [~dbankier] Thanks for that. I've filed TIMOB-25837 to track that issue. I'm going to close this ticket as fixed because as far as I aware overriding the default babel config is unsupported at the moment and we fixed the issue in the SDK that caused this
  7. Ewan Harris 2018-03-05

    This was fixed in the SDK in https://github.com/appcelerator/node-titanium-sdk/pull/25

JSON Source