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

Networking is not working

Open adembacajdev opened this issue 2 years ago • 5 comments
trafficstars

Description

Hi, hope you are all doing well. I have created an app in v0.71.5, and everything is totally fine, but I am facing an issue that never faced before, and also couldn't find any other report.

Networking is not working when I open chrome debugger. It is working normally, in the moment I open debugger, it does not show any error message, or any response, it is not triggered at all.

At the beginning I thought it is because of the domain, it was http and with IP, I just created a SSH domain and it's still the same. When I try in other apps, it is working fine, but not in this app. The configuration is the same.

React Native Version

0.71.5

Output of npx react-native info

There are no logs, app wors fine, but networking not.

Steps to reproduce

I am not sure if you can reproduce it. I created a project, added UI components, then when tried to use axios, was working fine, but when opened debugger, it is not working anymore.

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

I can't do any screenshot, since it is only not triggering axios/fetch or any other network library at all.

adembacajdev avatar Jun 09 '23 14:06 adembacajdev

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.71.10. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

github-actions[bot] avatar Jun 09 '23 14:06 github-actions[bot]

Networking is not working when I open chrome debugger. It is working normally, in the moment I open debugger, it does not show any error message, or any response, it is not triggered at all.

@adembacajdev Could you please elaborate more on "not working" and "does not show any error msg, or any response"?

Pranav-yadav avatar Jun 10 '23 04:06 Pranav-yadav

@Pranav-yadav yes, literally there is no log. no .then, no .catch, nothing. It just does not trigger anything while it is in debug. It is really weird.

adembacajdev avatar Jun 12 '23 08:06 adembacajdev

:warning: Missing Reproducible Example
:information_source: It looks like your issue is missing a reproducible example. Please provide either:

github-actions[bot] avatar Jun 12 '23 19:06 github-actions[bot]

I have the same issue, it was caused by babel config in my app . I had to remove

this config from my bable.config.js

@babel/plugin-proposal-class-properties

don't know why , but it solved it for me

Efiyahu avatar Jun 13 '23 10:06 Efiyahu

I have this same issue. Incredibly frustrating. I have found dozens of issues on this repo related to the issue including: #32730 #33404 #37907 #38015

The following are all the popular solutions to these issues that I've found:

  1. Removing @babel/plugin-proposal-class-properties
  2. Adding inlineRequires: false to metro.config
  3. Adding the new alpha version of okhttp to android/app/build.gradle: implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.11' implementation 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.11'
  4. A series of manual okhttp overrides as in: https://gist.github.com/danmaas/c60af5fed9f55d2bc616ce302696540d
  5. Simply using XMLHttpRequest instead of fetch.

I have tried all of these in multiple different combinations and the only one that even remotely works is XMLHttpRequest. This is an extremely extremely extremely poor solution, given the number of libraries using fetch, and the difficulty of manually replacing a library every single time it is discovered to use this common function. Hopefully there will be some sort of built in fix for this in the future.

UserNobody14 avatar Jun 25 '23 04:06 UserNobody14

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

github-actions[bot] avatar Jul 19 '23 05:07 github-actions[bot]

I still have the issue, can not figure out what is causing it. It’s very strange

adembacajdev avatar Jul 19 '23 09:07 adembacajdev

Same issue for me, some customers, complained that the networking of the app stop wokring.

Mostly it happens when they in IPV6 (internet on phone, not wifi)

How can we solve this problem??

roysG avatar Jul 30 '23 06:07 roysG

@cortinico, I try to follow the steps of @UserNobody14

Why does it happens?!

Is there any better and proper fix for that?

roysG avatar Aug 01 '23 17:08 roysG

I am not sure if you can reproduce it. I created a project, added UI components, then when tried to use axios, was working fine, but when opened debugger, it is not working anymore.

This issue is still waiting for a reproducer. Please provide a reproducer and we can start looking into it.

cortinico avatar Aug 02 '23 14:08 cortinico

@cortinico This is happening with Appsync Graphql requests also on Android, then I created a new app via npx create-expo-app my-app and added fetch() function only, still sometimes it takes 1 seconds and sometimes 2 minutes to sent request Can you try this: open via Expo Go and leave the phone for 2-3 minutes, and then press the buton, if no waiting, again repeat Snack: https://snack.expo.dev/@kholmatov/github.com-jkkholmatov-my-app Github: https://github.com/JKKholmatov/my-app/tree/master

JKKholmatov avatar Aug 28 '23 17:08 JKKholmatov

Did you find any solution? I having this issue in a Expo Project @adembacajdev @roysG @UserNobody14

JKKholmatov avatar Aug 30 '23 12:08 JKKholmatov

Hi, Our problem was with the IP V6. The server we are used, did not supported in IP V6. Once we enabled the IP V6 everything was ok

roysG avatar Aug 30 '23 14:08 roysG

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 Feb 27 '24 05:02 github-actions[bot]

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

github-actions[bot] avatar Mar 05 '24 05:03 github-actions[bot]