Topic Title: Runtime error occurs for ALL 32-bit Builds using Notifications v2
> The problem here is entirely on Android.
> This BUG has broken ALL 32-bit builds where Corona developers use Notifications v2; to verify this, I’ve installed the Feb 1, 2019 build 3461, proving the problem is NOT with the daily builds we download. It is within the build process that has recently changed.
> I’m desiring to use last 32-bit build, 3490, because we must still support our gamers using Android v5,v6,v7 and v8. We are intending to publish a final update to our games before July 31, 2019, so that our game monetization is unaffected by Google’s 64-bit deadline. Internationally, this bug presents us with a serious issue, as the majority of our overseas players are not using Android v8 or v9. For this reason, Corona should understand the need to help us have a final 32-bit build by fixing this bug, so as not to make this business decision for us to forget the majority of our customers. As a secondary bug to report, although my build.settings defines minSdkVersion = “21”, Google interprets all Corona builds as supporting a minimumSdkVersion 27, which is Android v8.1. So, we need Corona to fix this, too, so that we can support the majority of our players. Now, onto the most serious bug that causes a runtime error in the code.
> Our 3 apps DO NOT use Firebase for anything. We do not use any Firebase plugins whatsoever.
> The only related Firebase item in our game is registerForPushNotifications({useFCM=true})
> Using registerForPushNotifications({useFCM=true}) on iOS platform works fine.
When we go to run registerForPushNotifications({useFCM=true}), here is the specific Corona-related adb output. After the init failure, I"m running getDeviceToken() in the notifications listener, which is why there are two runtime errors.
NOTE: The problem is the reference to a Default FirebaseApp. This exact code has worked for nearly a year and this error message has not been seen until now.
ERROR: Runtime error
07-03 17:25:30.778 17992 18033 I Corona : java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.gmail.troylyndon.xxxmygamexxx. Make sure to call FirebaseApp.initializeApp(Context) first.
07-03 17:25:30.778 17992 18033 I Corona : Java Stack Trace:
07-03 17:25:30.778 17992 18033 I Corona : com.google.firebase.FirebaseApp.getInstance(Unknown Source:59)
07-03 17:25:30.778 17992 18033 I Corona : com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source:0)
07-03 17:25:30.778 17992 18033 I Corona : plugin.notifications.v2.LuaLoader$GetDeviceToken.invoke(LuaLoader.java:292)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.JavaToNativeShim.nativeRender(Native Method)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:220)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.Controller.updateRuntimeState(Controller.java:382)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:450)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
07-03 17:25:30.778 17992 18033 I Corona : com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
07-03 17:25:30.778 17992 18033 I Corona : stack traceback:
07-03 17:25:30.778 17992 18033 I Corona : [C]: in function ‘getDeviceToken’
07-03 17:25:30.778 17992 18033 I Corona : ?: in function <?:47>
07-03 17:25:30.778 17992 18033 I Corona : ?: in function 'notif
07-03 17:25:30.780 17992 18033 I Corona : ERROR: Runtime error
07-03 17:25:30.780 17992 18033 I Corona : java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.gmail.troylyndon.xxxgameNamexxx. Make sure to call FirebaseApp.initializeApp(Context) first.
07-03 17:25:30.780 17992 18033 I Corona : Java Stack Trace:
07-03 17:25:30.780 17992 18033 I Corona : com.google.firebase.FirebaseApp.getInstance(Unknown Source:59)
07-03 17:25:30.780 17992 18033 I Corona : com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source:0)
07-03 17:25:30.780 17992 18033 I Corona : plugin.notifications.v2.LuaLoader$GetDeviceToken.invoke(LuaLoader.java:292)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.JavaToNativeShim.nativeRender(Native Method)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:220)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.Controller.updateRuntimeState(Controller.java:382)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:450)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
07-03 17:25:30.780 17992 18033 I Corona : com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
07-03 17:25:30.780 17992 18033 I Corona : stack traceback:
07-03 17:25:30.780 17992 18033 I Corona : [C]: ?
07-03 17:25:30.780 17992 18033 I Corona : [C]: in function ‘getDeviceToken’
07-03 17:25:30.780 17992 18033 I Corona : ?: in function <?:47>
07-03 17:25:30.780 17992 18033 I Corona : ?: in function ‘notifications_init’
07-03 17:25:30.780 17992 18033 I Corona : ?: in function <?:876>
07-03 17:25:30.780 17992 18033 I Corona : ?: in function ‘?’
07-03 17:25:30.780 17992 18033 I Corona : ?: in function ‘listener’
07-03 17:25:30.780 17992 18033 I Corona : /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:217: in function ‘method’
07-03 17:25:30.780 17992 18033 I Corona : /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:236: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:205>