Skip to content

Cannot set property 'socket' of null #3818

Closed
@tsonevn

Description

@tsonevn

From @RoyiNamir on August 12, 2018 9:42

After upgrading our project to 4.2 , we've experiencing socket connections problems to a real device when tns run android

Worth to mention that tns run android does work with emulators ( both Geny & AVD) , but it doesn't work with real devices ( my Galaxy s8+ and a colleague's Galaxy s8 , non rooted regular device)

C:\projects-web-storm\digital\dsapp1>tns info
√ Getting NativeScript components versions information...
√ Component nativescript has 4.2.1 version and is up to date.
√ Component tns-core-modules has 4.2.0 version and is up to date.
√ Component tns-android has 4.2.0 version and is up to date.
× Component tns-ios is not installed.

When tns run android :

we get :

Unable to apply changes on device: ce031713a8d0149e0d. Error is: Socket connection timeouted..
Executing after-watch hook from C:\projects-web-storm\digital\dsapp1\hooks\after-watch\nativescript-dev-sass.js
Executing after-watch hook from C:\projects-web-storm\digital\dsapp1\hooks\after-watch\nativescript-dev-typescript.js
Stopping tsc watch
Executing after-watch hook from C:\projects-web-storm\digital\dsapp1\hooks\after-watch\nativescript-dev-webpack.js
TypeError: Cannot set property 'socket' of null
    at Timeout.tryConnect [as _onTimeout] (C:\Users\royin\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\android-livesync-tool.js:298:51)
    at ontimeout (timers.js:482:11)
    at tryOnTimeout (timers.js:317:5)
    at Timer.listOnTimeout (timers.js:277:5)

--> Video showing the problem <--

The app IS installed but not invoked. ( it used to work) before upgrade.
We have to tap the launch icon in order to see the app running
PackageID is the same in all files ( manifest / packagejson)

BTW - if you want a real project that produces it , I can send privately.


Windows machine , Android , Antivirus & firewall is disabled , uninstalled App from device.

Copied from original issue: NativeScript/NativeScript#6180

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions