Flutterlocation: NullPointerException

Created on 5 Jan 2021  路  6Comments  路  Source: Lyokone/flutterlocation

Describe the bug
I have an exception in my crashlytics:

Caused by java.lang.NullPointerException
Parameter specified as non-null is null: method i.w.d.i.c, parameter activity
com.lyokone.location.FlutterLocationService.checkBackgroundPermissions

com.lyokone.location.FlutterLocationService.checkBackgroundPermissions (FlutterLocationService.java)
com.lyokone.location.LocationPlugin.access$000 (LocationPlugin.java)
com.lyokone.location.LocationPlugin.detachActivity (LocationPlugin.java)
com.lyokone.location.LocationPlugin.onDetachedFromActivity (LocationPlugin.java)
io.flutter.embedding.engine.FlutterEngineConnectionRegistry.detachFromActivity (FlutterEngineConnectionRegistry.java)
io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach (FlutterActivityAndFragmentDelegate.java)
io.flutter.embedding.android.FlutterActivity.release (FlutterActivity.java)
io.flutter.embedding.android.FlutterActivity.onDestroy (FlutterActivity.java)

Could you fix it please?

Tested on:

  • Nexus 5X

All 6 comments

It is fixed in this pull request but there is no new version on pub.dev
https://github.com/Lyokone/flutterlocation/pull/465

@miroslavkudrnac when will be a new version released for this fix ?

@miroslavkudrnac when will be a new version released for this fix ?

I don't know I'm not a maintainer. You can use this lib from source and to pubspec.yaml add

location:
path: dependencies/flutterlocation/location

The problem is still happening on xiaomi, when I request getLocation multiple times.

I noticed this error in my production app as well, since I upgraded to the new version. Probably time to downgrade again and wait for a new version.

maybe this issue could be closed since 3.2.4 has been released

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LinusU picture LinusU  路  3Comments

zeienko-vitalii picture zeienko-vitalii  路  7Comments

lehno picture lehno  路  5Comments

KingWu picture KingWu  路  11Comments

RomanJos picture RomanJos  路  4Comments