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

MissingPluginException: MissingPluginException(No implementation found for method listen on channel pushwoosh/receive) #51

Open
paulononaka opened this issue May 30, 2022 · 2 comments
Labels

Comments

@paulononaka
Copy link

Hello,

Sometimes we are getting a MissingPluginException even though everything else seems to work fine.

Screen Shot 2022-05-30 at 11 17 19

It may be related to #50 because I noticed from the logs registerForPushNotifications never finished, so I am wondering if I should call Pushwoosh.getInstance.onPushReceived.listen only after registerForPushNotifications has finished (although pls notice that sometimes doesn't ever finish sometimes + pls notice that your Flutter docs doesn't say that).

Thanks!

@wfhm wfhm added the 69303 label May 30, 2022
@wfhm
Copy link
Member

wfhm commented May 31, 2022

It looks like the plugin hasn't been registered on the platform side. A few questions:

  1. Does it fail on iOS, Android, or both?
  2. Have you executed flutter run targeting that platform since you changed the pubspec file? This is needed to have Flutter inject plugin dependencies into the platform-specific parts of your app. Please note that hot restart/hot reload is not enough to trigger the injection.
  3. Does the GeneratedPluginRegistrant file that flutter run should have generated in your project contain a line registering the Pushwoosh plugin?
  4. Does your AppDelegate.m (iOS) or MainActivity.java (Android) contain a call to GeneratedPluginRegistrant asking it to register itself? Those calls should be made from the app launch method (application:didFinishLaunchingWithOptions: on iOS, onCreate on Android) as exemplified below:

Android:

class MainActivity(): FlutterActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    GeneratedPluginRegistrant.registerWith(this) // this is the line in question
  }
}

For iOS, please refer to this example.

@SimonErich
Copy link

Hello,

We have a similar problem. We got 8000 exceptions in Crashlytics and have tried adding your code, but as far as I could find out, it is not necessary anymore to do this. ( https://firebase.flutter.dev/docs/messaging/overview#3-android-integration )

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError
MissingPluginException(No implementation found for method listen on channel pushwoosh/accept). Error thrown Instance of 'ErrorDescription'.
MethodChannel._invokeMethod (platform_channel.dart:294)
EventChannel.receiveBroadcastStream.<fn> (platform_channel.dart:637)

Or is this still needed?
If so, can you please provide the correct imports as well, because I am getting errors if I try to do it this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants