You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{fetch}from'BlackBerry-Dynamics-for-React-Native-Networking';asynccomponentDidMount(){try{letres=awaitfetch('http://my-private-url.com',{method : 'GET',headers : {}});letresponse=awaitres.text();// let response = await res.json(); // tried this method as well, getting same behaviour}catch(error){console.log('errr-----',error);}}
I am getting the following error sometimes and sometimes it works fine (Note - on the same API, same response) :-
Can you help me by suggesting what I might be doing wrong?
Am I using the fetch from BlackBerry-Dynamics-for-React-Native-Networking correctly?
React Native Version - 0.63.4,
BB Dynamics SDK version - 8.1
Sometimes it works fine, sometimes it gives error.
I am making 3-4 API requests at the time of loading of my application, sometimes the 3rd request fails, sometimes the 1st one fails and happens like this randomly.
Some of my findings which tell me whether I got a successful response or not -
The blob size when we get successful response is significantly greater (around 1200) than when we get an error response (around 50) on the same API, same response.
When I get a successful response, the responseURL is correct but when I don't get a successful response, the responseURL is - "http://10.0.2.2:8081/symbolicate".
Also, most of the times, I get an error on the first time my app is loaded after going through the BB authorization screens. It works fine most of the times after I refresh my app.
XHR when I get a successful response -
XHR when I get error -
Do these findings help in any way?
The text was updated successfully, but these errors were encountered:
Here is my code snippet
I am getting the following error sometimes and sometimes it works fine (Note - on the same API, same response) :-
Can you help me by suggesting what I might be doing wrong?
Am I using the
fetch
fromBlackBerry-Dynamics-for-React-Native-Networking
correctly?React Native Version - 0.63.4,
BB Dynamics SDK version - 8.1
Sometimes it works fine, sometimes it gives error.
I am making 3-4 API requests at the time of loading of my application, sometimes the 3rd request fails, sometimes the 1st one fails and happens like this randomly.
I logged the xhr before this line - https://github.com/blackberry/BlackBerry-Dynamics-React-Native-SDK/blob/master/modules/BlackBerry-Dynamics-for-React-Native-Networking/js/fetch.js#L483
Some of my findings which tell me whether I got a successful response or not -
The blob size when we get successful response is significantly greater (around 1200) than when we get an error response (around 50) on the same API, same response.
When I get a successful response, the responseURL is correct but when I don't get a successful response, the responseURL is - "http://10.0.2.2:8081/symbolicate".
Also, most of the times, I get an error on the first time my app is loaded after going through the BB authorization screens. It works fine most of the times after I refresh my app.
XHR when I get a successful response -
XHR when I get error -
Do these findings help in any way?
The text was updated successfully, but these errors were encountered: