revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.38k stars 317 forks source link

Using makeReadOnly crashes the app and makes NFC disabled until phone restart #620

Closed daaain closed 11 months ago

daaain commented 1 year ago

When using makeReadOnly the app crashes (there's a java.io.IOException in Sentry that might be due to this) to the point that the UI is completely frozen, the JS error handler doesn't get called and the NFC functionality is completely disabled on the entire Android OS level (other apps can't read NFC any more) until a hard reboot.

So it's almost surely something not quite in the native layer and after most of the day spent debugging I thought I'd try in the reference app and it's the same! Attaching screenshots of the tag below, but it's an NDef one with a custom media type that otherwise has been working for us for years.

Do you know what it could be or how could I diagnose it? I'm using Android 12/13 and version 3.14.1 – by the looks of it the latest is just a small iOS fix.

image image

MattEndstate commented 1 year ago

Running into the same issue here on a Pixel 6a running Android 13 and version 3.14.1. I have an older Pixel 5a running Android 11 that is not affected by this issue.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

daaain commented 1 year ago

Please remove stale label, it would be great if this error was handled more gracefully in the library so there's no crash.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 5 days with no activity.

Mehly commented 8 months ago

I'm facing the very same issue. NFC becomes device-globally unusable until device-restart.