Open vineetpandit90 opened 2 years ago
same problem here Device: Samsung SM-G781W
Any idea if and when this will be fixed ? right now the package is useless..
Not working on android 13 also. Is this because anything change in google privacy policy?
The same crash is reported in our Firebase crashlytics Dashboard.
Crash Log -
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(ERROR_START_SMS_RETRIEVER, Can't start sms retriever, null, null)
at StandardMethodCodec.decodeEnvelope(message_codecs.dart:652)
at MethodChannel._invokeMethod(platform_channel.dart:310)
at SmsAutoFill.listenForCode(sms_autofill.dart:35)
Usually, a PlatformException crash comes when the platform interaction fails.
As the crash crash begins from the below line - https://github.com/jaumard/sms_autofill/blob/master/lib/sms_autofill.dart#L35
The above code should be wrapped inside a try-catch block as it is communicating with the platform.
try {
await _channel.invokeMethod('listenForCode',
<String, String>{'smsCodeRegexPattern': smsCodeRegexPattern});
} on PlatformException catch (e) {
// handle PlatformException here
}
reference - https://docs.flutter.dev/platform-integration/platform-channels?tab=type-mappings-kotlin-tab#example-client
Please let us know once the fix is available.
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError PlatformException(ERROR_START_SMS_RETRIEVER, Can't start sms retriever, null, null). Error thrown null. StandardMethodCodec.decodeEnvelope (message_codecs.dart:607)
MethodChannel._invokeMethod (platform_channel.dart:177) SmsAutoFill.listenForCode (sms_autofill.dart:35)