Skip to content
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

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

Closed
3 tasks done
talaikis opened this issue Nov 25, 2024 · 6 comments
Labels
DataStore Related to DataStore category React Native React Native related issue

Comments

@talaikis
Copy link

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

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Nov 25, 2024
@chrisbonifacio chrisbonifacio added DataStore Related to DataStore category React Native React Native related issue labels Nov 25, 2024
@HuiSF
Copy link
Member

HuiSF commented Nov 26, 2024

Hi @talaikis could you confirm the exact version of the react-native package you are using?

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 26, 2024
@talaikis
Copy link
Author

Hi @talaikis could you confirm the exact version of the react-native package you are using?

"aws-amplify": "6.9.0"

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 26, 2024
@HuiSF
Copy link
Member

HuiSF commented Nov 26, 2024

Hi @talaikis I was asking for the react-native package version. As far as I know, this error TypeError: Promise.allSettled is not a function (it is undefined) happens due to the lower version of react-native JS engine doesn't provide this function.

Amplify JS v6 requires react-native 0.70.0 as the lowest supported version at this moment.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 26, 2024
@talaikis
Copy link
Author

Hi @talaikis I was asking for the react-native package version. As far as I know, this error TypeError: Promise.allSettled is not a function (it is undefined) happens due to the lower version of react-native JS engine doesn't provide this function.

"react-native": "0.76.3"

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 26, 2024
@lgcantarelli
Copy link

lgcantarelli commented Dec 13, 2024

+1

"@aws-amplify/react-native": "1.1.6"
"aws-amplify": "6.9.0"
"react-native": "0.73.6"

@talaikis
Copy link
Author

Closing as 6.10.x has another error.

@github-actions github-actions bot removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataStore Related to DataStore category React Native React Native related issue
Projects
None yet
Development

No branches or pull requests

4 participants