-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[asset] fix reentrant promise resolving crash #27672
Conversation
The Pull Request introduced fingerprint changes against the base commit: ec64e1a Fingerprint diff[
{
"type": "dir",
"filePath": "../../packages/expo-asset/ios",
"reasons": [
"expoAutolinkingIos"
],
"hash": "bc2b8da4c5c6f0883232bb4ee0f11806f024b49d"
}
] Generated by PR labeler 🤖 |
3fa8ef9
to
33008d8
Compare
33008d8
to
a2c5fad
Compare
d55c0c6
to
2eab47d
Compare
@@ -20,6 +20,7 @@ public class AssetModule: Module { | |||
AsyncFunction("downloadAsync") { (url: URL, md5Hash: String?, type: String, promise: Promise) in | |||
if url.isFileURL { | |||
promise.resolve(url.standardizedFileURL.absoluteString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe resolve/reject should have the return type Never
so it basically requires to be the last expression within the block? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe resolve/reject should have the return type
Never
so it basically requires to be the last expression within the block? 🤔
i'll leave it to you and merge the pr first for fixing ci. thanks!
# Why investigating test-suite ios failure. this one is a regression from #27601 and caused `Linking.getInitialURL()` returns null when launching app with deep links. # How pass the launchOptions to the bridge # Test Plan - kill bare-expo process and run `xcrun simctl openurl booted 'bareexpo://test-suite/run?tests=Basic'` should go to the basic test screen - ci passed especially for test-suite ios - this pr is stacked on top of #27672 and should work to fix test-suite
# Why ios bare-expo release build was crashing because of "Tried to resolve a promise more than once." # How i think we should have early return after resolving the promise.
# Why investigating test-suite ios failure. this one is a regression from #27601 and caused `Linking.getInitialURL()` returns null when launching app with deep links. # How pass the launchOptions to the bridge # Test Plan - kill bare-expo process and run `xcrun simctl openurl booted 'bareexpo://test-suite/run?tests=Basic'` should go to the basic test screen - ci passed especially for test-suite ios - this pr is stacked on top of #27672 and should work to fix test-suite
Why
ios bare-expo release build was crashing because of "Tried to resolve a promise more than once."
How
i think we should have early return after resolving the promise.
Test Plan
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).