sms_autofill icon indicating copy to clipboard operation
sms_autofill copied to clipboard

listenForCode() throw platform exception after upgrading flutter 3.7.7

Open Osama0habib opened this issue 1 year ago • 7 comments

listenForCode() throw platform exception after upgrading flutter 3.7.7

this issue happens only on api 33 "i tested it on api 32 and api 29 it works fine without any issues" i edited onrecivefailed method to show the exception

E/flutter ( 8714): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(ERROR_START_SMS_RETRIEVER, Can't start sms retriever, com.google.android.gms.common.api.ApiException: 17: Device doesn't support the messaging feature E/flutter ( 8714): at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(com.google.android.gms:play-services-base@@18.0.1:4) E/flutter ( 8714): at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(com.google.android.gms:play-services-base@@18.0.1:1) E/flutter ( 8714): at com.google.android.gms.internal.auth-api-phone.zzz.zzb(com.google.android.gms:play-services-auth-api-phone@@17.5.1:1) E/flutter ( 8714): at com.google.android.gms.internal.auth-api-phone.zzi.zza(com.google.android.gms:play-services-auth-api-phone@@17.5.1:2) E/flutter ( 8714): at com.google.android.gms.internal.auth-api-phone.zzb.onTransact(com.google.android.gms:play-services-auth-api-phone@@17.5.1:3) E/flutter ( 8714): at android.os.Binder.execTransactInternal(Binder.java:1285) E/flutter ( 8714): at android.os.Binder.execTransact(Binder.java:1244) E/flutter ( 8714): , null) E/flutter ( 8714): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7) E/flutter ( 8714): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315:18) E/flutter ( 8714): E/flutter ( 8714): #2 SmsAutoFill.listenForCode (package:sms_autofill/sms_autofill.dart:35:5) E/flutter ( 8714):

that was the exception that been logged for me i hope you find a solution to migrate with latest flutter or dart sdk versions

Osama0habib avatar Mar 14 '23 17:03 Osama0habib

same issue

xang555 avatar Mar 25 '23 07:03 xang555

Same issue here

AlmogAttal avatar Mar 26 '23 05:03 AlmogAttal

Same Issue Here

SubrotaDebnath avatar Mar 30 '23 06:03 SubrotaDebnath

any update on this ?

himsa avatar Apr 06 '23 13:04 himsa

Any update on this?

amit-onappr avatar Apr 09 '23 16:04 amit-onappr

Acctually i found that this is an google play services error or something .... That issue kept coming for me untill i changed the emulator with the same android api version Its gone then Also i was getting this error on my real device one day and another day its not happening it works perfectly am not sure what is it all about ... But for the quick fix try create another emulator or device

Osama0habib avatar Apr 09 '23 17:04 Osama0habib

you can use this package : https://pub.dev/packages/otp_pin_field

shivam0139 avatar Apr 20 '23 18:04 shivam0139

should be ok on 2.4.0

jaumard avatar Jun 07 '24 10:06 jaumard