Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ScriptManager] Failed to load script: [ScriptDownloadFailure] #528

Closed
HongQuang231 opened this issue Mar 22, 2024 · 1 comment
Closed
Labels

Comments

@HongQuang231
Copy link

HongQuang231 commented Mar 22, 2024

Ask your Question

when i did bundle auth app with

  new Repack.plugins.CodeSigningPlugin({
    privateKeyPath: './code-signing.pem',
    outputPath: path.join('build', 'outputs', platform, 'remotes'),
  }),

and i open app in testfilght , my app was crashed and throw err look like this

console.error: [ScriptManager] Failed to load script: [ScriptDownloadFailure] {"scriptId":"auth","locator":{"method":"GET","url":"https://**/remotes/auth.container.bundle","absolute":false,"timeout":30000,"query":"platform=ios","fetch":true,"verifyScriptSignature":"strict"},"cache":true} {"originalError":{"code":"ScriptDownloadFailure","message":"The bundle verification failed because PublicKey was not found in the bundle. Make sure you've added...(truncated)...","domain":"RCTErrorDomain","userInfo":null,"nativeStackIOS":["0 host_app 0x0000000105264bb8 RCTJSErrorFromCodeMessageAndNSError + 112","1 host_app 0x0000000105209018 __41-[RCTModuleMethod processMethodSignat...(truncated)...","2 host_app 0x0000000105891f38 __61-[ScriptManager loadScript:config:wit...(truncated)...","3 host_app 0x0000000105894364 __52-[ScriptManager downloadAndCache:comp...(truncated)...","4 host_app 0x0000000104f74590 __81+[SKFLEXNetworkObserver asyncCompleti...(truncated)...","5 CFNetwork 0x00000001afdbda84 _CFNetworkSetHSTSStoragePath + 27524","6 CFNetwork 0x00000001afddb9a0 CFHTTPMessageCopySerializedMessage + 13784","7 libdispatch.dylib 0x0000000108ba0f50 _dispatch_call_block_and_release + 32","8 libdispatch.dylib 0x0000000108ba2b34 _dispatch_client_callout + 20","9 libdispatch.dylib 0x0000000108baa98c _dispatch_lane_serial_drain + 832","10 libdispatch.dylib 0x0000000108bab75c _dispatch_lane_invoke + 460","11 libdispatch.dylib 0x0000000108bb85f8 _dispatch_root_queue_drain_deferred_wlh + 328","12 libdispatch.dylib 0x0000000108bb7c2c _dispatch_workloop_worker_thread + 444","13 libsystem_pthread.dylib 0x0000000217eca964 _pthread_wqthread + 288","14 libs

@jbroma
Copy link
Member

jbroma commented Apr 8, 2024

@HongQuang231 you can see in the log why it crashed:

"The bundle verification failed because PublicKey was not found in the bundle...

You need to add the generated public key inside of strings.xml/Info.plist under the name of RepackPublicKey, please see callstack/super-app-showcase#43 to check how it was done in super-app-showcase.

I'll close this as it's related to CodeSigning setup, we already have an issue for that here: #519

@jbroma jbroma closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants