Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25251] Hyperloop: Error during runtime using firebase

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-12-11T22:35:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, Hyperloop
Labelsescalation
ReporterVictor Vazquez Montero
AssigneeUnknown
Created2017-09-07T21:32:35.000+0000
Updated2018-12-11T22:35:37.000+0000

Description

Description

Customer is trying to use Firebase. They have used third party module ti.firebase and they have tried to do it natively with hyperloop and they have also tried creating their own module for it.

error:

[WARN]  W/System.err: ... 31 more

[WARN]  W/System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

[ERROR] TiExceptionHandler: (main) [33,97] ----- Titanium Javascript Runtime Error -----

[ERROR] TiExceptionHandler: (main) [1,98] - In /app.js:5,14

[ERROR] TiExceptionHandler: (main) [0,98] - Message: Uncaught Failed resolution of: Lcom/google/android/gms/R$string;

[ERROR] TiExceptionHandler: (main) [0,98] - Source:     firebase.initFirebaseApp();

[ERROR] V8Exception: Exception occurred at /app.js:5: Uncaught Failed resolution of: Lcom/google/android/gms/R$string;

[ERROR] V8Exception: Failed resolution of: Lcom/google/android/gms/R$string;

3rd party ti.firebase module:

[Firebase module](https://axwaysoftware-my.sharepoint.com/personal/nmishra_axway_com/_layouts/15/guestaccess.aspx?guestaccesstoken=5GiYZAGLFovGCT%2f0VjGYHI7oY8dKa2ntlaHWFxIHglw%3d&docid=2_14d3c0de793a14d4383e217edade2d944&rev=1)

Native Hyperloop firebase:

[firebaseHyperloopWithPersonalJavaImplJar](https://axwaysoftware-my.sharepoint.com/personal/nmishra_axway_com/_layouts/15/guestaccess.aspx?guestaccesstoken=P8EkJLCVDTlDY11FIOZ9ImojYahk2fY3p7LZpXgNn5Y%3d&docid=2_1ec69d2e3960749f3b68d668186bc755d&rev=1)

App Sample using self-created module

[Self made firebase module](https://axwaysoftware-my.sharepoint.com/personal/nmishra_axway_com/_layouts/15/guestaccess.aspx?guestaccesstoken=7inWFtnhANxiqiTFYWNcXGHvLjLZFxBz%2fSeD%2fPuR7a0%3d&docid=2_14549427e63f14642bd100b6a68e6fa88&rev=1)

additional information

I've attached the error log that is generated when you try to use the third party firebase module.

Attachments

FileDateSize
build.log2017-09-07T21:29:15.000+000031042

Comments

  1. Hans Knöchel 2017-09-10

    [~jvennemann] If the LoopModules library does not work anymore, it may be a regression in Hyperloop. Can we test this with 2.2.0 and include if still happening? Thanks! *EDIT*: It does not seem like they use the Ti.Firebase LoopModule ([here](https://github.com/loop-modules/Ti.Firebase)), yet. That one is Hyperloop-based and should work. In the mean time, I found a Github issue that is now linked to TIMOB-24722 which should be the core of this issue - the concurring google-play library versions. It will be investigated this week. Until then, we should still clarify what the subject of this ticket is, as I do not see any Hyperloop-related issues here.
  2. Jan Vennemann 2017-09-11

    [~hknoechel], looking at the Firebase LoopModule it states that it is for iOS only, so i don't know why this is mixed up here with the Android module? Anyway i tested it and it's working fine with Hyperloop 2.1.3. Hyperloop 2.2.0 has an issue with generating the metabase, but that is expected as the Framework support rewrite is still a work in progress. The issue for the third-party Android module is that it does not provide the required resources for the play-services-basement-9.6.0.jar library, in addition to some other libraries. The module only bundles the .jar files but nothing else. We cannot recreate the mentioned com/google/android/gms/R class because of that, resulting in the build failure. Switching over to use SDK 6.1.0+ and the actual .aar files should resolve this problem (The ti.map module does not have this issue because it uses the [respackage](https://github.com/appcelerator-modules/ti.map/blob/master/android/manifest#L20) option in the module manifest, which also regenerates the above mentioned R class). For their own build module, i can not see any error in their build log, but when i build it on my machine with Titanium 6.1.1.GA i get the following dexer error:
       [ERROR] Failed to run dexer:
       [ERROR]   
       [ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/zza;
       [ERROR] 1 error; aborting
       
    Is that the error they are also seeing?
  3. Hans Knöchel 2017-09-12

    Hey there! Please see my latest comment on TIMOB-24722 that will likely solve this issue as well: {quote} I just updated Ti.Map to use the very latest Google Play Services (11.0.4) here. So if the other native module is able to use the same one (probably just a PR to that branch), it will be compatible on the fly. Please note that newer versions of the Google Play Services like 11.x have a dependency on the support-library as well, which we updated in 6.2.0, so 6.2.0 will be required to run this version of Ti.Map. Side-Note: We will bump the Ti.Map Android version (currently 3.4.0) to 4.0.0 in Titanium SDK 7.0.0, which would be a breaking change anyway, but I wanted to ensure that Titanium SDK 6.x users can still use this important PR before we bump the minimum Titanium SDK to 7.0.0. {quote} Long story short: We will move to Gradle in future versions of Titanium soon, but until then, keeping the modules up to date will unblock this issue immediately.
  4. Victor Vazquez Montero 2017-10-25

    [~hknoechel] was this issue included in hyperloop 2.2.0 ?
  5. Victor Vazquez Montero 2017-11-27

    [~hknoechel] Would the updated modules be included in SDK 7.0.0 RC?

JSON Source