Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

firebaseAnalytics.init() Crashing App in New Builds
Started by colinmorgan Jun 14 2019 01:58 PM

13 replies to this topic
firebase android crash
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Observer

  • 18 posts
  • Corona SDK

I updated my app at the end of last month without issue. Today I added a batch of new puzzles and did an Android build to send out to my testers. I loaded the app onto my test device via the ADB and the app crashed moments after launch. No runtime error, nothing in the log- the app just disappeared right after the splash screen showed up and I got a popup saying, "Word Search World Traveler has stopped \n [refresh symbol] Open app again". Reopening the app just produced the same result.

 

After restarting my testing device, I did a bunch of ruling-things-out testing: sideloading old .apks (worked), building from archived versions of the app (didn't work), building from a different computer (didn't work), building demo apps that didn't have any plugins (worked), etc. After coming to the conclusion that it was something plugin related, I started turning plugins off and on until I could get the app to launch. At the end of the day, commenting out Firebase allowed the app to run successfully from a new build.

 

I've noticed AdMob touting enhanced Firebase integration recently, so my guess is that they changed the SDK recently, but that's based on no evidence other that what I've noticed out of the corner of my eye when I'm checking my AdMob dashboard.

 

If anyone has any insight into this, I'd be curious to hear it.

 

I used Corona build 2019.3480 for both today's work and the functional build from last month. No changes to the build.settings or the Google Services files.



[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,222 posts
  • Corona SDK

What are you using Firebase for? Are you writing any events? 



[TOPIC: post.html]
#3

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Observer

  • 18 posts
  • Corona SDK

Mostly to track usage. I log puzzles loaded and completed, but in main.lua, where it was crashing, the only thing going on is requiring the plugin and initializing.



[TOPIC: post.html]
#4

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Corona Geek

  • 1,222 posts
  • Corona SDK

I know very little about Scott's plugin. Since you are tracking events your only choice is to use his plugin. He is around so he might help you. There is a way to track launches and maybe scene changes without using Scott's plugin since a bunch of plugins in the marketplace and from coronalabs have the firebase api embedded (and my guess is this is part of the problem).

 

If you are interested in what I said above I can try pulling the project I am using firebase to figure out how I did it without the Firebase plugin.



[TOPIC: post.html]
#5

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Observer

  • 18 posts
  • Corona SDK

Thank you for the offer, but please don't go to the trouble.

 

I'm not reliant on Firebase to track usage, so taking it out of my app isn't a hardship. (Truth be told, the only reason I was still running it was it has that great map in StreamView.)



[TOPIC: post.html]
#6

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 2,120 posts
  • Corona SDK

I would advise using Game Analytics instead.



[TOPIC: post.html]
#7

colinmorgan

[GLOBAL: userInfoPane.html]
colinmorgan
  • Observer

  • 18 posts
  • Corona SDK

Looks interesting, thanks for the tip!



[TOPIC: post.html]
#8

apps142

[GLOBAL: userInfoPane.html]
apps142
  • Observer

  • 1 posts
  • Corona SDK

Bump. Getting the same issue here with Android builds, not sure about iOS though. I have sent a bug report with the crash logs to both the Plugin Bug Report page (https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki_DA/viewform) and the Report a Bug page (https://portal.coronalabs.com/bug-submission)

This wasn't an issue a couple of months back when I last built my app. Didn't make any changes the project, made another build today and now it's crashing. The main error line from Android seems to be - 

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp;
at plugin.firebaseAnalytics.LuaLoader$init$1.run(LuaLoader.java:166)

Hope this helps find the issue!



[TOPIC: post.html]
#9

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,808 posts
  • Enterprise

This has been fixed and start working 2019.3497+ with the new build system. Note a moment of this 2019.3497+ is note this not available. Firebase Analytics has been updated for 64 bit.



[TOPIC: post.html]
#10

MartingK

[GLOBAL: userInfoPane.html]
MartingK
  • Enthusiast

  • 82 posts
  • Corona SDK

Another example of an innocent update, causes an unexpected and unrelated crash scare ...

the root cause is that corona updates the plugins, even it we didn't update our CoronaSDK, it happens without us changing a thing

 

Give us an option to "freeze" plugins versions and advance them whenever we want. building is very indeterministic and causes many sad stories. 

 

please vote for this feature:

http://feedback.coronalabs.com/forums/188732-corona-feature-requests-feedback/suggestions/36611722-let-us-control-ads-plugin-version-in-config-file



[TOPIC: post.html]
#11

joelutting

[GLOBAL: userInfoPane.html]
joelutting
  • Enthusiast

  • 50 posts
  • Corona SDK

so this thread seems to be saying I can't build with firebase analytics without updating to a corona version that is not available yet!?!

 

This is very unfortunate...I have been contacted by a publisher about one of my old games they like, and they wanted me to put in firebase so they could do some testing...'easy' I thought...a day later its all done...except it crashes with the error mentioned above.

 

hey maybe the publisher will wait around for me...



[TOPIC: post.html]
#12

joelutting

[GLOBAL: userInfoPane.html]
joelutting
  • Enthusiast

  • 50 posts
  • Corona SDK

Is there any way I can get an older version of the plugin?



[TOPIC: post.html]
#13

joelutting

[GLOBAL: userInfoPane.html]
joelutting
  • Enthusiast

  • 50 posts
  • Corona SDK

ok - I see now the daily builds...I hope updating to these does not break everything......



[TOPIC: post.html]
#14

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,808 posts
  • Enterprise

There are a couple of threads about this use the lastest version of the corona if you have a problem send me your project and android version. I cannot reproduce this issue without this info.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: firebase, android, crash