Undefined only on android
See original GitHub issueWhen i try to fetch anything from my api i get the following error in pidcat: [TypeError: undefined is not an object (evaluating 'error.response.status')]
. In your source is only one place with error.response.status
var getProblemFromError = function getProblemFromError(error) {
// first check if the error message is Network Error (set by axios at 0.12) on platforms other than NodeJS.
if (error.message === 'Network Error') return NETWORK_ERROR;
// then check the specific error code
return R.cond([
// if we don't have an error code, we have a response status
[R.isNil, function () {
return getProblemFromStatus(error.response.status);
}], [R.contains(R.__, TIMEOUT_ERROR_CODES), R.always(TIMEOUT_ERROR)], [R.contains(R.__, NODEJS_CONNECTION_ERROR_CODES), R.always(CONNECTION_ERROR)], [R.T, R.always(UNKNOWN_ERROR)]])(error.code);
};
Do you know what my problem is and what i’am doing wrong?
I use this commit https://github.com/skellock/apisauce/commit/7aa56ac3520e19a8327d8038af8ec8fb0079ffb5 and rn 0.32.0
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Share.open return message as undefined on android ...
Share.open return message as undefined on android device always once user share any content on other apps and return on actual app.
Read more >cannot read property 'direction' of undefined - Android Only
Hi I am using react-native-navigation and "react-native-gesture-handler": "^1.5.2" It works fine on ios but I get cannot read property ...
Read more >undefined - JavaScript - MDN Web Docs - Mozilla
The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types.
Read more >Preview Error: Cannot read property 'params' of undefined
Does anyone know how to fix it? I haven't set up any complex features, logic, or authentication. I am only building pages.
Read more >[SSL Pinning Plugin] Error - Cannot read property 'apply' ...
I have just tested the app on new android device. With Cloned Multilingual. The app is crashing and in error logs its showing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I bet https://github.com/skellock/apisauce/blob/master/lib/apisauce.js#L173 is the problem. We’re looking for an english match.
I did it like this because at the time, React Native wasn’t bubbling up the right platform networking error. There have been several changes since then, so I’ll have to go back and revisit that error message.
When i type the following in my terminal
adb shell input keyevent 82
the debug menu on my device opens and i pressDebug JS Remotely
everything works fine. When i disable the remote debugger every call throws the Network error.And i changed the device language to english and the status is still undefined.