File tree Expand file tree Collapse file tree 6 files changed +26
-5
lines changed Expand file tree Collapse file tree 6 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 8
8
9
9
- Add support for xCode 16. ([ #1370 ] ( https://github.com/Instabug/Instabug-React-Native/pull/1370 ) )
10
10
11
+ ### Fixed
12
+
13
+ - Not sending the inComplete xhrRequest. ([ #1365 ] ( https://github.com/Instabug/Instabug-React-Native/pull/1365 ) )
14
+
11
15
- Added more search capabilities to the find-token.sh script. e.g., searching in .env file for react config. [ #1366 ] ( https://github.com/Instabug/Instabug-React-Native/pull/1366 )
12
16
13
17
## [ 14.3.0] ( https://github.com/Instabug/Instabug-React-Native/compare/v14.1.0...14.3.0 )
Original file line number Diff line number Diff line change @@ -1296,6 +1296,8 @@ PODS:
1296
1296
- React-Core
1297
1297
- react-native-maps (1.10.3):
1298
1298
- React-Core
1299
+ - react-native-netinfo (11.4.1):
1300
+ - React-Core
1299
1301
- react-native-safe-area-context (4.12.0):
1300
1302
- React-Core
1301
1303
- react-native-slider (4.5.5):
@@ -1806,6 +1808,7 @@ DEPENDENCIES:
1806
1808
- react-native-config (from `../node_modules/react-native-config`)
1807
1809
- react-native-google-maps (from `../node_modules/react-native-maps`)
1808
1810
- react-native-maps (from `../node_modules/react-native-maps`)
1811
+ - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
1809
1812
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
1810
1813
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
1811
1814
- react-native-webview (from `../node_modules/react-native-webview`)
@@ -1935,6 +1938,8 @@ EXTERNAL SOURCES:
1935
1938
:path: "../node_modules/react-native-maps"
1936
1939
react-native-maps:
1937
1940
:path: "../node_modules/react-native-maps"
1941
+ react-native-netinfo:
1942
+ :path: "../node_modules/@react-native-community/netinfo"
1938
1943
react-native-safe-area-context:
1939
1944
:path: "../node_modules/react-native-safe-area-context"
1940
1945
react-native-slider:
Original file line number Diff line number Diff line change 11
11
},
12
12
"dependencies" : {
13
13
"@react-native-clipboard/clipboard" : " ^1.14.3" ,
14
+ "@react-native-community/netinfo" : " ^11.4.1" ,
14
15
"@react-native-community/slider" : " ^4.5.5" ,
15
16
"@react-navigation/bottom-tabs" : " ^6.5.7" ,
16
17
"@react-navigation/native" : " ^6.1.6" ,
Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ import axios from 'axios';
11
11
import type { HomeStackParamList } from '../../navigation/HomeStack' ;
12
12
import type { NativeStackScreenProps } from '@react-navigation/native-stack' ;
13
13
import { ListTile } from '../../components/ListTile' ;
14
+ import { useNetInfo } from '@react-native-community/netinfo' ;
14
15
15
16
export const NetworkScreen : React . FC <
16
17
NativeStackScreenProps < HomeStackParamList , 'NetworkTraces' >
17
18
> = ( { navigation } ) => {
18
19
const [ endpointUrl , setEndpointUrl ] = useState ( '' ) ;
19
20
const { width, height } = useWindowDimensions ( ) ;
21
+
22
+ const { isConnected } = useNetInfo ( ) ;
23
+
20
24
const defaultRequestUrl = 'https://jsonplaceholder.typicode.com/posts/1' ;
21
25
const imageUrls = [
22
26
'https://fastly.picsum.photos/id/57/200/300.jpg?hmac=l908G1qVr4r7dP947-tak2mY8Vvic_vEYzCXUCKKskY' ,
@@ -129,6 +133,7 @@ export const NetworkScreen: React.FC<
129
133
/>
130
134
< CustomButton onPress = { ( ) => refetch } title = "Reload GraphQL" />
131
135
< View >
136
+ < Text > { isConnected ? 'Network is Connected' : 'Network is not connected' } </ Text >
132
137
{ isLoading && < Text > Loading...</ Text > }
133
138
{ isSuccess && < Text > GraphQL Data: { data . country . emoji } </ Text > }
134
139
{ isError && < Text > Error!</ Text > }
Original file line number Diff line number Diff line change 2041
2041
prompts "^2.4.2"
2042
2042
semver "^7.5.2"
2043
2043
2044
+ " @react-native-community/netinfo@^11.4.1 " :
2045
+ version "11.4.1"
2046
+ resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-11.4.1.tgz#a3c247aceab35f75dd0aa4bfa85d2be5a4508688"
2047
+ integrity sha512-B0BYAkghz3Q2V09BF88RA601XursIEA111tnc2JOaN7axJWmNefmfjZqw/KdSxKZp7CZUuPpjBmz/WCR9uaHYg==
2048
+
2044
2049
" @react-native-community/slider@^4.5.5 " :
2045
2050
version "4.5.5"
2046
2051
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-4.5.5.tgz#d70fc5870477760033769bbd6625d57e7d7678b2"
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ const getTraceparentHeader = async (networkData: NetworkData) => {
85
85
} ) ;
86
86
} ;
87
87
88
- export const injectHeaders = async (
88
+ export const injectHeaders = (
89
89
networkData : NetworkData ,
90
90
featureFlags : {
91
91
isW3cExternalTraceIDEnabled : boolean ;
@@ -113,10 +113,7 @@ export const injectHeaders = async (
113
113
return injectionMethodology ;
114
114
} ;
115
115
116
- const identifyCaughtHeader = async (
117
- networkData : NetworkData ,
118
- isW3cCaughtHeaderEnabled : boolean ,
119
- ) => {
116
+ const identifyCaughtHeader = ( networkData : NetworkData , isW3cCaughtHeaderEnabled : boolean ) => {
120
117
if ( isW3cCaughtHeaderEnabled ) {
121
118
networkData . w3cCaughtHeader = networkData . requestHeaders . traceparent ;
122
119
return networkData . requestHeaders . traceparent ;
@@ -314,6 +311,10 @@ export default {
314
311
if ( traceparent ) {
315
312
this . setRequestHeader ( 'Traceparent' , traceparent ) ;
316
313
}
314
+ if ( this . readyState === this . UNSENT ) {
315
+ return ; // Prevent sending the request if not opened
316
+ }
317
+
317
318
originalXHRSend . apply ( this , [ data ] ) ;
318
319
} ;
319
320
isInterceptorEnabled = true ;
You can’t perform that action at this time.
0 commit comments