Search code examples
nativescriptnativescript-angular

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.


Solution

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