{ "id": "172163", "key": "TIMOB-26606", "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": [], "resolution": { "id": "10000", "description": "", "name": "Done" }, "resolutiondate": "2019-04-08T21:01:46.000+0000", "created": "2018-09-03T09:55:36.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "engTriage", "hyperloop" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-08T21:01:46.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": [], "description": "I have to update an old Ti 6.0.1 app to Ti 7.3.1. It was using hyperloop on Android already to load an external (closed source) banking module. When I compile the app now (all modules are up to date and iOS compiles fine) I'll end up with this error:\r\n\r\n{noformat}\r\n\r\n[ERROR] Failed to run dexer:\r\n[ERROR] \r\n[ERROR] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n[ERROR] (com.samsung.android.sdk.pass.a) that doesn't come with an\r\n[ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n[ERROR] compiler that did not target the modern .class file format. The recommended\r\n[ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n[ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n[ERROR] this warning is that reflective operations on this class will incorrectly\r\n[ERROR] indicate that it is *not* an inner class.\r\n[ERROR] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n[ERROR] (com.samsung.android.sdk.pass.c) that doesn't come with an\r\n[ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n[ERROR] compiler that did not target the modern .class file format. The recommended\r\n[ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n[ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n[ERROR] this warning is that reflective operations on this class will incorrectly\r\n[ERROR] indicate that it is *not* an inner class.\r\n[ERROR] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n[ERROR] (com.samsung.android.sdk.pass.b) that doesn't come with an\r\n[ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n[ERROR] compiler that did not target the modern .class file format. The recommended\r\n[ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n[ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n[ERROR] this warning is that reflective operations on this class will incorrectly\r\n[ERROR] indicate that it is *not* an inner class.\r\n[ERROR] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n[ERROR] (com.samsung.android.sdk.pass.d) that doesn't come with an\r\n[ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n[ERROR] compiler that did not target the modern .class file format. The recommended\r\n[ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n[ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n[ERROR] this warning is that reflective operations on this class will incorrectly\r\n[ERROR] indicate that it is *not* an inner class.\r\n[ERROR] warning: Ignoring InnerClasses attribute for an anonymous inner class\r\n[ERROR] (com.samsung.android.sdk.pass.e) that doesn't come with an\r\n[ERROR] associated EnclosingMethod attribute. This class was probably produced by a\r\n[ERROR] compiler that did not target the modern .class file format. The recommended\r\n[ERROR] solution is to recompile the class from source, using an up-to-date compiler\r\n[ERROR] and without specifying any \"-target\" type options. The consequence of ignoring\r\n[ERROR] this warning is that reflective operations on this class will incorrectly\r\n[ERROR] indicate that it is *not* an inner class.\r\n[ERROR] \r\n[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:\r\n[ERROR] java.lang.RuntimeException: Unexpected exception in dex writer thread\r\n[ERROR] at com.android.dx.command.dexer.Main.runMultiDex(Main.java:399)\r\n[ERROR] at com.android.dx.command.dexer.Main.runDx(Main.java:289)\r\n[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:247)\r\n[ERROR] at com.android.dx.command.Main.main(Main.java:94)\r\n{noformat}\r\n\r\nSince it's compiling fine with the old hyperloop in 6.0.1 I guess that it wasn't even used there? Or did something changed in the way classes are handled now?\r\n\r\nIf I remove the Samsung pass.jar inside the AAR it stops with just\r\n\r\n{noformat}\r\n[ERROR] Failed to run dexer:\r\n[ERROR] \r\n[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:\r\n[ERROR] java.lang.RuntimeException: Unexpected exception in dex writer thread\r\n[ERROR] at com.android.dx.command.dexer.Main.runMultiDex(Main.java:399)\r\n[ERROR] at com.android.dx.command.dexer.Main.runDx(Main.java:289)\r\n[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:247)\r\n[ERROR] at com.android.dx.command.Main.main(Main.java:94)\r\n{noformat}\r\n\r\n\r\n\r\nI can contact the company if there is anything that needs to be changed inside the Android module", "attachment": [], "flagged": false, "summary": "Hyperloop: Failed to run dexer with Samsung Pass library", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "441291", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nThanks for sharing with us. What's your java version? Please provide a full sample testcode that regenerates the issue. Better to provide a sample app as an attachment here.\r\n\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-09-04T09:06:29.000+0000", "updated": "2018-09-04T09:06:29.000+0000" }, { "id": "441294", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "\"java --version\" is \"1.8.0_161\", OSX 10.13.6, NDK 12.1.2977051.\r\n\r\nSample code won't help since it's a compiling error :) Without hyperloop the app runs fine. I can ask the client if its possible to share the aar ", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-04T12:05:52.000+0000", "updated": "2018-09-04T12:05:52.000+0000" }, { "id": "441308", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael], what other JARs or AARs are you including in your project other than Samsung's \"pass.jar\"?\r\n\r\nI ask because this sounds like a library version conflict. Possibly an older (or newer) Google support jar you might be including that's overwriting one that Titanium uses.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-04T16:38:53.000+0000", "updated": "2018-09-04T16:38:53.000+0000" }, { "id": "441329", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jquick], the following modules are included in Android:\r\n\r\n{code:java}\r\nbencoding.android.tools\r\nbencoding.securely\r\nti.imagefactory\r\ncom.rkam.swiperefreshlayout\r\ncom.mykingdom.mupdf\r\n{code}\r\n\r\nThe aar itself includes bouncycastle and the samsung pass/sdk.\r\nThe original (old 6.0.1) project included android-support-v4, v7-appcompat, design-23.1.1 and sliding-layer in the app/platform/android/ folder. I removed those support libraries already without any luck.\r\nI've contacted the client to check if I can send you the aar file!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-05T06:12:11.000+0000", "updated": "2018-09-05T06:12:11.000+0000" }, { "id": "441335", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've send you a slack message with the module download!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-05T07:55:44.000+0000", "updated": "2018-09-05T07:55:44.000+0000" }, { "id": "441369", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael], thanks for sending me the module. I was able to reproduce it.\r\n\r\nI've confirmed that the error is caused by library version conflicts. You'll need to remove the following libraries. It'll compile and run successfully if you do:\r\n* android-support-v4.jar\r\n* android-support-v7-appcompat.jar\r\n* design-23.1.1.aar\r\n* google-play-services-base.jar\r\n* google-play-services.gcm.jar\r\n* google-play-services.iid.jar\r\n\r\nThis is because the above libraries are support and design libraries are already included in Titanium here...\r\nhttps://github.com/appcelerator/titanium_mobile/tree/master/android/modules/appcompat/lib\r\nhttps://github.com/appcelerator/titanium_mobile/tree/master/android/modules/design/lib\r\n\r\nAnd our \"ti.playservices\" module already includes the above mentioned Google Play Services libraries...\r\nhttps://github.com/appcelerator-modules/ti.playservices/tree/master/android/lib\r\n\r\nNote that you don't normally include the \"ti.playservices\" module directly. It's normally included indirectly by a module that references it as a dependency. For example, our \"cloudpush\" module which does push notifications for Android references \"ti.playservices\" in its \"timodule.xml\" here...\r\nhttps://github.com/appcelerator-modules/cloudpush/blob/master/android/timodule.xml\r\n\r\nSo, if you plan on making a public Android module that depends on Google Play Services, we recommend that you reference it as a dependency in the \"timodule.xml\" file just like the above. If all modules make a promise to do it this way, then it'll avoid version conflicts.\r\n\r\nI hope this helps!", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-06T02:01:04.000+0000", "updated": "2018-09-06T02:01:04.000+0000" }, { "id": "441373", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thank you for your help!\r\n\r\nI can compile it now but only with: {{appc ti build -p android --build-only}} and then install the APK by hand.\r\nWhen I use {{appc ti build -p android -T device}} I still get: \r\n\r\n{noformat}\r\n[ERROR] Failed to run dexer:\r\n[ERROR] \r\n[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:\r\n[ERROR] java.lang.RuntimeException: Unexpected exception in dex writer thread\r\n[ERROR] at com.android.dx.command.dexer.Main.runMultiDex(Main.java:399)\r\n[ERROR] at com.android.dx.command.dexer.Main.runDx(Main.java:289)\r\n[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:247)\r\n[ERROR] at com.android.dx.command.Main.main(Main.java:94)\r\n{noformat}\r\n\r\nFor me it looks like a timeout because it takes ages till the error appears. Build-only works faster.\r\n\r\nBut thanks again, it works without the support modules!", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-06T07:51:55.000+0000", "updated": "2018-09-06T07:51:55.000+0000" }, { "id": "441385", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hmm... I'm able to compile for device just fine. And I was able to run the built app with the hyperloop code snippet you gave me in Slack as well.\r\n\r\nPerhaps it's an incremental build issue? Try deleting your project's generated \"build\" directory and re-build again.\r\n\r\nIf that doesn't work, then we may need to double check the version of support/google-play libraries that your Samsung pass library depends on. This is in case it depends on a newer version than what Titanium includes.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-06T17:57:01.000+0000", "updated": "2018-09-06T17:57:01.000+0000" }, { "id": "441387", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'll try that. I found this https://stackoverflow.com/a/32605696/5193915: setting {{javaMaxHeapSize \"4g\"}} which I'm trying tomorrow. That would sound like the timeout I was thinking about. ", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-06T18:04:51.000+0000", "updated": "2018-09-06T18:04:51.000+0000" }, { "id": "441389", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Oh wow. I'm guessing your app contains more libraries/modules then eh?\r\nIf I recall correctly, the current max is 1 gb. I've never exceeded it before.\r\n\r\nJava has a \"_JAVA_OPTIONS\" environment variable where I believe you can set the {{-Xmx2g}} flag for 2 GB. I've never tried it that way before, but that \"should\" allow you to quickly test it if this is the case.\r\nhttps://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html#wp1003092\r\nhttps://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html\r\n\r\nI'll see about playing with this later. If it is a JVM max heap size issue, then we'll have to look into bumping it up in our build tools. Thanks.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-06T18:39:09.000+0000", "updated": "2018-09-06T18:39:09.000+0000" }, { "id": "441403", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Not that many modules (65 lines of jar's that are included in the last java/dex command if you put every jar in an own file. about 50lines 7.3.1 jars and 10 external jars) but a lot of files if that is included in this too.\r\n\r\nI've used {{appc ti config android.dx.maxMemory \"4096M\"}} and it worked right away! Even with 2048M it's working fine. Default is 1024M as you've said. There is a typo here: https://docs.appcelerator.com/platform/latest/#!/guide/Titanium_CLI_Options-section-src-37549003_TitaniumCLIOptions-android.dx.maxmemory\r\nit should be maxMemory instead of maxmemory ", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-07T07:29:40.000+0000", "updated": "2018-09-07T07:29:40.000+0000" }, { "id": "441584", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For the CLI config, it's \"android.dx.maxMemory\".\r\nBut for the tiapp.xml, it's \"android.dx.maxmemory\".\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_build.js#L914\r\n\r\nI'm not thrilled about the casing difference, but there it is.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-14T17:55:28.000+0000", "updated": "2018-09-14T17:55:28.000+0000" }, { "id": "447534", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing per engineering comments.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-08T21:01:46.000+0000", "updated": "2019-04-08T21:01:46.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }