question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Have issues Network error on IOS 11 & 12

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonsaaymancommented, May 17, 2021

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.

1reaction
jasonsaaymancommented, May 17, 2021

Ok, please can you provide a detailed example to test this on?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found