From 20ac42a5a324ad553324d15ad868a1fea1868641 Mon Sep 17 00:00:00 2001 From: Snow Pettersen Date: Wed, 11 Dec 2024 20:28:15 -0800 Subject: configure the bitdrift Capture SDK (#6979) * configure bitdrift Capture SDK * remove console log * use the new url * add patch to fix devtool interaction * update patches * fix patch * add BITDRIFT_API_KEY to .env.example --- patches/expo-modules-core+2.1.1.md | 3 +++ patches/expo-modules-core+2.1.1.patch | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patches/expo-modules-core+2.1.1.md create mode 100644 patches/expo-modules-core+2.1.1.patch (limited to 'patches') diff --git a/patches/expo-modules-core+2.1.1.md b/patches/expo-modules-core+2.1.1.md new file mode 100644 index 000000000..a71324c19 --- /dev/null +++ b/patches/expo-modules-core+2.1.1.md @@ -0,0 +1,3 @@ +## expo-modules-core Patch + +This patch fixes an issue where bitdrift's API stream gets blocked by the Expo interceptor used to power the devtools diff --git a/patches/expo-modules-core+2.1.1.patch b/patches/expo-modules-core+2.1.1.patch new file mode 100644 index 000000000..f3d9bfd14 --- /dev/null +++ b/patches/expo-modules-core+2.1.1.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/devtools/ExpoNetworkInspectOkHttpInterceptors.kt b/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/devtools/ExpoNetworkInspectOkHttpInterceptors.kt +index 47c4d15..afe138d 100644 +--- a/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/devtools/ExpoNetworkInspectOkHttpInterceptors.kt ++++ b/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/devtools/ExpoNetworkInspectOkHttpInterceptors.kt +@@ -125,6 +125,10 @@ internal fun peekResponseBody( + } + + internal fun shouldParseBody(response: Response): Boolean { ++ if (response.request.url.encodedPath == "/bitdrift_public.protobuf.client.v1.ApiService/Mux") { ++ return false ++ } ++ + // Check for Content-Type + val skipContentTypes = listOf( + "text/event-stream", // Server Sent Events -- cgit 1.4.1