We are currently going through the upgrade to expo SDK 47, following these instructions: https://blog.expo.dev/expo-sdk-47-a0f6f5c038af
Part of the upgrade involves the recommended switch to using the bundled expo-cli, rather than the global instance.
When we make this change, and run npx expo start --dev-client
, our android app throws an error when selecting the dev server, with the message:
Value ----------------------------224819657222108214122421 of type java.lang.String cannot be converted to JSONObject
When I hit the dev server url (eg. http://192.168.0.146:8081/?platform=android) manually to obtain the manifest, I can see it is indeed starting with the above value, as it contains some meta-data, eg.
----------------------------224819657222108214122421
Content-Disposition: form-data; name="manifest"
Content-Type: application/json
{"id":"f5c3b7be-999c-436e-b9c4-b453cf873af0","createdAt":"2023-01-12T10:13:41.499Z","runtimeVersion":"1.e","launchAsset":{"key":"bundle","contentType":"application/javascript","url":"http://10.20.0.174:8081/index.bundle?platform=android&dev=true&hot=false"},"asset
...
When I switch back to using the globally installed CLI as per the instructions in the upgrade blog, so changing the start command from npx expo start
to expo-cli start
, the same test results in the manifest being returned without the supplementary data, and the app can be loaded successfully.