GraphQL variables with non-ASCII contents will make Apollo Client request throw error
维护者通常 2 天内回复
@cdn34dd 已经在做这个了。
开始于 2026年10月7日。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- android, graphql, react-native, typescript
- 领域
- mobile, observability
调研方向
The crash is from putting GraphQL variables JSON (including emoji) into the _dd-custom-header-graph-ql-variables header that expo/fetch rejects on Android. Start in packages/react-native-apollo-client where variable tracking is configured and those custom headers are attached. Encode, strip, or skip non-ASCII header values for this path, then re-run an Apollo mutation with emoji in variables on Expo 57 Android.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
After upgrading Expo to 57 we noticed this Android error ApolloError: fetch failed: Call to function 'NativeRequest.start' has been rejected. when performing GraphQL mutations with variables that contain emoji's. I believe this happens because the default fetch package changed from RN fetch to expo/fetch in Expo version 56. expo/fetch uses different native request classes which only accepts ASCII chars in headers of requests on Android. It seems like that @datadog/mobile-react-native-apollo-client does not properly set or unset these headers for this type of request.
Reproduction steps
- Use Expo 57
- Use
@datadog/mobile-react-native-apollo-clientin Apollo client - Ensure variables are tracked
- Perform Apollo Client mutation on Android with emoji's inside variables
SDK logs
ApolloError: fetch failed: Call to function 'NativeRequest.start' has been rejected.
→ Caused by: java.lang.IllegalArgumentException: Unexpected char 0xd83d at 720 in _dd-custom-header-graph-ql-variables value: { [JSON with emoji @ char 720] }
at ApolloError (index.android.bundle:1:6655429)
at error (index.android.bundle:1:9155927)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at anonymous (index.android.bundle:1:8629368)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at anonymous (index.android.bundle:1:6605223)
at forEach (native)
at error (index.android.bundle:1:7956749)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at error (index.android.bundle:1:8653842)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at error (index.android.bundle:1:8653842)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at error (index.android.bundle:1:8637041)
at notifySubscription (index.android.bundle:1:4252026)
at error (index.android.bundle:1:6650787)
at anonymous (index.android.bundle:1:8633576)
at tryCallOne (InternalBytecode.js:1:1296)
at anonymous (InternalBytecode.js:1:4984)
Expected behavior
Apollo client requests should not fail because of dd graphql variable tracking.
Affected SDK versions
expo@57 + @datadog/[email protected]
Latest working SDK version
expo@55 + @datadog/[email protected]
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
No response
Package.json Contents
No response
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response
- 主要语言
- TypeScript
- 星标
- 145
- 派生
- 65
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataDog/dd-sdk-reactnative 的其他 Issue
-
bug
难度 3/5 1-2 天 新手友好度 62/100
DataDog/dd-sdk-reactnative#1486 · 3 条评论 ·
维护者通常 2 天内回复
-
Expose Android app startup Activity filtering in the React Native SDK可能已有人在做 @sbarrio 于 4 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 35/100
DataDog/dd-sdk-reactnative#1485 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Interaction tracking records nothing: the babel plugin's injected import makes Metro bundle a second copy of the SDK, so DdBabelInteractionTracking.config is set on a different class than instrumented handlers call可能已有人在做 @cdn34dd 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
DataDog/dd-sdk-reactnative#1377 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes build可能已有人在做 @cdn34dd 于 4 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 76/100
DataDog/dd-sdk-reactnative#1353 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
iOS: network error events from JS-tracked requests bypass the drop_resource deduplication and cannot be filtered — expose a native error mapper?可能已有人在做 @marco-saia-datadog 于 4 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 58/100
DataDog/dd-sdk-reactnative#1338 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 DataDog/dd-sdk-reactnative 的全部 Issue
相似的 Issue
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#32365 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#3706 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
copperheadhq/copperhead#378 ·
维护者通常 1 天内回复