-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
Previous request was cancelled due to a new request - iOS #2800
Comments
Previous request was cancelled due to a new request
- iOS
+1 also having this issue suddenly. Trying to run getSubscriptions, getProducts, one after another, using await before my functions. `
}, [])` |
I am also having this issue now, although I didn't change anything in the IAP part of my app lately. I now realize based on the comment above, that the only change has that I upgraded to [email protected]. [email protected] |
The solution that worked for me was to use async await functionality and make sure to call getProducts and getSubscriptions one after another from an onPress rather than a useEffect. |
useEffect works fine for me. Just make sure to use |
I think I've finally managed to remove the error, its because I had multiple subscriptions and the fetch was running multiple times. I had to add this flag. const [isFetchingSubscriptions, setFetchingSubscriptions] = useState(false); const fetchSubscriptions = async () => {
}; |
I am also using useEffect but 2x, so I end up with:
Both hooks wait until
|
I'm pretty sure this won't be fixed. I think this is an explicit behavior from #2604 to fix other issues, so we should just work within its constraints. |
Yes. I already made a workaround and it's fine. I will close the issue |
Hello. I get this error after upgrading from 12.10.4 to 12.15.1
Environment:
react-native-iap: 12.15.1
react-native: 0.72.5
Platforms (iOS, Android, emulator, simulator, device): iphone, real devices
Previous request was cancelled due to a new request
Flow: I put the app in background and return after some time.
The text was updated successfully, but these errors were encountered: