Expo app: Failed to load all assets

1. SDK Version:
48.0.18
2. Platforms(Android/iOS/web/all):
Android & iOS

I am trying to build a React Native app where the code runs on a self hosted external server with apache2. However I am getting the following error inside the Expo app:

Uncaught error: java.lang.Exception: Failed to load all assets

In the apache2 logs I can see it reaches the server, but I do not see any other errors.

I have followed the instructions as can be seen from a tutorial here:
https://www.renedohmen.nl/run-an-expo-webserver-with-port-forwarding/

My apache2 sites-available conf looks like this:

<VirtualHost #SERVER_IP#:80>
    ServerName myuser.myapp.main.nl
    ServerAlias www.myuser.myapp.main.nl

    DocumentRoot /var/www/myapp/myuser/myapp

    # Enable proxy modules
    <Proxy *>
        Require all granted
    </Proxy>

    ProxyPass / http://#SERVER_IP#:19001
    ProxyPassReverse / http://#SERVER_IP#:19001

    ErrorLog /var/www/myapp/myuser/logs/error.log
    TransferLog /var/www/myapp/myuser/logs/access.log
</VirtualHost>

I only changed some values for privacy reasons.

My .exprc file looks like this:

{ "manifestPort": 30000 }

My app.json looks like this:

{
  "expo": { 
    "packagerOpts": {"port": 30001 },   
    "name": "myappname",
    "slug": "myappname",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "scheme": "myapp",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      }
    },
    "web": {
      "bundler": "metro",
      "favicon": "./assets/images/favicon.png"
    }
  }
}

The command I use on the server start the app:
expo start --no-dev --minify --offline --non-interactive --port 19001 --clear

In the expo app I enter the URL manually likes this:
exp://myuser.myapp.main.nl

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.