Skip to content

Error "Network request fail" (timeout) in android #26305

@navata

Description

@navata

Hi All,

I have used fetch to server and not use timeout in android. Information request:

  • Time request: about 10seconds
  • Method request: POST
    I have error as below for both HTTPS and HTTP. I try to research for this issue but not solution. I hope receive from your support.
    May be, we have issue timeout in Timeout XMLHttpRequest #26240. But it only close and not solution.

Error:
Screen Shot 2019-09-03 at 2 49 19 PM

Code:

return fetch(urlFull, {
        method: "POST", // *GET, POST, PUT, DELETE, etc.
        mode: "cors", // no-cors, cors, *same-origin
        cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
        credentials: "same-origin", // include, *same-origin, omit
        headers: {
            "Content-Type": "application/x-www-form-urlencoded"
            // "Content-Type": "application/json"
        },
        redirect: "follow", // manual, *follow, error
        referrer: "no-referrer", // no-referrer, *client
        body: qs.stringify(data)
        // body: JSON.stringify(data)
    })
        .then(res => res.json())
        .then(response => {
            console.log("response", response);
            return {
                data: response
            };
        })
        .catch(error => console.error("Error:", error));


Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions