App not responding after using BarCodeScanner several times

+1

have the same problem trying to do similar thing:

there’s a section on my app that allows user to choose what kind of information to scan, depending on that the interface will be different. However, both pages simply call a scanner component which is similar to the expo snack provided with BarCodeScanner documentation.

I switch between those pages using RNRF tabs. and everytime I do (Home → scanner interface A (with Actions.jump) → home (with Actions.pop) → scanner interface B (with Actions.jump) the app will crash.

I even tried building apk with exp build:android and problem persists.

Any hints?

UPDATE:
traced this back to the fact that Scanner was never unmounted when its caller (interface A) was never unmounted before it is trying to be mounted once again by interface B. And as per documentation on expo Camera, this is normal behavior apparently…

UPDATE2:
Now I’m encountering same issue as this original post, when moving back n forth between scanner a and b app will freeze at some point depending on the phone performance, and once it freezes, app will always crash when opening scanner more than once although it has been unmounted (i checked that scanner’s componentwillunmount was called everytime i press back and remounted when i want to open interface b)
Just wanna know if this is a bug or something i neglected to do?
Thanks!:slight_smile: