flutter_foreground_task
flutter_foreground_task copied to clipboard
Crashing on Flutter 3.3.2 on both android and iOS
Hi, I have recently updated to flutter 3.3.2 and I'm using flutter_foreground_task: 3.9.0. As soon as foreground service starts my app is crashing. It's only happening in the release build
Here are the logs from local build:
E/FlutterGeolocator(27431): Geolocator position updates stopped D/FlutterGeolocator(27431): Stopping location service. W/FlutterJNI(27431): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 4
Here are the logs from Firebase Crashlytics:
Crashed: io.flutter.1.ui 0 libsystem_kernel.dylib 0x7964 __pthread_kill + 8 1 libsystem_pthread.dylib 0x7378 pthread_kill + 268 2 libsystem_c.dylib 0x1ff50 abort + 164 3 Flutter 0x583adc (Missing UUID 06c0b1046d24347198d4326e87347d68) 4 Flutter 0x5dfd50 (Missing UUID 06c0b1046d24347198d4326e87347d68) 5 Flutter 0x5e4fe8 (Missing UUID 06c0b1046d24347198d4326e87347d68) 6 Flutter 0x5c0b64 (Missing UUID 06c0b1046d24347198d4326e87347d68) 7 Flutter 0x5cc9e4 (Missing UUID 06c0b1046d24347198d4326e87347d68) 8 Flutter 0x3f29f4 (Missing UUID 06c0b1046d24347198d4326e87347d68) 9 Flutter 0x2f5e8c (Missing UUID 06c0b1046d24347198d4326e87347d68) 10 Flutter 0x2f91c4 (Missing UUID 06c0b1046d24347198d4326e87347d68) 11 CoreFoundation 0xae268 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 32 12 CoreFoundation 0x32c40 __CFRunLoopDoTimer + 1076 13 CoreFoundation 0x2d43c __CFRunLoopDoTimers + 328 14 CoreFoundation 0xbc58 __CFRunLoopRun + 1944 15 CoreFoundation 0x1f3b8 CFRunLoopRunSpecific + 600 16 Flutter 0x2f9094 (Missing UUID 06c0b1046d24347198d4326e87347d68) 17 Flutter 0x2f8a94 (Missing UUID 06c0b1046d24347198d4326e87347d68) 18 libsystem_pthread.dylib 0x19a4 _pthread_start + 148 19 libsystem_pthread.dylib 0xea0 thread_start + 8
Hello,
I have the same problem, with the same use case (geolocation) : it works fine in debug mode, but crashes with a Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. error on release build.
Has this issues been fixed ?
See : #116 : sending a map instead of custom object does the trick... It is still a bug.
See : #116 : sending a map instead of custom object does the trick... It is still a bug.
Can you tell me what to do when i want to send object of different class through sendport. In that case I can't parse the map because i won' t know the map belongs to which class.
You would probably serialise the object and parse it on receive, trying to parse it into one of the classes you would expect, or failing otherwise.