breautek commented on issue #1336:
URL:
https://github.com/apache/cordova-android/issues/1336#issuecomment-911815438
`ECONNABORTED` means software code has aborted the connection. This could
happen either on the client or the server.
I'm not familiar with `axios` library, but at the the base JS API level, if
you're not calling on `.abort()` method on the `XMLHttpRequest` instance and
you still see an `ECONNABORTED` error, that means the server software is
aborting/killing the connection. In which case, you'll need access to the
server's logging to investigate why it might be killing the connection.
Cordova does not manipulate the use of `XMLHttpRequest` in anyway, so for
this reason I'll be closing this ticket. I'll however will provide you with
some tips that might help you isolate the issue.
First I'd recommend isolating the issue away from axios. This is to prove
that the fault isn't in the axios library (which perhaps could even be hiding
the true error). I'd recommend attempting to recreate your API request using
the raw `XMLHttpRequest` object. Based on what you provided above, this should
look something like:
```javascript
let xhr = new XMLHttpRequest();
xhr.open('POST', 'https://licences.#####.fr/api/subscribe');
xhr.onload = function() {
console.log(xhr, xhr.responseText);
};
xhr.onerror = function(e) {
console.error(e, xhr);
};
xhr.send();
```
You could even try using the snippet above inside the dev tools console, and
look at the network tab for the response.
If you require further assistance, the community on our
[slack](http://slack.cordova.io/) may be able to help you further.
Kind regards,
Norman
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]