killserver / react-native-screenshot-prevent

MIT License
104 stars 39 forks source link

The app crashes while press r for reloading or restarting app using react-native-restart #23

Open AhmedSamir74 opened 1 year ago

nhhynd commented 1 year ago

same to me

killserver commented 1 year ago

only if use enableSecureView/useDisableSecureView?

niall-shaw commented 1 year ago

@killserver - yes, it seems this only happens with enableSecureView/useDisableSecureView. If I use

RNScreenshotPrevent.enabled(true)
if (!__DEV__) RNScreenshotPrevent.enableSecureView()

it works fine.

killserver commented 1 year ago

@niall-shaw hmmm.. this error only in dev mode?

niall-shaw commented 1 year ago

@killserver Yes, because the problem only happens when you reload js bundle, which can only happen in DEV.

TereshchenkoVlad commented 7 months ago

Same to me, app crash after R reloading. Any solution?

ozcanozgur commented 5 months ago

@killserver - yes, it seems this only happens with enableSecureView/useDisableSecureView. If I use

RNScreenshotPrevent.enabled(true)
if (!__DEV__) RNScreenshotPrevent.enableSecureView()

it works fine.

The feature works fine, but there is one crucial problem. If code published with code push to the production app, it can cause a production crash. I need help resolving this issue.

LazloN5 commented 4 months ago

This is just a workaround, not a fix.

In my case, I do an app reload when switching languages (Left to right -> right to left) which also crashes the app. @killserver is this something that will be fixed?

7dp commented 1 month ago

Hey, thanks for this useful package! Sorry for tagging you here, @killserver You have any chance to fix this issue?