react-native icon indicating copy to clipboard operation
react-native copied to clipboard

suspension of first network request for a while

Open enlo314 opened this issue 3 years ago • 4 comments

Description

My react native 0.69.0 android app suspense network request for a while, in dev and production and debug mode, in production about 30 seconds and dev about 2 minutes. I tested a new react native project 0.69.5 and a new 0.60.5 react native project and the issue still exists. Once the first request is fulfilled there is no problem with the next requests anymore.

Version

0.69.0

Output of npx react-native info

System: OS: Windows 10 10.0.19042 CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz Memory: 22.21 GB / 31.91 GB Binaries: Node: 16.17.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 23, 28, 29, 31, 33 Build Tools: 28.0.3, 29.0.2, 30.0.3, 31.0.0, 33.0.0 System Images: android-25 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-31 | Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64 Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-212.5712.43.2112.8815526 Visual Studio: Not Found Languages: Java: 11.0.16 - C:\Program Files\OpenJDK\openjdk-11.0.16_8\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.0 => 0.69.0 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

any network request to any endpoint

Snack, code example, screenshot, or link to a repository

I used axios, fetch and XMLHttpRequest

enlo314 avatar Sep 05 '22 07:09 enlo314

Hey @enlo314, your issue sounds related with ipv6, and may be duplicate with https://github.com/facebook/react-native/issues/33404 and https://github.com/facebook/react-native/issues/32730. Just try your chance with this solution .

andac-ozcan avatar Sep 06 '22 12:09 andac-ozcan

this solution works, thanks a lot @andac-ozcan !

enlo314 avatar Sep 07 '22 12:09 enlo314

Hi, @andac-ozcan this solution works on development but not on the production release, any workaround?

enlo314 avatar Sep 10 '22 15:09 enlo314

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.

github-actions[bot] avatar Mar 09 '23 18:03 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Mar 21 '23 18:03 github-actions[bot]