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] v8.0.0-dev.1 Error: cannot find symbol Tasks.await(firebaseMessaging.deleteToken()); #3944

Closed
LasseRosenow opened this issue Oct 23, 2020 · 9 comments · Fixed by #4012
Labels
plugin: messaging type: crash A compile error or crash

Comments

@LasseRosenow
Copy link

LasseRosenow commented Oct 23, 2020

Bug report

Describe the bug
Since firebase_messaging 8.0.0-dev.1 I get the following error message:

Additional context

C:\Users\Lasse\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-8.0.0-dev.1\android\src\main\java\io\flutter\plugins\firebase\messaging\FlutterFirebaseMessagingPlugin.java:142: error: cannot find symbol
          Tasks.await(firebaseMessaging.deleteToken());
                                       ^
  symbol:   method deleteToken()
  location: variable firebaseMessaging of type FirebaseMessaging
C:\Users\Lasse\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-8.0.0-dev.1\android\src\main\java\io\flutter\plugins\firebase\messaging\FlutterFirebaseMessagingPlugin.java:153: error: cannot find symbol
          return Tasks.await(firebaseMessaging.getToken());
                                              ^
  symbol:   method getToken()
  location: variable firebaseMessaging of type FirebaseMessaging
@LasseRosenow LasseRosenow added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 23, 2020
@LasseRosenow LasseRosenow changed the title 🐛 [PLUGIN_NAME_HERE] Your issue title here 🐛 [firebase_messaging] Error: cannot find symbol Tasks.await(firebaseMessaging.deleteToken()); Oct 23, 2020
@LasseRosenow LasseRosenow changed the title 🐛 [firebase_messaging] Error: cannot find symbol Tasks.await(firebaseMessaging.deleteToken()); 🐛 [firebase_messaging] v8.0.0-dev.1 Error: cannot find symbol Tasks.await(firebaseMessaging.deleteToken()); Oct 23, 2020
@BeshoyMelika
Copy link

I have the same error

@markusaksli-nc
Copy link
Contributor

Reproducible on latest flutter master 1.24.0-4.0.pre.57.

flutter doctor -v
[√] Flutter (Channel master, 1.24.0-4.0.pre.57, on Microsoft Windows [Version 10.0.19041.572], locale en-US)
    • Flutter version 1.24.0-4.0.pre.57 at C:\Development\flutter_master
    • Framework revision fdac8a9d1f (11 hours ago), 2020-10-25 19:47:02 -0400
    • Engine revision d4a3c9c471
    • Dart version 2.11.0 (build 2.11.0-256.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\marku\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6858069\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.6.30320.27
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6858069
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
    • IntelliJ at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\203.4818.26
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (5 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)           • windows       • windows-x64    • Microsoft Windows [Version 10.0.19041.572]
    • Web Server (web)            • web-server    • web-javascript • Flutter Tools
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 86.0.4240.111
    • Edge (web)                  • edge          • web-javascript • Microsoft Edge 86.0.622.38

• No issues found!
Logs
[ +182 ms] > Task :firebase_messaging:compileDebugJavaWithJavac FAILED
[   +1 ms] C:\Users\marku\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-8.0.0-dev.1\android\src\main\java\io\flutter\plugins\firebase\messaging\FlutterFirebaseMessagingPlugin.java:142: error: cannot find symbol
[        ]           Tasks.await(firebaseMessaging.deleteToken());
[        ]                                        ^
[        ]   symbol:   method deleteToken()
[        ]   location: variable firebaseMessaging of type FirebaseMessaging
[        ] C:\Users\marku\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\firebase_messaging-8.0.0-dev.1\android\src\main\java\io\flutter\plugins\firebase\messaging\FlutterFirebaseMessagingPlugin.java:153: error: cannot find symbol
[        ]           return Tasks.await(firebaseMessaging.getToken());
[        ]                                               ^
[        ]   symbol:   method getToken()
[        ]   location: variable firebaseMessaging of type FirebaseMessaging
[        ] Note: Some input files use or override a deprecated API.
[        ] Note: Recompile with -Xlint:deprecation for details.
[        ] 2 errors
[        ] FAILURE: Build failed with an exception.
[        ] * What went wrong:
[        ] Execution failed for task ':firebase_messaging:compileDebugJavaWithJavac'.

@markusaksli-nc markusaksli-nc added plugin: messaging type: crash A compile error or crash and removed Needs Attention This issue needs maintainer attention. labels Oct 26, 2020
@ghost
Copy link

ghost commented Oct 27, 2020

Same error on 1.24.0-4.0.pre.81

@markusaksli-nc markusaksli-nc removed the type: bug Something isn't working label Oct 27, 2020
@LasseRosenow
Copy link
Author

This bug is resolved in dev.2

@diegogarciar
Copy link
Contributor

@lazylazyllama I'm still having the same error on dev.2


/Users/diego/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-8.0.0-dev.2/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java:148: error: cannot find symbol
          Tasks.await(firebaseMessaging.deleteToken());
                                       ^
  symbol:   method deleteToken()
  location: variable firebaseMessaging of type FirebaseMessaging
/Users/diego/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-8.0.0-dev.2/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java:159: error: cannot find symbol
          return Tasks.await(firebaseMessaging.getToken());
                                              ^
  symbol:   method getToken()
  location: variable firebaseMessaging of type FirebaseMessaging

@LasseRosenow
Copy link
Author

Did you update all your firebase dependencies?

I think you also have to update firebase_core etc.

@diegogarciar
Copy link
Contributor

solved thanks!

@diegogarciar
Copy link
Contributor

diegogarciar commented Oct 30, 2020

@lazylazyllama can I ask you a question out of scope?
I'm creating a VOIP Plugin and need to intercept incoming FCM messages (to show calling activity on background). The VOIP example suggests creating a FirebaseMessagingService but this plugin already has one.

Is it ok to declare my own FirebaseMessagingService?, I'm not sure if its actually registering both services or if I'm overriding the plugin's. I see that in this version it's empty, on version 7 I had to copy this plugin's FirebaseMessagingService and added my own as I had stopped receiving notification messages on flutter.

Thanks in advance!
you can also reach my at [email protected]

@LasseRosenow
Copy link
Author

I'm sorry, but I don't have a answer for that use case. I suggest you open a new issue, so that the firebase maintainer can help you there

@firebase firebase locked and limited conversation to collaborators Nov 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: messaging type: crash A compile error or crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants