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

location_platform_interface error on 5.0.1 #867

Closed
keskink opened this issue Jul 30, 2023 · 8 comments
Closed

location_platform_interface error on 5.0.1 #867

keskink opened this issue Jul 30, 2023 · 8 comments

Comments

@keskink
Copy link

keskink commented Jul 30, 2023

I am getting error as below.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type '_Map<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>' in type cast

E/flutter ( 3721): #0 MethodChannelLocation.onLocationChanged. (package:location_platform_interface/src/method_channel_location.dart:146)
E/flutter ( 3721): #1 _MapStream._handleData (dart:async/stream_pipe.dart:213)
E/flutter ( 3721): #2 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153)
E/flutter ( 3721): #3 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594)
E/flutter ( 3721): #4 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339)
E/flutter ( 3721): #5 _DelayedData.perform (dart:async/stream_impl.dart:515)
E/flutter ( 3721): #6 _PendingEvents.handleNext (dart:async/stream_impl.dart:620)
E/flutter ( 3721): #7 _PendingEvents.schedule. (dart:async/stream_impl.dart:591)
E/flutter ( 3721): #8 _microtaskLoop (dart:async/schedule_microtask.dart:40)
E/flutter ( 3721): #9 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
E/flutter ( 3721):

@keskink keskink changed the title location_platform_interface error location_platform_interface error on 5.0.1 Jul 30, 2023
@komaxx
Copy link

komaxx commented Jul 31, 2023

Same here :/

@bhanuka96
Copy link

Same issue.

@komaxx
Copy link

komaxx commented Aug 1, 2023

This is probably a duplicate of #863

@YassineChe
Copy link

Same issue!!!

@fabiolindemberg
Copy link

I'm still facing this error as well, here is additional information, I hope it helps.

[CoreLocation] This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.

Maybe the message above is the real reason why the routine is failing. This is happening during the execution of the method: Location.instance.enableBackgroundMode(). I guess it will be necessary to ensure it runs in a secondary thread.

@komaxx
Copy link

komaxx commented Aug 3, 2023

@fabiolindemberg That sounds like a different issue, I think.
I've observed the encoding decoding issues on Android. My guess is that the issue is somewhere in the Dart layer of the plugin - at least, that's how this Map type mismatch looks to me.

@KonstantinRr
Copy link

I’m having the same issue on iOS.

@bartekpacia
Copy link
Collaborator

Duplicate of #863.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants