Error: Failed to connect to

Lately I am randomly getting this error throughout my app

Error: Failed to connect to

My app id is E27B10A2-C4B9-A5A6-FF6A-AB65CBE35A00

The device is conected to the wifi router and the connection is stable . Is there anything happening with our app ?

Thank You

Hello Constantin,

The URL used by default in our SDKs is I am not sure where the other part in the referenced message comes from. The error references Java, however you tagged the post with JavaScript. Which one are you using?
The error appears to be specific to your client-side environment. If it were something more generic, we’d be hearing about it from a lot of people.


Hi Mark
Thanks for the reply.

I am using Nativescript + Angular for my app and the Backendless Javascript SDK

That’s the error I am seeing in the debug console when I print out the response header:

“originalStack”: “Error: Failed to connect to\n at new ZoneAwareError (file:///data/data/…/files/app/vendor.js:92218:33)\n at onRequestComplete (file:///data/data/…/files/app/vendor.js:98555:34)\n at Object.onComplete (file: node_modules@nativescript\core\http\http-request\”

I just did a lookup and IP resolves to though I do not know how it gets added to the api URL


Hi Constantin,

Could you try opening up in a browser on the machine/device where the error occurs?

Do you get a normal (non-error) response?


Yep, I see the ‘All works’ message

This tells me the browser can connect to our servers just fine. Does the problem happen when you run it on an Android device?

Yes, it’s on an android version 10 device

What version of Android SDK is it? Some earlier versions didn’t have all the ciphers to do SSL handshake.

Hi Mark
It’s version 10

Thank you and I apologize about asking a redundant question.

  • Could you try disconnecting from Wi-fi and use only provider’s mobile data. Does the problem happen then?
  • Does the problem happen in Android emulator on the desktop?
  • Does the problem happen on other Android devices?


Sorry I should have mention it does not happen on emulators. Actually one of the emulators runs same android 10 version.

As for mobile data it happens same as with wifi, and it is random. i.e. I can navigate through the app just fine but it randomly stops and throws the network error.

I will try with other devices

Hi Mark
I was searching for the “Network error” message that shows up in my console and found it in \node_modules\backendless-request\es\index.js line 117

request.onerror = function handleErrorEvent() {
reject(new Error(‘Network Error’));
request = null;

If I debug the request path before the request is opened I see the path is correct’HUNEDOARA’

On the request.onerror I print out the request and we get this

“UNSENT”: 0,
“OPENED”: 1,
“DONE”: 4,
“_responseType”: “”,
“_listeners”: {},
“_readyState”: 4,
“_options”: {
"url": “’HUNEDOARA’”,
“method”: “GET”,
“headers”: {}
“_errorFlag”: true,
“_response”: {
"originalStack": "Error: Failed to connect to\n at new ZoneAwareError (file:///data/data/com.leadingedge.motocare/files/app/vendor.92218:33)\n at onRequestComplete (file:///data/data/com.leadingedge.motocare/files/app/vendor.98555:34)\n at Object.onComplete (file: node_modules@nativescript\core\http\http-request\"
** },**
“_responseTextReader”: null,
“_headers”: null,
“_status”: null,
“_sendFlag”: false

Could there be an issue with the backendless request js?

Thank you,

Hi Constantin,

Please take a look at the stack trace.

As you can see the call originates here:


This is outside of backendless-request. It has something to do with that node module.
Have you tried the things we discussed? Such as running the app on another Android device? Different version of Android perhaps?


Hi Mark
A bit difficult to get other devices right now due to isolation but I will try soon.
I wanted to eliminate everything else, and indeed this is not caused by the backendless-request but weirdly enough is only happening when calling My app also calls a weather api and google places + maps api and it does not happen with those calls. And giving the randomess of this it is very difficult to trace it down. I will try other devices and hopefully it won’t be an issue.
Thank you very much for your time,

Hi Constantin,

I am on Android 9 (OxygenOS 9.0.11). I’ll be happy to try it on my phone, if you’d like. Send me the APK and I’ll give it a shot.


Thanks Mark I apreciate it
I did some code review and found an uncaught error in a chain of requests to backendeless. When this error occurs any other subsequent calls to backendless throw network error until I restart the app. That error is fixed but I found another way to reproduce and that’s when the device goes in idle mode. When the activity resumes the call to backenless throws network error, but if I navigate to another activity and get back then it works.

So I need to think about when the user will actually have no network and better handle the error. Anyway I will put together a simple app and try reproduce this and will send it to you. Thanks again for your time.