Firebase and instant apps

799 views
Skip to first unread message

Dmitriy Mazgalin

unread,
Jul 22, 2017, 11:33:39 AM7/22/17
to Firebase Google Group
Hi everyone.

I have some issues with Firebase in my instant app. I followed instructions on instant app page and added google-services.json to base feature module and also added plugin to build gradle file.

When I build and run on emulator I receive this error when I try to call 

FirebaseApp.initializeApp(this);
FirebaseCredential credential = new FirebaseCredential(null);
credential.pushId = FirebaseInstanceId.getInstance().getToken();

07-22 15:57:27.009 4482-4482/myapp E/AndroidRuntime: Error reporting WTF
                                                      java.lang.SecurityException: Method class android.app.ActivityManagerProxy.handleApplicationWtf not available to instant apps
                                                          at android.os.Parcel.readException(Parcel.java:1683)
                                                          at android.os.Parcel.readException(Parcel.java:1636)
                                                          at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(MethodInvocationProxy.java:217)
                                                          at com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(MethodInvocationProxy.java:430)
                                                          at java.lang.reflect.Proxy.invoke(Proxy.java:813)
                                                          at $Proxy9.handleApplicationWtf(Unknown Source)
                                                          at com.android.internal.os.RuntimeInit.wtf(RuntimeInit.java:359)
                                                          at android.util.Log$1.onTerribleFailure(Log.java:108)
                                                          at android.util.Log.wtf(Log.java:300)
                                                          at android.util.Log.wtf(Log.java:290)
                                                          at com.google.firebase.FirebaseApp.zza(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at myapp.SplashDeepLinkActivity.onPostResume(SplashDeepLinkActivity.java:58)
                                                          at android.app.Activity.performResume(Activity.java:6790)
                                                          at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377)
                                                          at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440)
                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2713)
                                                          at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                          at android.os.Looper.loop(Looper.java:154)
                                                          at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
07-22 15:57:27.009 4482-4482/myapp E/AndroidRuntime: Original WTF:
                                                      android.util.Log$TerribleFailure: Firebase API initialization failure.
                                                          at android.util.Log.wtf(Log.java:295)
                                                          at android.util.Log.wtf(Log.java:290)
                                                          at com.google.firebase.FirebaseApp.zza(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                          at myapp.SplashDeepLinkActivity.onPostResume(SplashDeepLinkActivity.java:58)
                                                          at android.app.Activity.performResume(Activity.java:6790)
                                                          at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377)
                                                          at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440)
                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2713)
                                                          at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
                                                          at android.os.Handler.dispatchMessage(Handler.java:102)
                                                          at android.os.Looper.loop(Looper.java:154)
                                                          at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
                                                       Caused by: java.lang.reflect.InvocationTargetException
                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                          at com.google.firebase.FirebaseApp.zza(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at myapp.SplashDeepLinkActivity.onPostResume(SplashDeepLinkActivity.java:58) 
                                                          at android.app.Activity.performResume(Activity.java:6790) 
                                                          at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377) 
                                                          at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440) 
                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2713) 
                                                          at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                          at android.os.Looper.loop(Looper.java:154) 
                                                          at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                          at java.lang.reflect.Method.invoke(Native Method) 
                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
                                                       Caused by: java.lang.SecurityException: Service: jobscheduler is not supported.
                                                          at android.os.Parcel.readException(Parcel.java:1683)
                                                          at android.os.Parcel.readException(Parcel.java:1636)
                                                          at android.app.job.IJobScheduler$Stub$Proxy.cancel(IJobScheduler.java:202)
                                                          at android.app.JobSchedulerImpl.cancel(JobSchedulerImpl.java:60)
                                                          at com.google.android.gms.internal.zzcjg.zzzq(Unknown Source)
                                                          at com.google.android.gms.internal.zzcjg.zzjD(Unknown Source)
                                                          at com.google.android.gms.internal.zzchj.initialize(Unknown Source)
                                                          at com.google.android.gms.internal.zzcgl.<init>(Unknown Source)
                                                          at com.google.android.gms.internal.zzcgl.zzbj(Unknown Source)
                                                          at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source)
                                                          at java.lang.reflect.Method.invoke(Native Method) 
                                                          at com.google.firebase.FirebaseApp.zza(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                          at myapp.SplashDeepLinkActivity.onPostResume(SplashDeepLinkActivity.java:58) 
                                                          at android.app.Activity.performResume(Activity.java:6790) 
                                                          at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3377) 
                                                          at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3440) 
                                                          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2713) 
                                                          at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
                                                          at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                          at android.os.Looper.loop(Looper.java:154) 
                                                          at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                          at java.lang.reflect.Method.invoke(Native Method) 
                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 

if I am not calling FirebaseApp.initializeApp, then I receive another crash that FirebaseApp is not initialized.

Please help me to resolve this issue.
Regards, Dmitry.

Ian Barber

unread,
Jul 24, 2017, 8:52:53 PM7/24/17
to Firebase Google Group
We're investigating this - seems there may be an incompatibility in parts of Firebase and instant apps. Sorry - no time on a fix right now :(

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5bf998a0-ef84-45a1-8e16-5c6c13949a57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vivek Gidmare

unread,
Jul 27, 2017, 8:08:13 PM7/27/17
to Firebase Google Group
Same Happening with Firebase Remote Config also.

Joaquin Tarrago

unread,
Aug 1, 2017, 1:21:33 PM8/1/17
to Firebase Google Group
Same here. I remove Firebase config and still have the same issue.

Some news with this issue?

Thanks a lot :)

Ian Barber

unread,
Aug 2, 2017, 5:40:41 PM8/2/17
to Firebase Google Group
We have found an issue where Google Analytics for Firebase calls JobScheduler, which is unfortunately unsupported in instantapps. We have a fix internally, but unfortunately it has to go on to a fairly long release chain, so it will be several weeks before it hits SDK manager - sorry about that!

Louis Cognault

unread,
Sep 22, 2017, 11:09:26 AM9/22/17
to Firebase Google Group
Hi, has the fix been released?

Ian Barber

unread,
Sep 25, 2017, 5:13:13 PM9/25/17
to Firebase Google Group
The fix is in an upcoming release - but sorry, not out yet! 

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Indrakumar S

unread,
Oct 22, 2017, 12:03:39 PM10/22/17
to Firebase Google Group
Is it out now ?
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Ian Barber

unread,
Oct 23, 2017, 1:10:37 AM10/23/17
to Firebase Google Group
Nope, sorry :(

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Dawud Tan

unread,
Jan 21, 2018, 11:05:29 AM1/21/18
to Firebase Google Group
My app also suffer from the same issue, my current workaround is just putting the google-services.json file not only in the baseFeature module, but also in the module that apply plugin 'com.android.application', is it fine with this configuration?
Reply all
Reply to author
Forward
0 new messages