SDK Version: 47 (didn’t have this problem on 45)
Platforms(Android/iOS/web/all): iOS only
After upgrading from sdk45 to sdk47 I am getting crashes every time I call Updates.reloadAsync()
no changes have been made to the app other than the upgrading of libraries and such to match the newer sdk values.
The code itself is pretty strait forward. I have an appUpdateStore
that initializes before the splash screen is unlocked and checks if a new update is available. If one is, it downloads it and reloads the app (so the user doesn’t see a flash).
async init() {
if (inDevApp) {
return; // can't check for updates in dev app
}
const updateRes = await Updates.checkForUpdateAsync()
if (updateRes.isAvailable) {
runInAction(() => this.waitingForReload = true)
await Updates.fetchUpdateAsync()
await Updates.reloadAsync()
}
}
Crash logs on sentry give
SIGABRT
~JSCRuntime > Assertion failed: (objectCounter_ == 0 && “JSCRuntime destroyed with a dangling API object”), function ~JSCRuntime, file JSCRuntime.cpp, line 397. > JSCRuntime.cpp > objectCounter_ == 0 && “JSCRuntime destroyed with a dangling API object”
It seems like this is another manifestation of a bug fixed in sdk 46. Could it be possible that it snuck back into 47? How should we proceed? Because not being able to guarantee users have the latest front end means we can’t deploy our frontend and backend in lockstep anymore which introduces a whole new set of issues.