-
Notifications
You must be signed in to change notification settings - Fork 4k
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] While .configurate "PlatformException(error, PluginRegistrantCallback is not set., null)" #248
Comments
Hello, |
This issue should be rename to |
Please help I have same problem . |
I still have this issue and it only works when I delete |
someone got any solution |
Same Issue. :( |
same issue. |
Any news? I am getting the same issue... Did anyone try lower versions of the plugin? |
Hello I followed the tutorial and had this problem. And the problem has now changed to: |
To solve the problem, I removed the cast I had placed on line 19 and used the FirebaseCloudMessagingPluginRegistrant.java class that I found at this link: And it worked perfectly in the background. |
@marceloiavenissi did you use the sendNotificationOnBackground dart function from the stackoverflow as your (onMessage, onBackgroundMessage, onLaunch, onResume) at top-lavel? |
No, just the same FirebaseCloudMessagingPluginRegistrant class But put as top-level was not relevant to: onMessage, onLaunch, onResume |
So I also took these classes from SO. They seem to work, but I still have one problem... Here is my dart code: `
` So at this point the callback triggers on background. However at build Process i am still getting an error: Am I doing something wrong here? Isn't it already top level or static? |
@oe19fyfa This is not wrong anyway. But how is your application.java and the manifest? |
So I have 3 files in my package: Application.java ,FirebaseCloudMessagingPluginRegistrant.java as mentioned in SO. I also have a MainActivity.java that i had prior to SO stuff.
` And here is my manifest, forgot to mention: `
` |
No errors were corrected when replacing GeneratedPluginRegistrant with FirebaseCloudMessagingPluginRegistrant on line 19 of the Application. |
hey guys, while following the guide on the package i also got the error. I referenced some code from over a year ago using the package and the following works inside initState:
` will at least get rid of the error, and should still allow your devices to receive notifications - at least on android. I havent tested on iOS. |
Piggybacking on this issue to point out that firebase_messaging does not properly support Flutter Android Embedding V2. This same error is thrown when the |
Same here, any solutions? Pls help Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.6 18G3020) |
Hello - please can you check whether this is an issue on the latest messaging plugin (6.0.13 at this time). Thanks, |
@ejprok In the end I switched to qrcode_reader, which worked for me. |
I have followed the code in the example app with a blank app from Flutter create (Flutter version: 1.12.13+hotfix.9 and with version 6.0.13) and I get the following error:
And the application just dies when receiving a notification (this is without setting the backgroundMessages handler). If I set it, then I get the following error on app initialization:
Any pointers? |
So, got it working by patching info from several sources. For some reason my MainActivity was in Kotlin, so the Application class needs to be in Kotlin as well. My Application.kt file looks like this:
Using solution from (#1613 (comment)). I also needed to add the following (per #1607 (comment)): in android/app/build.gradle |
This is still a very big issue clearly from researching the errors involved in registering the plugin on Android. Most users are hacking together from 10-20 sources and there is no definite answer to the problem. Can we get some updated documentation on this issue related to Kotlin? |
I have the same issue with latest version of the plugin |
Implementing this solved my problem. Be aware if you are a noob like me:
|
Hey @earyzhe. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @earyzhe if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Describe the bug
When trying to configure the Firebase Cloud Messaging an Exception is thrown.
PlatformException (PlatformException(error, PluginRegistrantCallback is not set., null))
To Reproduce
Call the configure function.
Stack Trance
Additional context
The repo is here
https://github.com/earyzhe/firebase_cloud_messaging_play
The text was updated successfully, but these errors were encountered: