Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

React Native TypeError: Cannot convert null value to object #44

Open
TheFrostage opened this issue Apr 13, 2021 · 0 comments
Open

React Native TypeError: Cannot convert null value to object #44

TheFrostage opened this issue Apr 13, 2021 · 0 comments

Comments

@TheFrostage
Copy link

TheFrostage commented Apr 13, 2021

Hello. I am getting this error when launching a React Native application. Here is the screenshot:

Screen Shot 2021-04-13 at 13 50 47

The error here is because of userAgent being equal to "chrome", therefore the exec function on a regex returns null.
I'm running React Native v.0.64.0, React 17.0.1 on macOS Catalina 10.15.6. I also enabled Hermes on iOS.
What is the correct way to handle this issue?
I should say that dismissing this error in development allows to continue using the application, but I'm afraid I this issue can have hidden consequences.

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

No branches or pull requests

1 participant