skip to Main Content

When run expo with react-native-web, the page show error in chrome:

Something went wrong
Error: A network error occurred.

But, when I open it in firefox, there is no error.
At the same time, my android phone that connect to the app via expo also works well without error.
So, only chrome has such issue, firefox and android don’t.

I’ve tried following, but nothing solved the issue:

  • disabled all extensions in chrome, and reboot the computer, nothing changes.
  • confirmed that there is no proxy setting in my computer or chrome.
  • start chrome in incognito mode.
  • start app via expo start -c to clear cache.
  • remove .expo dir.
  • remove node_modules/ dir.

So, what’s the possible issue ?

I’ve checked Can't load expo app: Something went wrong , no answer by others can solve my issue.

Screenshot in chrome:
enter image description here

2

Answers


  1. I’m having the same issue. My local dev version works, but the build version runs into this error, also on Chrome. And it too works on Firefox. I’m also getting those font issues on the side too, pretty much the same besides the font origins, I don’t know what’s up with that.


    I found the issue. For me it was this:

      const [fontLoaded, error] = useFonts({
        Inter: require('@tamagui/font-inter/otf/Inter-Medium.otf'),
        InterBold: require('@tamagui/font-inter/otf/Inter-Bold.otf'),
      });
    useEffect(() => { if (error) throw error; }, [error]);
    

    The fonts didn’t actually load properly, and then in my production build this for some reason meant it would throw an error, even though it didn’t in the dev build. Removing the error checking line got rid of the issue for me, maybe that’ll apply to your situation too.

    Login or Signup to reply.
  2. In your project, are you importing FontAwesome?

    Removing it from the code, makes it work on Chrome for me.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search