aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.44k stars 2.13k forks source link

TypeError: Promise.allSettled is not a function (it is undefined) calling DataStore.clear() (React Native) #14035

Open talaikis opened 12 hours ago

talaikis commented 12 hours ago

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

DataStore

Amplify Version

v6

Amplify Categories

No response

Backend

None

Environment information

``` # Put output below this line System: OS: Windows 11 10.0.22631 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz Memory: 10.54 GB / 31.93 GB Binaries: Node: 22.11.0 - ~\AppData\Local\fnm_multishells\11184_1732523016089\node.EXE Yarn: 3.6.4 - ~\AppData\Local\fnm_multishells\11184_1732523016089\yarn.CMD npm: 10.9.0 - ~\AppData\Local\fnm_multishells\11184_1732523016089\npm.CMD Watchman: 20230709.023423.0 - C:\ProgramData\chocolatey\bin\watchman.EXE Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.22621.3527 npmPackages: @aws-amplify/react-native: 1.1.6 => 1.1.6 @azure/core-asynciterator-polyfill: 1.0.2 => 1.0.2 aws-amplify: 6.9.0 => 6.9.0 ```

Describe the bug

Calling DataStore.clear() in React Native latest versions (approx after 6.7+):

TypeError: Promise.allSettled is not a function (it is undefined) 

Expected behavior

Working clear()

Reproduction steps

  1. install 6.8 or 6.9 aws-amplify on a React Native app
  2. call Datastore.clear()

Code Snippet

// Put your code below this line.

Log output

``` // Put your logs below this line ```

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response