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

[Android] : Requests response body in debugger arent ungzipped

Open LucasBourgeois opened this issue 2 years ago • 3 comments

Description

All is explained here : The refered issue was closed because of unactivity, still the problem is here.

Description

I send to a server handling GZIP encoding as a body response a request.

Android : The request is stuck in Pending in devtool network inspector and the body response looks like:

x���ms�F�&��\u0015�>�kFV\u0007�=�˵��TwmWmם��{��`�\b��""\u0010\u0005 HQmk�o��&���t�RJeJ5��P;$3����_ ���9�\u0000�\u001d@0�

Ios: Devtool is giving response body uncompressed for iOS, for instance a JSON body response.

For information: if i inspect through AndroidStudio app inspector my app and the related network, Responses body are well ungzipped. Also, even if request is Pending and body is compressed, the Promise is resolved and responses is ok.

React Native Version

0.71.14

Output of npx react-native info

System: OS: macOS 13.2.1 CPU: (8) arm64 Apple M1 Memory: 93.67 MB / 16.00 GB Shell: version: 5.8.1 path: /bin/zsh Binaries: Node: version: 20.9.0 path: ~/.nvm/versions/node/v20.9.0/bin/node Yarn: version: 1.22.15 path: /opt/homebrew/bin/yarn npm: version: 10.1.0 path: ~/.nvm/versions/node/v20.9.0/bin/npm Watchman: version: 2023.11.06.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.11.3 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 22.2 - iOS 16.2 - macOS 13.1 - tvOS 16.1 - watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: Giraffe 2022.3.1 Patch 1 Giraffe 2022.3.1 Patch 1 Xcode: version: 14.2/14C18 path: /usr/bin/xcodebuild Languages: Java: version: 11.0.16.1 path: /usr/bin/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: ^18.2.0 react-native: installed: 0.72.6 wanted: 0.72.6 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: Not found newArchEnabled: Not found iOS: hermesEnabled: Not found newArchEnabled: Not found

Steps to reproduce

  • Create a RN expo app.

  • Execute a http request with fetch or axios (as you want).

fetch('A-SERVER-RESOURCE-HANDLING-GZIP');

Snack, screenshot, or link to a repository

https://github.com/wsliaw/react-native-stream-client https://github.com/wsliaw/stream

LucasBourgeois avatar Nov 10 '23 14:11 LucasBourgeois

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Nov 10 '23 14:11 github-actions[bot]

: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.14. 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 Nov 10 '23 14:11 github-actions[bot]

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 May 12 '24 05:05 github-actions[bot]

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

github-actions[bot] avatar May 19 '24 05:05 github-actions[bot]

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

github-actions[bot] avatar May 19 '24 05:05 github-actions[bot]