Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

GraphQL variables with non-ASCII contents will make Apollo Client request throw error

オープン
#1,482 コメント 2 件 リアクション 1 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@cdn34dd がすでに取り組んでいます。

2026年10月7日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, graphql, react-native, typescript

調査の方向性

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 の本文から書いたものです。

説明

awaiting response bug
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
  1. Use Expo 57
  2. Use @datadog/mobile-react-native-apollo-client in Apollo client
  3. Ensure variables are tracked
  4. 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時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DataDog/dd-sdk-reactnative のほかの issue

DataDog/dd-sdk-reactnative の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。