Skip to content

[BUG] Android App doesn't start without Google Play services #27

@timber-they

Description

@timber-they

Describe the bug
Without Google Play services the app doesn't start on Android, but rather is stuck on the initial loading screen. This is a bug because especially for open source applications, they should also work without Google Play services, meaning that they shouldn't solely rely on Firebase Messaging.
Relevant logs seem to be:

06-20 09:53:07.553 28884 28915 E Metadata: Google Play services missing or without correct permission.
06-20 09:53:07.558 28884 28932 E flutter : [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(IllegalStateException, java.lang.IllegalStateException: Fetching FCM registration token failed, but exception was null, Cause: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE, Stacktrace: java.lang.IllegalStateException: Fetching FCM registration token failed, but exception was null
06-20 09:53:07.558 28884 28932 E flutter : 	at uk.orth.push.a.o(Unknown Source:37)
06-20 09:53:07.558 28884 28932 E flutter : 	at uk.orth.push.a.i(Unknown Source:0)
06-20 09:53:07.558 28884 28932 E flutter : 	at u6.b.a(Unknown Source:2)
06-20 09:53:07.558 28884 28932 E flutter : 	at v2.a0.run(Unknown Source:21)
06-20 09:53:07.558 28884 28932 E flutter : 	at android.os.Handler.handleCallback(Handler.java:959)
06-20 09:53:07.558 28884 28932 E flutter : 	at android.os.Handler.dispatchMessage(Handler.java:100)
06-20 09:53:07.558 28884 28932 E flutter : 	at android.os.Looper.loopOnce(Looper.java:232)
06-20 09:53:07.558 28884 28932 E flutter : 	at android.os.Looper.loop(Looper.java:317)
06-20 09:53:07.558 28884 28932 E flutter : 	at android.app.ActivityThread.main(ActivityThread.java:8623)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.lang.reflect.Method.invoke(Native Method)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.android.internal.os.ExecInit.main(ExecInit.java:50)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
06-20 09:53:07.558 28884 28932 E flutter : Caused by: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.FirebaseMessaging.c(Unknown Source:66)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.FirebaseMessaging.q(Unknown Source:0)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.q.run(Unknown Source:4)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
06-20 09:53:07.558 28884 28932 E flutter : 	at h2.c.run(Unknown Source:6)
06-20 09:53:07.558 28884 28932 E flutter : 	at java.lang.Thread.run(Thread.java:1012)
06-20 09:53:07.558 28884 28932 E flutter : Caused by: java.util.concurrent.ExecutionException: java.io.IOException: MISSING_INSTANCEID_SERVICE
06-20 09:53:07.558 28884 28932 E flutter : 	at v2.o.g(Unknown Source:31)
06-20 09:53:07.558 28884 28932 E flutter : 	at v2.o.a(Unknown Source:31)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.FirebaseMessaging.c(Unknown Source:54)
06-20 09:53:07.558 28884 28932 E flutter : 	... 9 more
06-20 09:53:07.558 28884 28932 E flutter : Caused by: java.io.IOException: MISSING_INSTANCEID_SERVICE
06-20 09:53:07.558 28884 28932 E flutter : 	at v1.c.a(Unknown Source:39)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.b0.i(Unknown Source:5)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.b0.d(Unknown Source:13)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.FirebaseMessaging.p(Unknown Source:2)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.u.start(Unknown Source:6)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.s0.a(Unknown Source:84)
06-20 09:53:07.558 28884 28932 E flutter : 	at com.google.firebase.messaging.FirebaseMessaging.c(Unknown Source:50)
06-20 09:53:07.558 28884 28932 E flutter : 	... 9 more
06-20 09:53:07.558 28884 28932 E flutter : , null)
06-20 09:53:07.558 28884 28932 E flutter : #0      PushHostApi.getToken (package:push_platform_interface/src/serialization/push_api.dart:309)
06-20 09:53:07.558 28884 28932 E flutter : <asynchronous suspension>
06-20 09:53:07.558 28884 28932 E flutter : #1      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:940)
06-20 09:53:07.558 28884 28932 E flutter : <asynchronous suspension>
06-20 09:53:07.558 28884 28932 E flutter : #2      DebugScreen.build.<anonymous closure> (package:enmeshed/drawer/debug_screen.dart:35)
06-20 09:53:07.558 28884 28932 E flutter : <asynchronous suspension>
06-20 09:53:07.558 28884 28932 E flutter : 

To Reproduce
Steps to reproduce the behavior:

  1. Use a phone without Google Play services (e.g. one with LineageOS or GrapheneOS and don't manually install them)
  2. Start the app
  3. Accept the request for camera usage (or don't, it doesn't matter)
  4. See error

Expected behavior
At the very least an error message explaining the situation should appear.
Further than that, I would very much expect the app to also work without Google Play services; e.g. by receiving notifications via polling.
In an ideal world the app would also support UnifiedPush, but I guess that's a feature request and not a bug.

Screenshots
screenshot

Environment

  • Product: App
  • Version: 3.0.3
  • Device: Pixel 6a
  • OS: Android 14 (GrapheneOS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions