I am getting an error “whoops, something went wrong” only on my device.
When I run the program in the simulator, it is fine.
When I run it on the device from
expo start --localhost --android
with the device plugged into USB, it seems fine. But when I publish to expo to run in my Expo app, or try to run the apk that I built with expo build:android. It breaks.
i have tried clearing data on both the apk version and the Expo app, but it does not seem to help.
error is Uncaught Error: TypeError:
TypeError: TypeError: r is not a function. (in 'r(d), ‘r’ is 87)
This error is located at:
I would really appreciate any help. Thanks !
Can you try either (or both):
A. Running the command
expo start --no-dev --minify as it replicates the environment in a production env.
B. Connecting your device, enabling USB debugging and then opening the
.apk in Android Studio and running
adb logcat to get device logs as they contain much more insightful information for errors and crashes.
Thanks very much. Sorry for the delay in reply. Had to do some reading before I could put your advice into action. Here is what I have found so far…
the app works fine when not in production mode. Both the simulators (android and ios) and when usb connected to an android app. In production mode, they all fail when I navigate to an item’s detail view, back to the list view screen, and again to a detail view. (list of items → one item → list of items) = ok, but (list => one item => list => one item) crashes (even if same item)
adb logcat while connected to the phone spits out exactly the same error.
This one (only in text)
i actually wonder if there is something in the version of React-Native that I am using
I finally worked this out.
In a component I had a require(“Dimensions”) in the actual code of the component.
When I moved it to the top (where the other imports are) it worked again.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.