Description
2020-10-29 15:55:04.516 21144-21144/com.courieralliance.driverca.qa E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.courieralliance.driverca.qa, PID: 21144
java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference
at io.flutter.plugin.common.MethodChannel.setMethodCallHandler(MethodChannel.java:116)
at io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.onAttachedToEngine(FirebaseMessagingPlugin.java:60)
at io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(FirebaseMessagingPlugin.java:51)
at com.courieralliance.driverca.Application.registerWith(Application.java:29)
at com.transistorsoft.flutter.backgroundfetch.HeadlessTask.startBackgroundIsolate(HeadlessTask.java:150)
at com.transistorsoft.flutter.backgroundfetch.HeadlessTask.dispatch(HeadlessTask.java:101)
at com.transistorsoft.flutter.backgroundfetch.HeadlessTask.run(HeadlessTask.java:95)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Activity
[-]2020-10-29 11:38:47.669 6459-6459/com.courieralliance.driverca.qa W/FlutterEnginePluginRegistry: Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@b3b4285) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@e5e08da).[/-][+]W/FlutterEnginePluginRegistry: Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@b3b4285) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@e5e08da).[/+][-]W/FlutterEnginePluginRegistry: Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@b3b4285) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@e5e08da).[/-][+]PID: 21144 java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object referenceW/FlutterEnginePluginRegistry: Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@b3b4285) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@e5e08da).[/+][-]PID: 21144 java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object referenceW/FlutterEnginePluginRegistry: Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@b3b4285) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@e5e08da).[/-][+]PID: 21144 java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference[/+]saravananmnm commentedon Oct 29, 2020
When i kill the application by that time this issue occurred.
`
import io.flutter.app.FlutterApplication;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin;
import com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin;
import io.flutter.plugins.pathprovider.PathProviderPlugin;
import com.baseflow.geolocator.GeolocatorPlugin;
import rekab.app.background_locator.LocatorService;
import com.whelksoft.flutter_native_timezone.FlutterNativeTimezonePlugin;
import com.transistorsoft.flutter.backgroundfetch.BackgroundFetchPlugin;
public class Application extends FlutterApplication implements PluginRegistry.PluginRegistrantCallback {
}
`
darshankawar commentedon Oct 30, 2020
@saravananmnm
Is this an issue with Firebase plugin ? I can't seem to understand what exactly your issue is. You seem to have lot of 3rd party plugins in above comment.
Please provide
flutter doctor -v
and minimal code sample that shows the issue you are facing.[-]PID: 21144 java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference[/-][+]PID: 21144 java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler on a null object reference[/+]saravananmnm commentedon Oct 31, 2020
Yes @darshankawar.
i think this is a Backward compatibility issue with plugins (v1).
C:\Saravanan\Flutter_Sdk\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.18362.1082], locale en-IN)
• Flutter version 1.22.1 at C:\Saravanan\Flutter_Sdk\flutter
• Framework revision f30b7f4db9 (3 weeks ago), 2020-10-08 10:06:30 -0700
• Engine revision 75bef9f6c8
• Dart version 2.10.1
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 50.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Process finished with exit code 0
darshankawar commentedon Nov 4, 2020
@saravananmnm
Please use the issue template and provide all required details in it to properly analyze this issue. Current details you provided don't help much to proceed further.
Issue Template
PASTE OUTPUT INSIDE HERE
PASTE OUTPUT INSIDE HERE
google-oss-bot commentedon Nov 13, 2020
Hey @saravananmnm. 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!
google-oss-bot commentedon Nov 24, 2020
Since there haven't been any recent updates here, I am going to close this issue.
@saravananmnm 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.