Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[firebase_messaging] getToken, error fetching instanceID: AUTHENTICATION_FAILED #1466

Closed
fabianogadenz opened this issue Nov 20, 2019 · 8 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. type: bug Something isn't working

Comments

@fabianogadenz
Copy link

fabianogadenz commented Nov 20, 2019

Hello everyone, I have problems with firebase_messaging: ^ 5.1.8. No emulator (Nexus 5x API 29 x86) works normally, but on a real device I get the error:

logs
E/FirebaseInstanceId(28179): Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
I/flutter (28179): entrou
W/FirebaseMessagingPlugin(28179): getToken, error fetching instanceID: 
W/FirebaseMessagingPlugin(28179): java.io.IOException: AUTHENTICATION_FAILED
W/FirebaseMessagingPlugin(28179): 	at com.google.firebase.iid.zzl.zza(com.google.firebase:firebase-iid@@20.0.0:67)
W/FirebaseMessagingPlugin(28179): 	at com.google.firebase.iid.zzl.zza(com.google.firebase:firebase-iid@@20.0.0:80)
W/FirebaseMessagingPlugin(28179): 	at com.google.firebase.iid.zzp.then(com.google.firebase:firebase-iid@@20.0.0:4)
W/FirebaseMessagingPlugin(28179): 	at com.google.android.gms.tasks.zzd.run(Unknown Source:5)
W/FirebaseMessagingPlugin(28179): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/FirebaseMessagingPlugin(28179): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/FirebaseMessagingPlugin(28179): 	at java.lang.Thread.run(Thread.java:764)
E/flutter (28179): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Invalid argument(s)
E/flutter (28179): #0      _StringBase.+ (dart:core-patch/string_patch.dart:263:57)
E/flutter (28179): #1      PushNotificationData.enviaInfo.<anonymous closure> (package:coopercredi_rural/data/push_notification_data.dart:15:27)
E/flutter (28179): #2      _rootRunUnary (dart:async/zone.dart:1132:38)
E/flutter (28179): #3      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (28179): #4      _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
E/flutter (28179): #5      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
E/flutter (28179): #6      Future._propagateToListeners (dart:async/future_impl.dart:707:32)
E/flutter (28179): #7      Future._completeWithValue (dart:async/future_impl.dart:522:5)
E/flutter (28179): #8      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
E/flutter (28179): #9      _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
E/flutter (28179): #10     FirebaseMessaging.getToken (package:firebase_messaging/firebase_messaging.dart)
E/flutter (28179): <asynchronous suspension>
E/flutter (28179): #11     PushNotificationData.enviaInfo (package:coopercredi_rural/data/push_notification_data.dart:13:18)
E/flutter (28179): <asynchronous suspension>
E/flutter (28179): #12     LoginData.fazerLogin (package:coopercredi_rural/data/login_data.dart:23:33)
E/flutter (28179): <asynchronous suspension>
E/flutter (28179): #13     _LoginScreenState.cardsLogin.<anonymous closure> (package:coopercredi_rural/screens/login/login_screen.dart:167:37)
E/flutter (28179): <asynchronous suspension>
E/flutter (28179): #14     _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:654:14)
E/flutter (28179): #15     _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:729:32)
E/flutter (28179): #16     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter (28179): #17     TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:365:11)
E/flutter (28179): #18     TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:312:7)
E/flutter (28179): #19     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (28179): #20     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
E/flutter (28179): #21     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter (28179): #22     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (28179): #23     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (28179): #24     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (28179): #25     _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter (28179): #26     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (28179): #27     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter (28179): #28     _invoke1 (dart:ui/hooks.dart:263:10)
E/flutter (28179): #29     _dispatchPointerDataPacket (dart:ui/hooks.dart:172:5)

Very strange, I find no solution anywhere.

@fabianogadenz fabianogadenz added the type: bug Something isn't working label Nov 20, 2019
@iapicca
Copy link

iapicca commented Nov 20, 2019

Hi @fabianogadenz
could you please provide your updated flutter doctor -v?
Thank you

@fabianogadenz
Copy link
Author

[√] Flutter (Channel stable, v1.9.1+hotfix.4, on Microsoft Windows [versão 10.0.18362.476], locale pt-BR)
    • Flutter version 1.9.1+hotfix.4 at C:\src\flutter\flutter
    • Framework revision cc949a8e8b (8 weeks ago), 2019-09-27 15:04:59 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Fabiano\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.39.2)
    • VS Code at C:\Users\Fabiano\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.6.0

[√] Connected device (2 available)
    • SM J260M                  • 42006a1ed26c36af • android-arm • Android 8.1.0 (API 27)
    • Android SDK built for x86 • emulator-5554    • android-x86 • Android 10 (API 29) (emulator)

• No issues found!

@iapicca iapicca added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 20, 2019
@fabianogadenz
Copy link
Author

I tested in 4 situations:

  • Emulator (Nexus 5x API 29 x86)
  • Samsung J2 Android 8.1
  • Motorola G5s Android 8.1
  • Samsung J8 Android 9.0

On samsung J2 I get the error, on other devices I have this problem

@fabianogadenz
Copy link
Author

The error persisted, I did not find any information on the internet that could solve my problem.

I tried several possibilities, as well as going back to the original plugin I was using, Onesignal.

Finally, I decided to format my phone to factory version and it didn't work out? Will understand!!!

@fabianogadenz
Copy link
Author

the issue will be open because I see this as a problem to be solved or explained

@iapicca iapicca changed the title getToken, error fetching instanceID: AUTHENTICATION_FAILED [firebase_messaging] getToken, error fetching instanceID: AUTHENTICATION_FAILED Jan 28, 2020
@iapicca
Copy link

iapicca commented Jan 28, 2020

Hi @fabianogadenz
are you still experiencing the issue with the latest stable version of flutter
and the latest version of firebase_messaging?
thank you

@iapicca iapicca added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jan 28, 2020
@fabianogadenz
Copy link
Author

Hi @iapicca.
The error is no longer occurring, the solution was to format my cell phone.

@iapicca
Copy link

iapicca commented Feb 12, 2020

Hi @fabianogadenz
I didn't see that coming :)
thank you for letting me know

@iapicca iapicca closed this as completed Feb 12, 2020
@firebase firebase locked and limited conversation to collaborators Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants