Migrating from classic build and update to eas give update error

Recently I have been migrating from a classic build and update to eas
but my newly eas build app always getting stuck at splash since it got an eas update error

First, it got failed to download the manifest from url u.expo.dev/myprojectid..
after some debugging it looks like the header when my app tries to do some update missing the ‘multipart/mixed’ value on the ‘accept’ field so I manually add it from AndroidManifest.xml

After that, my update can be checked and downloaded just fine but it came with another problem Failed to parse manifest data
yes, my new update has been downloaded but it didn’t load to my app

Any idea on how to solve this? since my current app still using expo publish and I just want to update it to eas before the services got stopped

I’ve been following Debugging EAS Update and got stuck for now since I didn’t know what causing my last problem

My app using
eas-cli 3.8.1
expo ^43.0.0
expo-updates ~0.10.15
react 17.0.1
managed workflow

Hi @hkgusti

You say you’re migrating from the classic build and you also say you’re on the managed workflow, but here you’re talking about AndroidManifest.xml. This does not make sense. In the classic build system and the managed workflow you would not have an android directory in your app, so you would not have an AndroidManifest.xml file.

It sounds like you do have an android directory in your app, which would mean you are actually on the bare workflow.

Assuming you have not made any changes to the code under android that you want to keep, delete it or move it out of the way. Same with ios. This will switch you back to the managed workflow.

See if that helps.

If it still doesn’t work, try running npx expo-doctor and see if it complains about anything.

If after that you still have problems, try following the Troubleshooting build errors and crashes guide. See also Production mode and Debugging runtime issue.

ahh what i mean is that i decompile the apk after building it with eas build using APK Studio

Debugging EAS Update

following the debugging step Viewing network requests I get that my accept header is missing the multipart/mixed value so I decompile the apk then add it to my AndroidManifest.xml by editing this line

<meta-data android:name="expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY" android:value="{&quot;expo-channel-name&quot;:&quot;preview&quot;}"/>

to

<meta-data android:name="expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY" android:value="{&quot;expo-channel-name&quot;:&quot;preview&quot;&#44;&quot;accept&quot;:&quot;application/expo+json, application/json, multipart/mixed&quot;}"/>

also I just want to make sure by Inspecting expo-updates configuration after prebuild that the properties on my AndroidManifest.xml is right since before upgrading to expo sdk 43 (previously my app is on expo sdk 42) my expo.modules.updates.EXPO_UPDATE_URL is still using the old https://exp.host/@hkgusti/mobile-absensi even thought I already use eas and my updates.url on app.json already set to "https://u.expo.dev/5f3dfd81-a98f-4031-b0ab-6df77e72c5b3"

i tried running npx expo-doctor but there is no issue with my project

one more thing, I tried to check adb logcat it seems that my update is failed to download and the problem for this Failed to parse manifest data error is this

04-19 15:12:47.150 17949 20801 E RemoteLoader: Failed to parse manifest data
04-19 15:12:47.150 17949 20801 E RemoteLoader: java.io.IOException: Manifest string is not a valid JSONObject or JSONArray: -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w
04-19 15:12:47.150 17949 20801 E RemoteLoader: Content-Disposition: form-data; name="manifest"
04-19 15:12:47.150 17949 20801 E RemoteLoader: Content-Type: application/json
04-19 15:12:47.150 17949 20801 E RemoteLoader:
04-19 15:12:47.150 17949 20801 E RemoteLoader: {"id":"b1a... 
---UPDATE FILE---
04-19 15:12:47.150 17949 20801 E RemoteLoader: -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w
04-19 15:12:47.150 17949 20801 E RemoteLoader: Content-Disposition: form-data; name="extensions"
04-19 15:12:47.150 17949 20801 E RemoteLoader: Content-Type: application/json
04-19 15:12:47.150 17949 20801 E RemoteLoader:
04-19 15:12:47.151 17949 20801 E RemoteLoader: {"assetRequ...
---UPDATE FILE---
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at expo.modules.updates.loader.FileDownloader.extractUpdateResponseJson(FileDownloader.java:267)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at expo.modules.updates.loader.FileDownloader.access$100(FileDownloader.java:36)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at expo.modules.updates.loader.FileDownloader$2.onResponse(FileDownloader.java:114)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at expo.modules.updates.loader.FileDownloader$4.onResponse(FileDownloader.java:242)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at java.lang.Thread.run(Thread.java:923)
04-19 15:12:47.151 17949 20801 E RemoteLoader: Caused by: org.json.JSONException: Value -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w of type java.lang.String cannot be converted to JSONArray
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at org.json.JSON.typeMismatch(JSON.java:112)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at org.json.JSONArray.<init>(JSONArray.java:98)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at org.json.JSONArray.<init>(JSONArray.java:110)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  at expo.modules.updates.loader.FileDownloader.extractUpdateResponseJson(FileDownloader.java:258)
04-19 15:12:47.151 17949 20801 E RemoteLoader:  ... 8 more
04-19 15:12:47.151 17949 20801 E LoaderTask: Failed to download remote update
04-19 15:12:47.151 17949 20801 E LoaderTask: java.io.IOException: Manifest string is not a valid JSONObject or JSONArray: -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w
04-19 15:12:47.151 17949 20801 E LoaderTask: Content-Disposition: form-data; name="manifest"
04-19 15:12:47.151 17949 20801 E LoaderTask: Content-Type: application/json
04-19 15:12:47.151 17949 20801 E LoaderTask:
04-19 15:12:47.151 17949 20801 E LoaderTask: {"id"
---UPDATE FILE---
04-19 15:12:47.152 17949 20801 E LoaderTask: -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w--
04-19 15:12:47.152 17949 20801 E LoaderTask:
04-19 15:12:47.152 17949 20801 E LoaderTask:    at expo.modules.updates.loader.FileDownloader.extractUpdateResponseJson(FileDownloader.java:267)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at expo.modules.updates.loader.FileDownloader.access$100(FileDownloader.java:36)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at expo.modules.updates.loader.FileDownloader$2.onResponse(FileDownloader.java:114)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at expo.modules.updates.loader.FileDownloader$4.onResponse(FileDownloader.java:242)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at java.lang.Thread.run(Thread.java:923)
04-19 15:12:47.152 17949 20801 E LoaderTask: Caused by: org.json.JSONException: Value -------ExpoManifestBoundary-saFsqFEdRTOosSxVfA8X6w of type java.lang.String cannot be converted to JSONArray
04-19 15:12:47.152 17949 20801 E LoaderTask:    at org.json.JSON.typeMismatch(JSON.java:112)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at org.json.JSONArray.<init>(JSONArray.java:98)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at org.json.JSONArray.<init>(JSONArray.java:110)
04-19 15:12:47.152 17949 20801 E LoaderTask:    at expo.modules.updates.loader.FileDownloader.extractUpdateResponseJson(FileDownloader.java:258)
04-19 15:12:47.152 17949 20801 E LoaderTask:    ... 8 more

the update file can be accessed on update from u.expo.dev

I will try your troubleshooting guide and add it here if i find something