Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nativescript: Socket connection timed out

I am on Mac and I want to run my app on a USB-C connected Android device.

My first step is always to remove node_modules, hooks and platforms folders, aswell as package.lock.json file. After that I run tns build android. Once the build is completed I either run tns run android or start the application via nativescript sidekick.

But it always ends like this now:

Project successfully built. Installing on device 5B24000362... Successfully installed on device with identifier '5B24000362'. Unable to apply changes on device: 5B24000362. Error is: Socket connection timed out..

Since I had this error already 2 days ago and could not continue working on the App, I updated all nativescript and angular dependencies following this upgrade instructions. After that update, the app worked again. But now after a few hours I get the same error again (same app). I even pushed the app to a git repository after it worked, and recloned it now, does not work.

like image 265
Alessandro Santamaria Avatar asked Dec 24 '22 03:12

Alessandro Santamaria


2 Answers

If you have nativescript-plugin-firebase installed. Just update it with:
$ tns plugin update nativescript-plugin-firebase

like image 68
CENT1PEDE Avatar answered Dec 28 '22 06:12

CENT1PEDE


I ran into this same issue. Interestingly, in my case, it was because the emulated device did not have enough storage to install the app. As soon as I deleted some other builds off of it, it worked.

like image 26
Yermo Lamers Avatar answered Dec 28 '22 08:12

Yermo Lamers