-
Notifications
You must be signed in to change notification settings - Fork 24.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
Promise.allSettled is still undefined in 0.70.6 on iOS and Android with Hermes #35363
Comments
I have to agree with the issue. My setup is slightly different. I use 0.68.5 in a project, along with |
see: react-native/Libraries/Core/polyfillPromise.js Lines 23 to 37 in 436da18
to test: console.log(' --- debug',{allSettled:Promise.allSettled,any:Promise.any, hermes_hasPromise:global?.HermesInternal?.hasPromise?.()})
--- debug {"allSettled": undefined, "any": undefined, "hermes_hasPromise": true} So, better to create issue in an appropriate repo |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
This still seems to be an issue for me on
It seems to never log any values and only shows me this warning:
|
Appears to still be an issue in |
I'm getting loads of issue reports on Sentry for All issues are on Android and Hermes for RN 0.72.4. |
I'm using |
I am also observing this issue with React Native 0.75 in our non-debug builds. My workaround was to replace all occurrences of
|
We are also experiencing the same error when using |
Same here:
|
I'm getting this error on iOS & Android, for production builds and development build (using expo dev client) |
I ran into this, and the reason was Sentry. They patch the global Promise 🙃 If you use sentry and disable it in development, that's how you end up with a production only crash. Check this sentry issue and their troubleshooting guide |
Does it look like a good solution? const allSettled = Promise.allSettled
Sentry.init({ dsn: SENTRY_DSN })
Promise.allSettled = allSettled.bind(Promise) |
On the React Native 0.76 with Expo 52, if you use Yarn the fix is to add the following resolution to your package.json. No other steps from the sentry troubleshooting guide are required (no need to disable auto-patching).
|
Description
Promise.allSettled is still undefined on iOS and Android with Hermes when you have installed both latests versions of react native and expo (on a bare react native project).
It seems to work fine when executing tests with jest, however.
Version
0.70.6
Output of
npx react-native info
Steps to reproduce
1.- Have react native 0.70.6 installed.
2.- Have expo installed on a bare react native application following their documentation.
3.- Use Promise.allSettled.
4.- Get [TypeError: undefined is not a function].
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: