Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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

8 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,149 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,149 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,108 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,796 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_controls]
[/topic_controls]

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