You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to flutter and writing the function for receiving notification on both iOS and Android platform. I achieved this function and it was working well but these days I got an issue:
FLTFirebaseMessaging: An error occurred while calling method Messaging#getToken, errorOrNil => {
}
FLTFirebaseMessaging: An error occurred while calling method Messaging#subscribeToTopic, errorOrNil => {
}
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: [firebase_messaging/unknown] An unknown error has occurred.
#0 MethodChannelFirebaseMessaging.getToken (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:229:7)
<asynchronous suspension>
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: [firebase_messaging/unknown] An unknown error has occurred.
#0 MethodChannelFirebaseMessaging.subscribeToTopic (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:371:7)
<asynchronous suspension>
This only happened on iOS platform (Android is working well), I have tried to find the reason so I rollback to previous commit and I can see this happened after I added Push Notification and Background Modes capabilities to Runner Target, but these two are the main cores for receiving notification on iOS platforms. :3. I also tried to remove these two capabilities, the error still exit, so it is very confusing.
Any suggestions would be appreciated!
Here is Flutter Doctor -v
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.5.1 20G80 darwin-arm, locale en-AU)
• Flutter version 2.8.1 at /Applications/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/bpc/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• 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 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.63.2)
• VS Code at /Users/bpc/Downloads/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello World,
I am new to flutter and writing the function for receiving notification on both iOS and Android platform. I achieved this function and it was working well but these days I got an issue:
This only happened on iOS platform (Android is working well), I have tried to find the reason so I rollback to previous commit and I can see this happened after I added Push Notification and Background Modes capabilities to Runner Target, but these two are the main cores for receiving notification on iOS platforms. :3. I also tried to remove these two capabilities, the error still exit, so it is very confusing.
Any suggestions would be appreciated!
Here is Flutter Doctor -v
Here is the code
And I am using
firebase_messaging: ^11.2.5
Beta Was this translation helpful? Give feedback.
All reactions