Everything was fine until the last Flutter upgrade to beta 2.0.1 (same as current stable I think).
Now I suddenly get this message during init of the firebase messaging.
NoSuchMethodError: No top-level getter '_registerPlugins' declared.
Receiver: top-level
Tried calling: _registerPlugins
This error is triggered by calling:
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
Down the call path this calls:
package: firebase_messaging_platform_interface-1.0.0-dev.10
file : method_channel_messaging.dart:
await channel.invokeMapMethod('Messaging#startBackgroundIsolate', {
'pluginCallbackHandle': bgHandle.toRawHandle(),
'userCallbackHandle': userHandle.toRawHandle(),
});
That ends up in:
package: flutter
file : platform_channel.dart:
final ByteData? result = await binaryMessenger.send(
name,
codec.encodeMethodCall(MethodCall(method, arguments)),
);
Seems like the exception is thrown here...
Those are the messages it generates in my console. Nothing that indicates a problem I think:
I/FLTFireBGExecutor( 8226): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling]
D/EGL_emulation( 8226): eglCreateContext: 0xe3b20600: maj 2 min 0 rcv 2
D/EGL_emulation( 8226): eglCreateContext: 0xe3b206c0: maj 2 min 0 rcv 2
D/HostConnection( 8226): HostConnection::get() New Host Connection established 0xc4abc480, tid 8310
D/HostConnection( 8226): HostComposition ext
ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1
ANDROID_EMU_direct_mem
ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2
ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands
ANDROID_EMU_vulkan_null_optional_strings
ANDROID_EMU_vulkan_create_resources_with_requirements
ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer
ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync
ANDROID_EMU_vulkan_shader_float16_int8
ANDROID_EMU_vulkan_async_queue_submit GL_OES_vertex_array_object
GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing
ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_2
D/EGL_emulation( 8226): eglMakeCurrent: 0xe3b206c0: ver 2 0 (tinfo 0xe3bb0b50)
>>> At this moment the exception is thrown <<<
I/FLTFireMsgService( 8226): FlutterFirebaseMessagingBackgroundService started!
Does anybody have any suggestions?