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 88
99-  Add support for xCode 16. ([ #1370  ] ( https://github.com/Instabug/Instabug-React-Native/pull/1370 ) )
1010
11+ ### Fixed  
12+ 
13+ -  Not sending the inComplete xhrRequest. ([ #1365  ] ( https://github.com/Instabug/Instabug-React-Native/pull/1365 ) )
14+ 
1115-  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 ) 
1216
1317## [ 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:
12961296    - React-Core
12971297  - react-native-maps (1.10.3):
12981298    - React-Core
1299+   - react-native-netinfo (11.4.1):
1300+     - React-Core
12991301  - react-native-safe-area-context (4.12.0):
13001302    - React-Core
13011303  - react-native-slider (4.5.5):
@@ -1806,6 +1808,7 @@ DEPENDENCIES:
18061808  - react-native-config (from `../node_modules/react-native-config`)
18071809  - react-native-google-maps (from `../node_modules/react-native-maps`)
18081810  - react-native-maps (from `../node_modules/react-native-maps`)
1811+   - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
18091812  - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
18101813  - "react-native-slider (from `../node_modules/@react-native-community/slider`)"
18111814  - react-native-webview (from `../node_modules/react-native-webview`)
@@ -1935,6 +1938,8 @@ EXTERNAL SOURCES:
19351938    :path: "../node_modules/react-native-maps"
19361939  react-native-maps:
19371940    :path: "../node_modules/react-native-maps"
1941+   react-native-netinfo:
1942+     :path: "../node_modules/@react-native-community/netinfo"
19381943  react-native-safe-area-context:
19391944    :path: "../node_modules/react-native-safe-area-context"
19401945  react-native-slider:
Original file line number Diff line number Diff line change 1111  },
1212  "dependencies" : {
1313    "@react-native-clipboard/clipboard" : " ^1.14.3" 
14+     "@react-native-community/netinfo" : " ^11.4.1" 
1415    "@react-native-community/slider" : " ^4.5.5" 
1516    "@react-navigation/bottom-tabs" : " ^6.5.7" 
1617    "@react-navigation/native" : " ^6.1.6" 
Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ import axios from 'axios';
1111import  type  {  HomeStackParamList  }  from  '../../navigation/HomeStack' ; 
1212import  type  {  NativeStackScreenProps  }  from  '@react-navigation/native-stack' ; 
1313import  {  ListTile  }  from  '../../components/ListTile' ; 
14+ import  {  useNetInfo  }  from  '@react-native-community/netinfo' ; 
1415
1516export  const  NetworkScreen : React . FC < 
1617  NativeStackScreenProps < HomeStackParamList ,  'NetworkTraces' > 
1718>  =  ( {  navigation } )  =>  { 
1819  const  [ endpointUrl ,  setEndpointUrl ]  =  useState ( '' ) ; 
1920  const  {  width,  height }  =  useWindowDimensions ( ) ; 
21+ 
22+   const  {  isConnected }  =  useNetInfo ( ) ; 
23+ 
2024  const  defaultRequestUrl  =  'https://jsonplaceholder.typicode.com/posts/1' ; 
2125  const  imageUrls  =  [ 
2226    'https://fastly.picsum.photos/id/57/200/300.jpg?hmac=l908G1qVr4r7dP947-tak2mY8Vvic_vEYzCXUCKKskY' , 
@@ -129,6 +133,7 @@ export const NetworkScreen: React.FC<
129133            /> 
130134            < CustomButton  onPress = { ( )  =>  refetch }  title = "Reload GraphQL"  /> 
131135            < View > 
136+               < Text > { isConnected  ? 'Network is Connected'  : 'Network is not connected' } </ Text > 
132137              { isLoading  &&  < Text > Loading...</ Text > } 
133138              { isSuccess  &&  < Text > GraphQL Data: { data . country . emoji } </ Text > } 
134139              { isError  &&  < Text > Error!</ Text > } 
Original file line number Diff line number Diff line change 20412041    prompts "^2.4.2" 
20422042    semver "^7.5.2" 
20432043
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+ 
20442049" @react-native-community/slider@^4.5.5 " 
20452050  version "4.5.5" 
20462051  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) => {
8585  } ) ; 
8686} ; 
8787
88- export  const  injectHeaders  =  async   ( 
88+ export  const  injectHeaders  =  ( 
8989  networkData : NetworkData , 
9090  featureFlags : { 
9191    isW3cExternalTraceIDEnabled : boolean ; 
@@ -113,10 +113,7 @@ export const injectHeaders = async (
113113  return  injectionMethodology ; 
114114} ; 
115115
116- const  identifyCaughtHeader  =  async  ( 
117-   networkData : NetworkData , 
118-   isW3cCaughtHeaderEnabled : boolean , 
119- )  =>  { 
116+ const  identifyCaughtHeader  =  ( networkData : NetworkData ,  isW3cCaughtHeaderEnabled : boolean )  =>  { 
120117  if  ( isW3cCaughtHeaderEnabled )  { 
121118    networkData . w3cCaughtHeader  =  networkData . requestHeaders . traceparent ; 
122119    return  networkData . requestHeaders . traceparent ; 
@@ -314,6 +311,10 @@ export default {
314311      if  ( traceparent )  { 
315312        this . setRequestHeader ( 'Traceparent' ,  traceparent ) ; 
316313      } 
314+       if  ( this . readyState  ===  this . UNSENT )  { 
315+         return ;  // Prevent sending the request if not opened 
316+       } 
317+ 
317318      originalXHRSend . apply ( this ,  [ data ] ) ; 
318319    } ; 
319320    isInterceptorEnabled  =  true ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments