Have issues Network error on IOS 11 & 12
See original GitHub issueDescribe the issue
Axios.get() not working on IOS 11 & 12 and I got issues:
1. {"name":"Error","message":"Network Error","stack":"createError@http://10.124.3.25:3001/static/js/0.chunk.js:4802:24\nhandleError@http://10.124.3.25:3001/static/js/0.chunk.js:4297:25"}
2. {"name":"TypeError","message":"Right side of assignment cannot be destructured","stack":"parseResponse@http://10.124.3.25:3001/static/js/2.chunk.js:511:63\npromiseReactionJob@[native code]"}
Example Code
const HttpInstance = (headers = null, baseURLDomain = null) => {
class ApiConfig {
constructor(enforcer) {
if (enforcer !== singletonEnforcer) {
throw new Error('Cannot construct singleton');
}
this.client = getClient(headers, baseURLDomain);
}
static get instance() {
// Try to get an efficient singleton
if (!this[singleton]) {
this[singleton] = new ApiConfig(singletonEnforcer);
}
return this[singleton];
}
get(url, conf = {}) {
return this.client
.get(url, conf)
.then((response) => Promise.resolve(response))
.catch((error) => Promise.reject(error));
}
}
return ApiConfig.instance;
};
export default HttpInstance;
export const getConversationApi = (eventId, time) => {
const httpClient = HttpClient({
authorization: `Bearer ${Config.TOKEN}`,
});
return httpClient.get(`chats/internal/${eventId}/${time}`);
};
Expected behavior, if applicable
Environment
Axios Version ^0.20.0 Browser Safari Node.js Version v13.7.0 OS: 11.3, 12.3.1 React 16.13.1
Additional context/Screenshots
https://user-images.githubusercontent.com/23132483/92897197-335fe780-f447-11ea-8f83-1da88a134ad6.png
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:15 (3 by maintainers)
Top Results From Across the Web
IOS12 Update via ITunes Network Error
I am trying to update my IPhone to IOS12 via ITunes (due to space issues). I get a downloading window but after a...
Read more >How to fix the Unable to Verify Update iOS error
Can't update your iPhone or iPad to iOS 12? Unable to Verify Update iOS error getting you down? Here's the fix.
Read more >How to Fix an “Unable to Join the Network” Error in iOS
Go to Settings > General > Reset > Reset Network Settings ; Enter the devices passcode and confirm the reset; Let the iPhone/iPad...
Read more >How to fix iOS 12 WiFi problems on iPhone
Reset Network Settings by going to Settings » General » Reset. If nothing works, then either factory reset your WiFi router or your...
Read more >How to Fix Cellular & Wi-Fi Issues on Your iPhone in iOS 12
For any persistent problem that you can't seem to solve with settings, fore-restarting your iPhone is always a good tactic. Sometimes, your ...
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 Free
Top 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
The above is not a fully testable example, I need something that is ready to run and gives me the same error then I can have a look.
Ok, please can you provide a detailed example to test this on?