[DevTools] Network panel truncates response bodies containing multibyte UTF-8 characters
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, ios, javascript, react-native
- Lĩnh vực
- devtools, networking
Hướng nghiên cứu
Start by reproducing with a fetch() call to an endpoint returning the example JSON with multibyte characters, then compare the response body's byte length with its character length along the path that serves Network.getResponseBody over CDP. The payload names no source files or tests, so locating the truncation point is the first real task. Done means the Network panel's Response and Preview tabs show the full body for a body containing multibyte UTF-8 characters.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
In the React Native DevTools Network panel, response bodies containing multibyte UTF-8
characters (e.g. á, é, ó) are displayed truncated in both the Response and
Preview tabs.
The number of missing trailing characters matches the number of multibyte characters in
the body, which suggests a byte-length vs. character-length mismatch when the response
preview is stored or served via CDP (Network.getResponseBody).
- ASCII-only responses render correctly.
- The app itself receives the full, valid body — only the DevTools preview is affected.
- Because the JSON is cut, Preview cannot parse it and falls back to raw text.
- Reproducible on both iOS and Android.
Steps to reproduce
- Serve an endpoint returning:
{"m":["Inténtelo de nuevo más tarde"]}
- Call it with
fetch()from the app while React Native DevTools is open. - Open the Network panel → select the request → Response / Preview tab.
Expected behavior
The full body is displayed:
{"m":["Inténtelo de nuevo más tarde"]}
Actual behavior
The body is cut short by N characters, where N is the number of multibyte characters it
contains. In the example above (2 multibyte chars), the closing "]} is missing or
partially missing, so the JSON is invalid and Preview shows raw text.
Real-world example: a 120-character body with 3 multibyte characters (ó, é, á) is
missing exactly its last 3 characters ("]}).
React Native Version
0.84.1
Affected Platforms
Runtime - iOS, Runtime - Android
Tested on iOS Simulator (iPhone 18 Pro, iOS 27) and Android emulator. New Architecture and
Hermes enabled on both.
Output of npx @react-native-community/cli info
System:
OS: macOS 27.0.1
CPU: (15) arm64 Apple M5 Pro
Memory: 87.63 MB / 24.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.18.0
path: ~/.asdf/installs/nodejs/22.18.0/bin/node
Yarn:
version: 1.22.22
path: ~/.asdf/installs/nodejs/22.18.0/bin/yarn
npm:
version: 10.9.3
path: ~/.asdf/plugins/nodejs/shims/npm
Watchman:
version: 2026.04.27.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 27.0
- iOS 27.0
- macOS 27.0
- tvOS 27.0
- visionOS 27.0
- watchOS 27.0
Android SDK: Not Found
IDEs:
Android Studio: 2025.3 AI-253.32098.37.2534.15232325
Xcode:
version: 27.0/27A266a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.19
path: /usr/bin/javac
Ruby:
version: 3.2.3
path: ~/.asdf/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.1.2
wanted: 20.1.2
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.84.1
wanted: 0.84.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
N/A — no errors are thrown; the response preview is silently truncated.
Screenshots and Videos
- Ngôn ngữ chính
- JavaScript
- Star
- 5.6k
- Fork
- 702
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của react/metro
-
constant-folding-plugin emits 0/0 (NaN) for arithmetic on destructured bindingsCó thể đã có người làm @cpruijsen đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
react/metro#1927 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[0.83.x] Backport micromatch removal and dotfile/multipart watcher fix togetherCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 2 ngày
-
`dependencies is not iterable` / `Cannot read property 'reduce' of undefined`: `FileStore` serves zero-prefixed cache files as hitsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
react/metro#1961 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Async chunk URLs drop the file extension, so .cjs async imports fail with "Requiring unknown module"Có thể đã có người làm @dasjideepak đã nhận 16 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
react/metro#1959 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Files changed during startup can be missed until restartCó thể đã có người làm @cpruijsen đã nhận 4 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 2 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 8 ngày
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkĐang mởfactory-active task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel/ai#23375 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
pacocartones/free-llm-api-hub#347 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wpilibsuite/wpilib-docs#3378 ·
Maintainer thường phản hồi trong vòng 1 ngày