Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app is getting crashed after getting otp #91

Open
roshanj655 opened this issue Apr 27, 2023 · 6 comments
Open

app is getting crashed after getting otp #91

roshanj655 opened this issue Apr 27, 2023 · 6 comments

Comments

@roshanj655
Copy link

My app is getting closed after read sms, I got the otp in console then app crashed

@faizalshap
Copy link
Owner

Please add Logs

@neoshaikhimran
Copy link

I am also facing same issue

@neoshaikhimran
Copy link

@faizalshap please update

@neoshaikhimran
Copy link

    <!-- <receiver android:name="com.rnhrapp.MySMSBroadcastReceiver" android:enabled="true" android:exported="true"
      android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
<intent-filter>
    <action android:name="com.google.android.gms.auth.api.phone.SMS_RETRIEVED"/>
</intent-filter>
</receiver> -->

remove this set of code from Android.xml it work"s for me

@neoshaikhimran
Copy link

this set of code to

@ealimardaniii
Copy link

ealimardaniii commented Dec 11, 2023

Please add Logs
@faizalshap

FATAL EXCEPTION: main
Process: com.carreta, PID: 6869
java.lang.RuntimeException: Unable to start receiver com.reactnativeotpautofill.OtpBroadcastReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4458)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2256)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference
at com.reactnativeotpautofill.OtpBroadcastReceiver.onReceive(OtpBroadcastReceiver.java:39)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4449)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2256) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:205) 
at android.os.Looper.loop(Looper.java:294) 
at android.app.ActivityThread.main(ActivityThread.java:8177) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 
2023-12-12 02:46:39.258 6869-6869 Process com.carreta I Sending signal. PID: 6869 SIG: 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants