{ "id": "162742", "key": "TIMOB-23801", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-02T20:30:49.000+0000", "created": "2016-08-22T19:22:28.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "52563", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "162835", "key": "TIMOB-23830", "fields": { "summary": "Android: Unable to build native module with name that starts with number", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2016-09-15T22:02:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "When building an Android module, the build fails:\r\n\r\n{code}\r\n[ERROR] Failed to run ndk-build\r\n[ERROR] \r\n[ERROR] jni/Android.mk:35: warning: overriding commands for target `/Users/chris/appc/workspace/mymodule/android/build/generated/KrollGeneratedBindings.cpp'\r\n[ERROR] jni/Android.mk:35: warning: ignoring old commands for target `/Users/chris/appc/workspace/mymodule/android/build/generated/KrollGeneratedBindings.cpp'\r\n[ERROR] In file included from jni/com.appcelerator.mymodule.ExampleProxy.h:12:0,\r\n[ERROR] from jni/com.appcelerator.mymodule.ExampleProxy.cpp:10:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/Proxy.h:11:16: fatal error: v8.h: No such file or directory\r\n[ERROR] #include \r\n[ERROR] ^\r\n[ERROR] compilation terminated.\r\n[ERROR] make: *** [/Users/chris/appc/workspace/mymodule/android/build/generated/obj/local/armeabi-v7a/objs/com.appcelerator.mymodule/com.appcelerator.mymodule.ExampleProxy.o] Error 1\r\n{code}\r\n\r\nTo reproduce:\r\n\r\n{code}\r\nti create -t module -n mymodule --id com.appc.mymodule -p all -d .\r\ncd mymodule/android\r\nti build -p android --build-only\r\n{code}\r\n\r\nWe're also seeing:\r\n\r\n{code}\r\n[ERROR] Failed to compile Java source files:\r\n[ERROR] \r\n[ERROR] warning: [options] bootstrap class path not set in conjunction with -source 1.6\r\n[ERROR] Note: [KrollBindingGen] Running Kroll binding generator.\r\n[ERROR] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/123abc.json\r\n[ERROR] Note: [KrollBindingGen] Found binding for proxy Example\r\n[ERROR] Note: [KrollBindingGen] Found binding for module my123abc\r\n[ERROR] Note: [KrollBindingGen] Generating JSON: file:/Users/chris/appc/workspace/123abc/android/build/generated/json/org/appcelerator/titanium/bindings/123abc.json\r\n[ERROR] /Users/chris/appc/workspace/123abc/android/src/com/test/app/ExampleProxy.java:32: error: cannot find symbol\r\n[ERROR] private static final boolean DBG = TiConfig.LOGD;\r\n[ERROR] ^\r\n[ERROR] symbol: variable TiConfig\r\n[ERROR] location: class ExampleProxy\r\n[ERROR] /Users/chris/appc/workspace/123abc/android/src/com/test/app/ExampleProxy.java:81: error: cannot find symbol\r\n[ERROR] \t\tLog.d(LCAT, \"example created with message: \" + options.get(\"message\"));\r\n[ERROR] \t\t^\r\n[ERROR] symbol: variable Log\r\n[ERROR] location: class ExampleProxy\r\n[ERROR] /Users/chris/appc/workspace/123abc/android/src/com/test/app/ExampleProxy.java:89: error: cannot find symbol\r\n[ERROR] \tLog.d(LCAT, \"printing message: \" + message);\r\n[ERROR] \t^\r\n[ERROR] symbol: variable Log\r\n[ERROR] location: class ExampleProxy\r\n[ERROR] /Users/chris/appc/workspace/123abc/android/src/com/test/app/ExampleProxy.java:102: error: cannot find symbol\r\n[ERROR] Log.d(LCAT, \"Tried setting module message to: \" + message);\r\n[ERROR] ^\r\n[ERROR] symbol: variable Log\r\n[ERROR] location: class ExampleProxy\r\n[ERROR] 4 errors\r\n{code}", "attachment": [], "flagged": false, "summary": "Titanium Android module build fails with Titanium SDK 6.1.0", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK master (6.1.0)\r\nAndroid NDK r11c (also tested with r10e)", "closedSprints": [ { "id": 705, "state": "closed", "name": "2016 Sprint 18 Tooling", "startDate": "2016-08-27T00:16:26.485Z", "endDate": "2016-09-10T00:16:00.000Z", "completeDate": "2016-09-13T20:21:37.063Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "394032", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Able to reproduce.\r\nLooks like a CLI or Tooling issue?\r\n\r\nUsing {code} ant {code} works and compiles the android module.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-24T03:29:49.000+0000", "updated": "2016-08-24T03:29:49.000+0000" }, { "id": "394970", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "{{ant}} fails for me too. Ti SDK 6.0.0.v20160830110225.\r\n\r\n{code}\r\nprocess.annotations:\r\n [javac] Compiling 2 source files to /Users/feonsua/work/testapps/abc123/android/build/classes\r\n [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6\r\n [javac] Note: [KrollBindingGen] Running Kroll binding generator.\r\n [javac] Note: [KrollBindingGen] Succesfully loaded existing binding data: /Users/feonsua/work/testapps/abc123/android/build/generated/json/org/appcelerator/titanium/bindings/abc123.json\r\n [javac] Note: [KrollBindingGen] Found binding for module Abc123\r\n [javac] Note: [KrollBindingGen] Found binding for proxy Example\r\n [javac] /Users/feonsua/work/testapps/abc123/android/src/com/test/app/ExampleProxy.java:15: error: cannot find symbol\r\n [javac] import org.appcelerator.titanium.util.Log;\r\n [javac] ^\r\n [javac] symbol: class Log\r\n [javac] location: package org.appcelerator.titanium.util\r\n [javac] /Users/feonsua/work/testapps/abc123/android/src/com/test/app/ExampleProxy.java:16: error: cannot find symbol\r\n [javac] import org.appcelerator.titanium.util.TiConfig;\r\n [javac] ^\r\n [javac] symbol: class TiConfig\r\n [javac] location: package org.appcelerator.titanium.util\r\n [javac] Note: [KrollBindingGen] Generating JSON: file:/Users/feonsua/work/testapps/abc123/android/build/generated/json/org/appcelerator/titanium/bindings/abc123.json\r\n [javac] 2 errors\r\n\r\nBUILD FAILED\r\n\r\n{code}", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2016-08-31T22:46:11.000+0000", "updated": "2016-08-31T22:46:56.000+0000" }, { "id": "395000", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "The error faced by you is a different error.\r\nThe classes created eg, {{android/titanium/src/java/org/appcelerator/titanium/util/Log.java}} were removed in https://github.com/appcelerator/titanium_mobile/pull/8101 TIMOB-20221\r\n\r\nMeaning, the default module that is created needs to be updated. (cc: [~cwilliams]) (We would need to create a ticket to address this issue).\r\n\r\nIf you remove the classes in the code that the error is talking about, it will work.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T03:05:29.000+0000", "updated": "2016-09-01T03:11:22.000+0000" }, { "id": "395002", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "This would also mean default module creation in SDK 6.0.0 is broken with this same issue.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T03:06:32.000+0000", "updated": "2016-09-01T03:06:32.000+0000" }, { "id": "395007", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "I believe I need to update https://github.com/appcelerator/titanium_mobile/blob/415bd6c66dcc55b1a59a59574f3babd3c3a84ede/android/templates/module/default/template/android/src/%7B%7BModuleIdAsFolder%7D%7D/ExampleProxy.java.ejs", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T04:30:26.000+0000", "updated": "2016-09-01T04:30:26.000+0000" }, { "id": "395008", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~fmiao] To make {{ant}} work, please edit the ExampleProxy.java in this manner:\r\n\r\n# Change line 15 : {{import org.appcelerator.titanium.util.Log;}} to {{import org.appcelerator.kroll.common.Log;}}\r\n# Comment line 16: {{import org.appcelerator.titanium.util.TiConfig;}} to {{import org.appcelerator.kroll.common.TiConfig;}}\r\n\r\nIn the mean time, I'm doing a PR to update the template.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T04:39:36.000+0000", "updated": "2016-09-01T04:47:56.000+0000" }, { "id": "395009", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/8303\r\n6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8304\r\n[~cbarber] for your review.\r\n\r\nThis fixes the compilation issue. Ant will compile.\r\n\r\nAfter this is merged and Ant working again, the main issue of this ticket can then be looked into for investigation.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-01T04:53:42.000+0000", "updated": "2016-09-01T05:37:18.000+0000" }, { "id": "395093", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Usage of Ant has been deprecated and replaced by a fantastic Node.js-based build command. Upon applying your patch, I create a new module, then build it by running {{ti build -p android --build-only}}. The build fails with the following error:\r\n\r\n{code}\r\n[ERROR] Failed to run ndk-build\r\n[ERROR] \r\n[ERROR] jni/Android.mk:35: warning: overriding commands for target `/Users/chris/appc/workspace/mymodule/android/build/generated/KrollGeneratedBindings.cpp'\r\n[ERROR] jni/Android.mk:35: warning: ignoring old commands for target `/Users/chris/appc/workspace/mymodule/android/build/generated/KrollGeneratedBindings.cpp'\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:17:0:\r\n[ERROR] /Users/chris/appc/workspace/mymodule/android/build/generated/KrollGeneratedBindings.gperf:14:28: warning: declaration 'struct titanium::bindings::BindEntry' does not declare anything\r\n[ERROR] struct titanium::bindings::BindEntry;\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp: In function 'v8::Local Mymodule_getBinding(const v8::FunctionCallbackInfo&)':\r\n[ERROR] jni/../MymoduleBootstrap.cpp:31:126: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]\r\n[ERROR] isolate->ThrowException(Exception::Error(String::NewFromOneByte(isolate, \"Mymodule.getBinding requires 1 argument: binding\")));\r\n[ERROR] ^\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:10:0:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/v8.h:2332:24: note: initializing argument 2 of 'static v8::Local v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)'\r\n[ERROR] static V8_DEPRECATED(\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp:32:3: error: return-statement with no value, in function returning 'v8::Local' [-fpermissive]\r\n[ERROR] return;\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp:57:33: error: too few arguments to function 'v8::Local v8::Undefined(v8::Isolate*)'\r\n[ERROR] return scope.Escape(Undefined());\r\n[ERROR] ^\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:10:0:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/v8.h:324:27: note: declared here\r\n[ERROR] friend Local Undefined(Isolate* isolate);\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp:61:36: error: request for member 'GetCurrentContext' in 'isolate', which is of pointer type 'v8::Isolate*' (maybe you meant to use '->' ?)\r\n[ERROR] extBinding->bind(exports, isolate.GetCurrentContext());\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp: In function 'void Mymodule_init(v8::Local, v8::Local)':\r\n[ERROR] jni/../MymoduleBootstrap.cpp:73:81: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]\r\n[ERROR] Local name = String::NewFromOneByte(isolate, titanium::natives[i].name);\r\n[ERROR] ^\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:10:0:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/v8.h:2332:24: note: initializing argument 2 of 'static v8::Local v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)'\r\n[ERROR] static V8_DEPRECATED(\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp:80:59: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]\r\n[ERROR] exports->Set(String::NewFromOneByte(isolate, \"getBinding\"), FunctionTemplate::New(isolate, Mymodule_getBinding)->GetFunction(context).ToLocalChecked());\r\n[ERROR] ^\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:10:0:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/v8.h:2332:24: note: initializing argument 2 of 'static v8::Local v8::String::NewFromOneByte(v8::Isolate*, const uint8_t*, v8::String::NewStringType, int)'\r\n[ERROR] static V8_DEPRECATED(\r\n[ERROR] ^\r\n[ERROR] jni/../MymoduleBootstrap.cpp:80:112: error: invalid conversion from 'v8::Local (*)(const v8::FunctionCallbackInfo&)' to 'v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo&)}' [-fpermissive]\r\n[ERROR] exports->Set(String::NewFromOneByte(isolate, \"getBinding\"), FunctionTemplate::New(isolate, Mymodule_getBinding)->GetFunction(context).ToLocalChecked());\r\n[ERROR] ^\r\n[ERROR] In file included from jni/../MymoduleBootstrap.cpp:10:0:\r\n[ERROR] /Users/chris/Library/Application Support/Titanium/mobilesdk/osx/6.1.0/android/native/include/v8.h:4477:34: note: initializing argument 2 of 'static v8::Local v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local, v8::Local, int)'\r\n[ERROR] static Local New(\r\n[ERROR] ^\r\n[ERROR] make: *** [/Users/chris/appc/workspace/mymodule/android/build/generated/obj/local/armeabi-v7a/objs/com.appc.mymodule/__/MymoduleBootstrap.o] Error 1\r\n{code}", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-09-01T14:01:16.000+0000", "updated": "2016-09-01T14:01:16.000+0000" }, { "id": "395159", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "This seems V8 related. [~cwilliams] Can you help?", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-09-02T03:10:19.000+0000", "updated": "2016-09-02T03:10:19.000+0000" }, { "id": "395220", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Master/6.1.X: https://github.com/appcelerator/titanium_mobile/pull/8306\r\n6.0.X: https://github.com/appcelerator/titanium_mobile/pull/8307", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-02T19:41:00.000+0000", "updated": "2016-09-02T19:41:00.000+0000" }, { "id": "395221", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "When I updated V8, I had updated the templates used by the ant/python module build system. There's a parallel set used by the node-based system, which this PR now updates (to effectively match the ones I updated for ant/python).", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-02T19:42:35.000+0000", "updated": "2016-09-02T19:42:35.000+0000" }, { "id": "396293", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nAndroid module build does not fail.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.8.0.201609061702\r\nTi SDK : 6.0.0.v20160913184210, 6.1.0.v20160915135333\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.8-6\r\nAppc CLI : 6.0.0-38\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-15T22:01:59.000+0000", "updated": "2016-09-15T22:01:59.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }