Comments (5)
@mehdok
Possible solution is to change:
func registerPlugins(registry: FlutterPluginRegistry) -> () {
GeneratedPluginRegistrant.register(with: registry)
}
to:
func registerPlugins(registry: FlutterPluginRegistry) -> () {
if (!registry.hasPlugin("BackgroundLocatorPlugin")) {
GeneratedPluginRegistrant.register(with: registry)
}
}
in AppDelegate.swift
from background_locator.
@mehdok
Possible solution is to change:func registerPlugins(registry: FlutterPluginRegistry) -> () { GeneratedPluginRegistrant.register(with: registry) }
to:
func registerPlugins(registry: FlutterPluginRegistry) -> () { if (!registry.hasPlugin("BackgroundLocatorPlugin")) { GeneratedPluginRegistrant.register(with: registry) } }
in
AppDelegate.swift
This should go in the docs
from background_locator.
2020-05-22 17:12:58.518191-0500 Runner[3541:195103] *** Assertion failure in -[FlutterEngine registrarForPlugin:], ../../flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm:673
2020-05-22 17:12:58.519224-0500 Runner[3541:195103] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate plugin key: BackgroundLocatorPlugin'
*** First throw call stack:
(0x1922cd794 0x191fefbcc 0x1921d082c 0x19260816c 0x104a3541c 0x10464cc70 0x10464d29c 0x10464d4e8 0x10a63355c 0x10a6320c4 0x104abf310 0x104a5611c 0x104aaf92c 0x104a669c8 0x104a68d2c 0x19224c274 0x19224bf90 0x19224b66c 0x19224667c 0x192245ce8 0x19c39038c 0x196374444 0x10464d930 0x1920cd8f0)
libc++abi.dylib: terminating with uncaught exception of type NSException
from background_locator.
Just hit the same issue.
@mehdok To reproduce just run the example and perform an Hot Reload.
xcode output:
2020-05-23 20:21:47.538576+0200 Runner[87409:896245] *** Assertion failure in -[FlutterEngine registrarForPlugin:], ../../flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm:673
2020-05-23 20:21:47.571628+0200 Runner[87409:896245] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate plugin key: BackgroundLocatorPlugin'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3cf0e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3cc88 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff258b8bd2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 Flutter 0x0000000107d9e3a8 -[FlutterEngine registrarForPlugin:] + 320
5 Runner 0x0000000107b1f660 +[GeneratedPluginRegistrant registerWithRegistry:] + 80
6 Runner 0x0000000107b1f79a $s6Runner15registerPlugins8registryySo21FlutterPluginRegistry_p_tF + 58
7 Runner 0x0000000107b1f9ce $s6Runner15registerPlugins8registryySo21FlutterPluginRegistry_p_tFTo + 30
8 background_locator 0x0000000109f7ea46 -[BackgroundLocatorPlugin startLocatorService:] + 790
9 background_locator 0x0000000109f7d5bf -[BackgroundLocatorPlugin handleMethodCall:result:] + 319
10 Flutter 0x0000000107e2bb1f __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
11 Flutter 0x0000000107dba762 _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166
12 Flutter 0x0000000107dbe8ba _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38
13 Flutter 0x0000000107e257fb _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_32NS_9allocatorIS8_EEFvvEEclEv + 57
14 Flutter 0x0000000107dcf3a7 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 117
15 Flutter 0x0000000107dd42f4 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
16 CoreFoundation 0x00007fff23da14b4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
17 CoreFoundation 0x00007fff23da114e __CFRunLoopDoTimer + 1038
18 CoreFoundation 0x00007fff23da07aa __CFRunLoopDoTimers + 282
19 CoreFoundation 0x00007fff23d9b3fe __CFRunLoopRun + 1950
20 CoreFoundation 0x00007fff23d9a944 CFRunLoopRunSpecific + 404
21 GraphicsServices 0x00007fff38ba6c1a GSEventRunModal + 139
22 UIKitCore 0x00007fff48c8b9ec UIApplicationMain + 1605
23 Runner 0x0000000107b1fd78 main + 72
24 libdyld.dylib 0x00007fff51a231fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
from background_locator.
Thank you! It's help!
from background_locator.
Related Issues (20)
- iOS app taking battery high usage HOT 1
- error on launching example app HOT 3
- Restart service on device reboot is not working on android 12
- İOS : Data Null HOT 1
- How can I send data from location callback to controller? HOT 1
- location_callback_handler.dart not found when run release project HOT 5
- [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'package:untitled/location_callback_handler.dart' not found. HOT 4
- Unable to build flutter release version with background_locator lastest HOT 1
- Library Update
- Issue on release build HOT 8
- Unable to capture location in release mode (Android) HOT 4
- Unable to run on iOS
- Error java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient HOT 1
- Error on init app flutter with carp_background_location HOT 5
- java.lang.IncompatibleClassChangeError: The method 'com.google.android.gms.tasks.Task com.google.android.gms.location.FusedLocationProviderClient.requestLocationUpdates(com.google.android.gms.location.LocationRequest, com.google.android.gms.location.LocationCallback, android.os.Looper)' was expected to be of type virtual but instead was found to be of type interface (declaration of 'rekab.app.background_locator.provider.GoogleLocationProviderClient' appears in /data/app/com.doa.lojisoft.saray-JqLCd0a12SEpAYQu6cUZjg==/base.apk:classes2.dex) HOT 2
- Service stopped suddenly in release mode android
- Data type mismatch (nullable type) and method implementation error in kotlin code just after adding the dependency HOT 1
- [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument: is a regular instance: Instance of 'LocationDto'
- What is speed measured in?
- How to stop service after a period of time?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from background_locator.