Open XeroDays opened 2 years ago
mostly : [Unhandled Exception: NoSuchMethodError: sometimes : failed to attach to thread flutter
[Unhandled Exception: NoSuchMethodError:
failed to attach to thread flutter
path_provider: ^2.0.9
pubspec.yaml
use the following as background method.
static Future<dynamic> myBackgroundMessageHandler(SmsMessage message) async { print("onBackgroundMessage: " + message.body!); await getExternalStorageDirectory() return Future<void>.value(); }
The error occurs when using this dependency : path_provider: ^2.0.9 I don't know why is is happening but i removed this dependency and replace it with external_path: ^1.0.1
external_path: ^1.0.1
now everything works fine!
Error:
mostly :
[Unhandled Exception: NoSuchMethodError:
sometimes :failed to attach to thread flutter
How to Recreate?
path_provider: ^2.0.9
inpubspec.yaml
use the following as background method.