0

When I run npx expo start --dev-client, both our android and iOS app throws an error when selecting the dev server, with the message:

Error loading app. Value ----------------------------224819657222108214122421 of type java.lang.String cannot be converted to JSONObject on Android.

Error loading app. Couldn't parse the manifest. The data couldn't be read because it isn't in the correct format on iOS.

When I hit the dev server url (eg. http://192.168.1.179:8081) manually to obtain the manifest, I can see it is indeed starting with the above value, as it contains some meta-data, eg.

----------------------------783506567945418080873744
Content-Disposition: form-data; name="manifest"
Content-Type: application/json

{"id":"203368a8-dcbe-45a6-afba-0a1e76018e5d","createdAt":"2023-08-24T06:02:54.108Z","runtimeVersion":"1.0.6","launchAsset":{"key":"bundle","contentType":"application/javascript","url":"http://192.168.1.179:8081/index.bundle?platform=none&dev=true&hot=false"},"assets":[],"metadata":{},"extra":{"eas":{"projectId":"cc2c7913-15b1-4e18-aa87-a29294e12ac9"},"expoClient":...............,"packagerOpts":{"dev":true},"mainModuleName":"index","__flipperHack":"React Native packager is running"},"scopeKey":"@speciesplus/speciesplus"}}
----------------------------783506567945418080873744--
... 

It's an expo managed project and I use npx expo prebuild --clean to build the native ios/ and android/ files, after which I build the app with debug build variant/schema with Android Studio (v2022.3.1) and Xcode (v14.2 (14C18)). But it gives me the same error even when building the app with eas build --platform android --profile development --local with the following eas profile:

"development": {
      "developmentClient": true,
      "distribution": "internal",
      "channel": "development",
      "android": {
        "buildType": "apk"
      }
    },

My stack is:

  1. expo 48.0.18
  2. react 18.2.0
  3. react-native 0.71.8
  4. node 16.18.1 / npm 8.19.2
  5. I also use react-native-code-push 7.1.0 with the respective plugin and patch it it's of some use

I've tried to run the dev-client expo app on both Android and iOS but upon connecting to the expo metro server it gives me the above mentioned error.

I expect the app to open without that error.

  • I've solved it, it was something I had in app.json: "updates": { "fallbackToCacheTimeout": 0, "url": "https://u.expo.dev/cc2c7913-15b1-4e18-aa87-a29294******" }. I've removed it and now it works. – Florin200217 Aug 24 '23 at 11:34

0 Answers0