Skip to content

firebase_messaging - deleteInstanceID crashes #33265

@sandaru1

Description

@sandaru1

The deleteInstanceID method fails in Android. I'm using firebase_messaging 5.0.1+1.

The steps to reproduce are quite simple, just call the method. The method implementation calls the "result.success" function inside a non-UI thread which crashes the entire app.

java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Thread-16
    at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
    at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:556)
    at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:131)
    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
    at io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin$3.run(FirebaseMessagingPlugin.java:151)
    at java.lang.Thread.run(Thread.java:764)`

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions