Module AppRegistry is not a registered callable module

Hi,
I’ve been building out an application for several months now and everything’s been going fine in the simulators, but I’m just now getting the app up on TestFlight and I’m getting this error on my iPhone:

Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

I’ve been googling this for a while now and I found this github issue that seemed similar:
https://github.com/expo/expo/issues/270

I’ve tried running expo start --no-dev --minify, but everything still seemed to run perfectly.

I took a look at the build logs for my .ipa file and found a few errors:

...
[stderr] warning: /private/tmp/turtle/6b67a9ea-bbfc-4851-af84-c599abd51cfc/archive.xcarchive/BCSymbolMaps/ExpoKitApp-armv7.bcsymbolmap: 
[stderr] No such file or directory. Not unobfuscating.
[stderr] warning: /private/tmp/turtle/6b67a9ea-bbfc-4851-af84-c599abd51cfc/archive.xcarchive/BCSymbolMaps/ExpoKitApp-arm64.bcsymbolmap: No such file or directory. Not unobfuscating.
...
[stderr] _floatsignTemp/Payload/ExpoKitApp.app: replacing existing signature
[stderr] _floatsignTemp/Payload/ExpoKitApp.app: signed app bundle with Mach-O universal (armv7 arm64) [com.friendsindeed.app]
...

I have no idea what those errors mean, so I was hoping someone could shed some light on them. Is this enough information to go off of? Let me know if I should provide anything else. Any insight I could glean from this would be very helpful. Thanks!

Hey @sethcwhiting,

Here’s the info we have on this error: https://docs.expo.io/versions/v33.0.0/workflow/common-development-errors/#module-appregistry-is-not-a-registered-callable

Another thing to try is to add your third-party libraries back one-by-one to see if one of them is the culprit.

Cheers,
Adam

1 Like

Thanks, @adamjnav!

I was able to open the console to view my phone’s logs and found these errors when running the app:

error	14:15:48.349945 -0400	backboardd	<private>
error	14:15:48.352669 -0400	backboardd	<private>
error	14:15:48.356509 -0400	backboardd	<private>
error	14:15:55.262997 -0400	routined	Failed to set activity, com.apple.routined.sync.coreroutine, to state, XPC_ACTIVITY_STATE_DONE
error	14:15:55.548254 -0400	wirelessproxd	CoreBluetooth isn't advertising for this client type
error	14:15:56.686949 -0400	itunesstored	Could not load library [21]
error	14:15:57.470778 -0400	routined	error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///var/mobile/Library/Caches/com.apple.routined/CoreRoutine.sqlite options:{
    NSInferMappingModelAutomaticallyOption = 1;
    NSMigratePersistentStoresAutomaticallyOption = 1;
    NSPersistentStoreFileProtectionKey = NSFileProtectionCompleteUnlessOpen;
    NSSQLitePragmasOption =     {
        "journal_mode" = WAL;
    };
} ... returned error Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={destinationURL=file:///var/mobile/Library/Caches/com.apple.routined/.CoreRoutine.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3, reason=Cannot migrate store in-place: Validation error missing attribute values on mandatory destination attribute, NSUnderlyingError=0x177945b0 {Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={attribute=timestamp, entity=RTCLLocationMO, reason=Validation error missing attribute values on mandatory destination attribute}}, sourceURL=file:///var/mobile/Library/Caches/com.apple.routined/CoreRoutine.sqlite} with userInfo dictionary {
    NSUnderlyingError = "Error Domain=NSCocoaErrorDomain Code=134110 \"An error occurred during persistent store migration.\" UserInfo={attribute=timestamp, entity=RTCLLocationMO, reason=Validation error missing attribute values on mandatory destination attribute}";
    destinationURL = "file:///var/mobile/Library/Caches/com.apple.routined/.CoreRoutine.sqlite.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3";
    reason = "Cannot migrate store in-place: Validation error missing attribute values on mandatory destination attribute";
    sourceURL = "file:///var/mobile/Library/Caches/com.apple.routined/CoreRoutine.sqlite";
}
error	14:15:57.471799 -0400	routined	error setting up the persistent store <private>
error	14:15:57.472764 -0400	routined	Error initializing persistent store coordinator, <private>
error	14:16:00.752242 -0400	ExpoKitApp	Cannot make a deep link into a standalone app with no custom scheme defined
error	14:16:00.792123 -0400	ExpoKitApp	Unhandled JS Exception: Cannot make a deep link into a standalone app with no custom scheme defined
error	14:16:00.798484 -0400	ExpoKitApp	Module AppRegistry is not a registered callable module (calling runApplication)
error	14:16:00.812495 -0400	ExpoKitApp	Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)

Have you come across those before? Can you help me make sense of those?
Thanks again!

@adamjnav Just a quick update:
Googling the “deep linking” errors brought me to this issue/response:
https://github.com/expo/expo/issues/996#issuecomment-386459831
I tried the solution Ben laid out (adding a scheme to my app.json) but the build still failed in the same way.
Also, as far as deep linking goes, I searched my code base, and it looks like apart from normal web URLs, we’re only linking to fb-messenger:// & app-settings://. Not sure wether that’s relevant or not.

@adamjnav Any chance you could take another look at this?

I finally got this working. The problem was actually related to deep linking (specifically Linking.makeUrl()). I added a scheme to my app.json and everything started working correctly in TestFlight after I ran expo build:ios. The reason I didn’t think it was working before was that I still saw the same errors in my Expo build logs that I pasted into my original post. Apparently, those were totally unrelated to the issue and I could have just ignored them. Because I was seeing those errors, I didn’t even bother testing the build in TestFlight, but apparently it would have worked fine if I did.

Glad you got to the bottom of it! Thanks for sharing the solution so that others may see it as well. Sorry I couldn’t be of more assistance though. Cheers!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.