nativescript-cli: Unable to apply changes on device: xxxxxx. Error is: Socket timed out..

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.1.0-2019-07-22-110314-13705
  • Cross-platform modules: 6.1.0-next-2019-07-24-141042-01
  • Android Runtime: 6.1.0-2019-07-29-182447-01
  • Plugin(s): “@nstudio/nativescript-checkbox”: “^1.0.0”, “babel-cli”: “^6.26.0”, “babel-preset-react-app”: “^3.1.2”, “font-awesome”: “^4.7.0”, “g”: “^2.0.1”, “nativescript-bottombar”: “^3.0.8”, “nativescript-calendar”: “^2.1.0”, “nativescript-checkbox”: “^3.0.3”, “nativescript-couchbase-plugin”: “^0.9.1”, “nativescript-drop-down”: “^5.0.2”, “nativescript-floatingactionbutton”: “^5.1.0”, “nativescript-image-zoom”: “^3.0.3”, “nativescript-material-icons”: “^1.0.3”, “nativescript-modal-datetimepicker”: “^1.2.0”, “nativescript-nbmaterial-calendar”: “^1.0.1”, “nativescript-ng2-fonticon”: “^1.3.4”, “nativescript-plugin-firebase”: “^9.0.3”, “nativescript-ripple”: “^2.2.1”, “nativescript-social-share”: “^1.5.2”, “nativescript-theme-core”: “^2.0.2”, “nativescript-ui-dataform”: “^5.0.0”, “nativescript-ui-listview”: “^7.0.1”, “nativescript-ui-sidedrawer”: “^7.0.0”, “tns”: “^0.2.0”, “tns-core-modules”: “^6.1.0-next-2019-07-20-015811-02”

Describe the bug

For some reason, today I tried running my app, and it keeps saying: Unable to apply changes on device: 3852564c33593398. Error is: Socket connection timed out… I have tried many of the solutions listed here, such as deleting hooks, platforms, package.json, I’ve tried wiping my repo, and cloning it again from GitHub from a branch I know works but it still fails. I’ve tried adding the applicationId in app.gradle but still nada. I’ve tried different cables, phones emulators, and a whole combination of the above steps. I have updated to NativeScript 6 recently, but that was over a week ago, and it was working fine until today. Note that the errors in the log info were present before this issue occurred.

Log Info Preparing project… File change detected. Starting incremental webpack compilation… Starting type checking service… Using 1 worker with 4096MB memory limit

webpack is watching the files…

Hash: 78a04e3d1fb6a6cc0769 Version: webpack 4.27.1 Time: 4268ms Built at: 07/30/2019 7:57:21 PM Asset Size Chunks Chunk Names bundle.js 1.34 MiB bundle [emitted] bundle fonts/BentonSans-Bold.otf 24.8 KiB [emitted] fonts/BentonSans-Medium.otf 24.9 KiB [emitted] fonts/BentonSans-Regular.otf 24.7 KiB [emitted] fonts/HelveticaNeueBold.ttf 59.7 KiB [emitted] fonts/HelveticaNeueCondensedBlack.ttf 73.3 KiB [emitted] fonts/HelveticaNeueLight.ttf 124 KiB [emitted] fonts/HelveticaNeueMedium.ttf 119 KiB [emitted] fonts/MaterialIcons-Regular.ttf 125 KiB [emitted] fonts/NotoSans-Regular.ttf 389 KiB [emitted] fonts/OpenSans-Bold.ttf 219 KiB [emitted] fonts/OpenSans-Regular.ttf 212 KiB [emitted] fonts/Roboto-Bold.ttf 167 KiB [emitted] fonts/Roboto-Regular.ttf 168 KiB [emitted] fonts/fontawesome-webfont.ttf 162 KiB [emitted] fonts/fontawesome-webfont.woff 95.7 KiB [emitted] fonts/materialdesignicons-webfont.ttf 534 KiB [emitted] images/apartments.png 14.8 KiB [emitted] images/blank-profile-image.png 22.3 KiB [emitted] images/brian.png 184 KiB [emitted] images/category-filter.png 294 bytes [emitted] images/cupboard.jpg 1.14 MiB [emitted] images/date-filter.png 287 bytes [emitted] images/drawer-icon.png 318 bytes [emitted] images/food-and-beverage-category.png 6.88 KiB [emitted] images/image.jpg 227 KiB [emitted] images/lois.png 77.5 KiB [emitted] images/owe-indicator.png 302 bytes [emitted] images/owed-indicator.png 302 bytes [emitted] images/pat.png 171 KiB [emitted] images/peter.png 446 KiB [emitted] images/total-indicator.png 302 bytes [emitted] images/trioLogo.png 195 KiB [emitted] package.json 157 bytes [emitted] runtime.js 71.4 KiB runtime [emitted] runtime tns-java-classes.js 0 bytes [emitted] vendor.js 4.8 MiB vendor [emitted] vendor viewmodels/default-profile-picture/default_picture.png 1.25 KiB [emitted] views/home/app-page/app-images/plusIcon.png 1.09 KiB [emitted] views/home/app-page/choose-mentor-page/mentor/images/mentorIcon.jpg 21.3 KiB [emitted] views/home/settings-page/settings-images/settings.png 318 bytes [emitted] views/login/login_images/Handshake-Home-Page-Button.png 70.3 KiB [emitted] views/login/login_images/WSU-Apartments-sign.jpg 78.8 KiB [emitted] views/login/login_images/fafsa.jpg 10 KiB [emitted] views/login/login_images/logo.png 195 KiB [emitted] views/login/login_images/maxresdefault.jpg 114 KiB [emitted] views/login/login_images/mind-human-brain-thought-vector-of-the-brain-gear.jpg 87.8 KiB [emitted] views/login/login_images/trio-logo.png 66.4 KiB [emitted] views/login/login_images/wsu-cougarhead.png 10.5 KiB [emitted] views/login/login_images/wsutc.png 7.28 KiB [emitted] Entrypoint bundle = runtime.js vendor.js bundle.js [./ sync ^./app.(css|scss|less|sass)$] . sync nonrecursive ^./app.(css|scss|less|sass)$ 174 bytes {bundle} [built] [./ sync recursive (?<!\bApp_Resources\b.).(xml|css|js|(?<!.d.)ts|(?<!\b_[\w-].)scss)$] . sync (?<!\bApp_Resources\b.).(xml|css|js|(?<!.d.)ts|(?<!\b_[\w-].)scss)$ 6.03 KiB {bundle} [built] [./app-root-viewmodel.ts] 1 KiB {bundle} [built] [./app-root.ts] 421 bytes {bundle} [optional] [built] [./app-root.xml] 825 bytes {bundle} [optional] [built] [./app.css] 4.83 KiB {bundle} [optional] [built] [./app.ts] 1.95 KiB {bundle} [built] [./constants/advisorDatabaseConstants.js] 1.24 KiB {bundle} [optional] [built] [./constants/advisorDatabaseConstants.ts] 303 bytes {bundle} [optional] [built] [./constants/appointmentConstants.js] 593 bytes {bundle} [optional] [built] [./constants/appointmentConstants.ts] 286 bytes {bundle} [optional] [built] [./constants/constants.ts] 404 bytes {bundle} [built] [./material-design-icons.css] 52.7 KiB {bundle} [optional] [built] [./utils/couchbase.js] 3.92 KiB {bundle} [optional] [built] [./utils/firebase.ts] 12.2 KiB {bundle} [built] + 339 hidden modules

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(8,40): TS2305: Module ‘“…/…/…/…/…/GitHub/WSUTC_TRIOApp/node_modules/tns-core-modules/ui/frame/frame”’ has no exported member ‘stack’.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(12,15): TS2749: ‘UserViewModel’ refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/register/register-view-model.ts(13,18): TS2749: ‘myDialogs’ refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts(6,15): TS2749: ‘UserViewModel’ refers to a value, but is being used as a type here.

ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts ERROR in D:/GitHub/WSUTC_TRIOApp/app/views/resetpassword/reset-view-model.ts(8,18): TS2749: ‘myDialogs’ refers to a value, but is being used as a type here. Webpack compilation complete. Watching for file changes. Webpack build done! nativescript-plugin-firebase: D:\GitHub\WSUTC_TRIOApp\platforms\android.pluginfirebaseinfo not found, forcing prepare! nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare! Built aar for nativescript-plugin-firebase Chokidar raised event change for D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ripple\platforms\android\include.gradle. Built aar for nativescript-nbmaterial-commons Chokidar raised event change for D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-nbmaterial-commons\platforms\android\include.gradle. nativescript-plugin-firebase: D:\GitHub\WSUTC_TRIOApp\platforms\android.pluginfirebaseinfo not found, forcing prepare! nativescript-plugin-firebase: running release build or change in environment detected, forcing prepare! Project successfully prepared (android) Configure firebase Copy D:\GitHub\WSUTC_TRIOApp\app\App_Resources\Android\google-services.json to D:\GitHub\WSUTC_TRIOApp\platforms\android\app\google-services.json. Building project… Gradle build… + setting applicationId + applying user-defined configuration from D:\GitHub\WSUTC_TRIOApp\app\App_Resources\Android\app.gradle + using andorid X library androidx.legacy:legacy-support-v4:1.0.0 + adding nativescript runtime package dependency: nativescript-optimized-with-inspector + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-calendar\platforms\android\nativescript_calendar.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-couchbase-plugin\platforms\android\fancycouchbase-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-plugin-firebase\platforms\android\firebase-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-plugin-firebase\platforms\android\nativescript_plugin_firebase.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-social-share\platforms\android\nativescript_social_share.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-dataform\platforms\android\TNSDataForm-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-listview\platforms\android\TNSListView-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-sidedrawer\platforms\android\TNSSideDrawer-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-nbmaterial-commons\platforms\android\nativescript_nbmaterial_commons.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-autocomplete\platforms\android\TNSAutoComplete-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\nativescript-ui-core\platforms\android\TNSCore-release.aar + adding aar plugin dependency: D:\GitHub\WSUTC_TRIOApp\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

To Reproduce

Run “tns run android” in the terminal.

Expected behavior The application to run correctly.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Hi guys,

Thanks for reporting it!

Reviewing the provided logs and additional details, I suppose that you’ve faced an issue with LiveSyncing when the application is closed/uninstalled.

I’ve just merged a pull request with a fix which is available as a Release Candidate (npm i nativescript@rc -g). Could you give it a try and update us back?

P.S. The fix should be officially released with the next patch release in a few days.