expo / custom-expo-updates-server

238 stars 67 forks source link

problem with expo-protocol-version: 1 #28

Closed jnoleau closed 1 year ago

jnoleau commented 1 year ago

The app send a GET to /api/manifest but that's all. After a debug with logcat, I found this error

02-20 15:54:22.118 1198 1222 E dev.expo.updates: {"timestamp":1676904862117,"message":"Failed to parse manifest data: Unsupported expo-protocol-version: 1","code":"UpdateFailedToLoad","level":"error","stacktrace":["expo.modules.updates.manifest.ManifestFactory.getManifest(ManifestFactory.kt:27)","expo.modules.updates.loader.FileDownloader$Companion.checkCodeSigningAndCreateManifest(FileDownloader.kt:462)","expo.modules.updates.loader.FileDownloader$Companion.access$checkCodeSigningAndCreateManifest(FileDownloader.kt:398)","expo.modules.updates.loader.FileDownloader.parseManifest(FileDownloader.kt:274)","expo.modules.updates.loader.FileDownloader.parseMultipartManifestResponse(FileDownloader.kt:206)","expo.modules.updates.loader.FileDownloader.parseManifestResponse$expo_updates_release(FileDownloader.kt:108)","expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:319)","expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393)","okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)","java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)","java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)","java.lang.Thread.run(Thread.java:1012)"]} 02-20 15:54:22.119 1198 1222 E Loader : Failed to parse manifest data: Unsupported expo-protocol-version: 1 02-20 15:54:22.119 1198 1222 E Loader : java.lang.Exception: Unsupported expo-protocol-version: 1 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.manifest.ManifestFactory.getManifest(ManifestFactory.kt:27) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader$Companion.checkCodeSigningAndCreateManifest(FileDownloader.kt:462) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader$Companion.access$checkCodeSigningAndCreateManifest(FileDownloader.kt:398) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader.parseManifest(FileDownloader.kt:274) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader.parseMultipartManifestResponse(FileDownloader.kt:206) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader.parseManifestResponse$expo_updates_release(FileDownloader.kt:108) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader$downloadManifest$1.onResponse(FileDownloader.kt:319) 02-20 15:54:22.119 1198 1222 E Loader : at expo.modules.updates.loader.FileDownloader$downloadData$1.onResponse(FileDownloader.kt:393) 02-20 15:54:22.119 1198 1222 E Loader : at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) 02-20 15:54:22.119 1198 1222 E Loader : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 02-20 15:54:22.119 1198 1222 E Loader : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 02-20 15:54:22.119 1198 1222 E Loader : at java.lang.Thread.run(Thread.java:1012)

Changing image solves the issue. But I saw it's a recent commit from your side so don't know why you upgrade this procol to 1 maybe necessary with the SDK 48 ?

skaionedev commented 1 year ago

I was struggling to figure out the problem about 4 hours. But then I found this ticket and changed version to 0 and everything worked on IOS

wschurman commented 1 year ago

I'll work on a fix to make this example server support both versions 0 and 1.

ilterugur commented 1 year ago

I was struggling to figure out the problem about 4 hours. But then I found this ticket and changed version to 0 and everything worked on IOS

@wschurman @skaionedev Guys I literally struggled for hours until I found this issue. Thank you so much