Nativescript: "Unable to apply changes" on Simulator device when using Xcode 12

Created on 20 Aug 2020  Β·  20Comments  Β·  Source: NativeScript/NativeScript

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.8.0
  • Cross-platform modules: 7.0.0-rc.52
  • Android Runtime: 6.5.3
  • iOS Runtime: 7.0.0-beta.3-v8-2020-07-01-222820-05

Describe the bug
When running tns run ios --bundle --no-hmr --env.aot the following error is being displayed:

warning: 'UILaunchImages' has been deprecated, use launch storyboards instead. (in target 'mobile' from project 'mobile')
note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override: 
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Protobuf' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'PromisesObjC' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'lottie-ios' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'IQKeyboardManager' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MDFInternationalization' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseMessaging' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleDataTransport' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseInstallations' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseInstanceID' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCore' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleDataTransportCCTSupport' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Firebase' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseAnalytics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCoreDiagnosticsInterop' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseAnalyticsInterop' from project 'Pods')
Project successfully built.
The build result is located at: /Users/myuserprofile/develop/mycompany/mobile/platforms/ios/build/Debug-iphonesimulator/mobile.app
Unable to apply changes on device: BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592. Error is: ENOENT: no such file or directory, scandir '/Users/myuserprofile/Library/Developer/CoreSimulator/Devices/BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592/data/Applications'.

Expected behavior
Application should install and launch successfully on the Simulator device running iOS 14 beta.

Additional context
Here is the output of tns devices:

Connected devices & emulators
Searching for devices...
iTunes is not installed. Install it on your system and run this command again.
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ # β”‚ Device Name               β”‚ Platform β”‚ Device Identifier                    β”‚ Type     β”‚ Status    β”‚ Connection Type β”‚
β”‚ 1 β”‚ iPad Air (3rd generation) β”‚ iOS      β”‚ BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592 β”‚ Emulator β”‚ Connected β”‚ Local           β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Below are the configuration files:

package.json

"dependencies": {
  "@angular/animations": "~10.0.0",
  "@angular/common": "~10.0.0",
  "@angular/compiler": "~10.0.0",
  "@angular/core": "~10.0.0",
  "@nativescript/datetimepicker": "~2.0.0-rc.0",
  "@angular/forms": "~10.0.0",
  "@angular/platform-browser": "~10.0.0",
  "@angular/platform-browser-dynamic": "~10.0.0",
  "@angular/router": "~10.0.0",
  "@nativescript/angular": "10.0.0-rc.10",
  "@nativescript/appversion": "~2.0.0",
  "@nativescript/core": "~7.0.0-rc.52",
  "@nativescript/firebase": "11.0.0-rc.5",
  "@nativescript/iqkeyboardmanager": "~2.0.0",
  "@nativescript/local-notifications": "~5.0.0",
  "@nativescript/shared-notification-delegate": "~1.0.0",
  "@nativescript/theme": "~2.3.0",
  "@ngxs/devtools-plugin": "^3.6.2",
  "@ngxs/logger-plugin": "^3.6.2",
  "@ngxs/store": "^3.6.2",
  "@nota/nativescript-accessibility-ext": "^6.4.3",
  "@nota/nativescript-webview-ext": "^6.5.4",
  "base-64": "^0.1.0",
  "dayjs": "1.8.32",
  "istanbul-instrumenter-loader": "^3.0.1",
  "js-yaml": "^3.13.1",
  "moment": "^2.24.0",
  "nativescript-adobe-marketing-cloud": "^1.6.0",
  "nativescript-couchbase": "^1.0.18",
  "nativescript-drop-down": "^5.0.6",
  "nativescript-lottie": "^4.0.1",
  "nativescript-microsoft-appcenter": "^2.0.0",
  "nativescript-phone": "^2.0.0",
  "nativescript-theme-core": "^2.0.24",
  "nativescript-tslib": "^1.9.1-r1",
  "nativescript-ui-calendar": "~7.0.1",
  "npm-run-path": "^4.0.1",
  "p-finally": "^2.0.1",
  "reflect-metadata": "~0.1.12",
  "rxjs": "^6.6.2",
  "semver": "^6.3.0",
  "terser-webpack-plugin": "^4.0.0",
  "tslib": "^1.10.0",
  "utf8": "^3.0.0",
  "zone.js": "^0.10.3"
},
"devDependencies": {
  "@angular-devkit/schematics": "~10.0.0",
  "@angular/compiler-cli": "~10.0.0",
  "@nativescript/types": "^7.0.0-rc.0",
  "@nativescript/webpack": "^2.1.3",
  "@ngtools/webpack": "~10.0.0",
  "@types/chai": "^4.2.12",
  "@types/chai-spies": "^1.0.1",
  "@types/couchbase": "^2.4.2",
  "@types/karma-chai": "0.1.2",
  "@types/mocha": "^8.0.1",
  "@types/node": "^12.12.14",
  "@types/semver": "^7.3.1",
  "@typescript-eslint/eslint-plugin": "^3.8.0",
  "@typescript-eslint/eslint-plugin-tslint": "^3.8.0",
  "@typescript-eslint/parser": "^3.8.0",
  "aws-sdk": "^2.611.0",
  "babel-traverse": "6.26.0",
  "babel-types": "6.26.0",
  "babylon": "6.18.0",
  "chai": "4.2.0",
  "chai-as-promised": "~7.1.1",
  "chai-spies": "^1.0.0",
  "clean-webpack-plugin": "^3.0.0",
  "copy-webpack-plugin": "^6.0.3",
  "cross-env": "^6.0.3",
  "css-loader": "~3.2.0",
  "cucumber": "^6.0.5",
  "eslint": "^7.2.0",
  "eslint-config-prettier": "^6.11.0",
  "eslint-plugin-import": "^2.21.2",
  "eslint-plugin-jsdoc": "^27.0.7",
  "eslint-plugin-prefer-arrow": "^1.2.1",
  "eslint-plugin-prettier": "^3.1.4",
  "extract-text-webpack-plugin": "^3.0.2",
  "fs-extra": "^9.0.0",
  "husky": "^4.2.5",
  "karma": "^5.1.1",
  "karma-chai": "0.1.0",
  "karma-chai-spies": "^0.1.4",
  "karma-coverage": "^2.0.2",
  "karma-coverage-istanbul-reporter": "^3.0.3",
  "karma-mocha": "2.0.1",
  "karma-mocha-reporter": "^2.2.5",
  "karma-nativescript-launcher": "^0.4.0",
  "karma-webpack": "^4.0.2",
  "lazy": "1.0.11",
  "lint-staged": "^10.2.10",
  "mocha": "^7.0.1",
  "mocha-junit-reporter": "^1.23.3",
  "mocha-multi": "^1.1.3",
  "mocha-typescript": "^1.1.17",
  "mochawesome": "~4.1.0",
  "ms": "^2.0.0",
  "multiple-cucumber-html-reporter": "^1.18.0",
  "nativescript-custom-entitlements": "^0.2.0",
  "nativescript-dev-appium": "^6.1.3",
  "nativescript-unit-test-runner": "^0.7.0",
  "nativescript-worker-loader": "~0.9.0",
  "ngx-cookie-service": "^2.2.0",
  "node-sass": "4.13.1",
  "npm-force-resolutions": "0.0.3",
  "prettier": "^2.0.5",
  "raw-loader": "~0.5.1",
  "resolve-url-loader": "^3.1.1",
  "rimraf": "^3.0.2",
  "shelljs": "^0.8.4",
  "tslint": "6.1.2",
  "typescript": "^3.9.7",
  "uglifyjs-webpack-plugin": "^2.2.0",
  "webpack": "^4.44.1",
  "webpack-bundle-analyzer": "^3.8.0",
  "webpack-cli": "^3.3.12",
  "wiremock-standalone": "^2.26.3-1",
  "yargs": "^15.3.1"
}

tsconfig.json

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": true,
        "skipLibCheck": true,
        "lib": [
            "es2017",
            "dom",
            "es6",
            "ESNext"
        ],
        "types": [
            "node",
            "chai",
            "mocha",
            "chai-spies",
            "karma-chai",
            "couchbase"
        ],
        "baseUrl": ".",
        "paths": {
            "*": [
                "node_modules/@nativescript/*",
                "node_modules/*"
            ],
            "chai": [
                "app/tests/types/chai.d.ts"
            ],
            "~/*": [
                "app/*"
            ]
        }
    },
    "angularCompilerOptions": {
        "enableIvy": true,
    },
    "include": [
        "references.d.ts",
        "node_modules",
        "app/tests/**/*.ts"
    ],
    "files": [
        "./app/main.ts"
    ],
    "exclude": [
        "mammock",
        "node_modules",
        "platforms",
        "plugins/charts/demo",
        "plugins/charts/src/node_modules",
        "plugins/charts/src/references.d.ts",
        "**/*.aot",
        "e2e"
    ]
}

tsconfig.tns.json

{
    "extends": "./tsconfig",
    "compilerOptions": {
        "module": "ESNext",
        "moduleResolution": "node"
    }
}

Most helpful comment

I found that creating the folder "Applications" inside '/Users/yourusername/Library/Developer/CoreSimulator/Devices/yourdeviceid/data/' fix the issue

All 20 comments

I believe you need to use xcode-select and change the default CLI tools to use xcode 12.

Yeah, i've tried both sudo xcode-select --switch /Applications/Xcode-beta.app and sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer but still have this issue.

Hey @nevardreik Can you try erasing the simulator device and check.
Following are the steps:
47957997-bd280980-dfc1-11e8-9ce7-73cba5854988
4- Once you have crushed the state of emulation.
5- Exit and close the emulator.
6- Restart the command: $ tns run ios
Let me know, how it goes.

Hi @Ross-Olivares - still no luck unfortunately. Here's a more detailed strack trace that might help?

** BUILD SUCCEEDED **

Project dir from hooksArgs is: /Users/myuserprofile/develop/mycompany/mobile.
Hooks directories: [ '/Users/myuserprofile/develop/mycompany/mobile/hooks' ]
AfterHookName for command buildIOS is after-buildIOS
Project successfully built.
The build result is located at: /Users/myuserprofile/develop/mycompany/mobile/platforms/ios/build/Debug-iphonesimulator/mobile.app
Unable to apply changes on device: BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592. Error is: ENOENT: no such file or directory, scandir '/Users/myuserprofile/Library/Developer/CoreSimulator/Devices/BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592/data/Applications'.
Will emit event runOnDeviceError with data {
  projectDir: '/Users/myuserprofile/develop/mycompany/mobile',
  deviceIdentifier: 'BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592',
  applicationIdentifier: 'au.com.mycompany.nsmobile',
  error: Error: ENOENT: no such file or directory, scandir '/Users/myuserprofile/Library/Developer/CoreSimulator/Devices/BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592/data/Applications'
      at Object.readdirSync (fs.js:955:3)
      at Object.getInstalledApplications (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/iphone-simulator-common.js:18:31)
      at XCodeSimctlSimulator.getInstalledApplications (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/iphone-simulator-xcode-simctl.js:65:23)
      at Object.<anonymous> (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/ios-sim-portable/lib/ios-sim.js:102:76)
      at IOSSimulatorApplicationManager.<anonymous> (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js:37:32)
      at Generator.next (<anonymous>)
      at /Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js:13:71
      at new Promise (<anonymous>)
      at __awaiter (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js:9:12)
      at IOSSimulatorApplicationManager.getInstalledApplications (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/ios/simulator/ios-simulator-application-manager.js:36:16)
      at IOSSimulatorApplicationManager.<anonymous> (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/application-manager-base.js:55:77)
      at Generator.next (<anonymous>)
      at /Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/application-manager-base.js:7:71
      at new Promise (<anonymous>)
      at __awaiter (/Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/application-manager-base.js:3:12)
      at /Users/myuserprofile/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/common/mobile/application-manager-base.js:52:91 {
    errno: -2,
    syscall: 'scandir',
    code: 'ENOENT',
    path: '/Users/myuserprofile/Library/Developer/CoreSimulator/Devices/BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592/data/Applications'
  }
}
Stopping webpack watch for platform ios.
Project dir from hooksArgs is: /Users/myuserprofile/develop/mycompany/mobile.
Hooks directories: [ '/Users/myuserprofile/develop/mycompany/mobile/hooks' ]
AfterHookName for command watch is after-watch
Will emit event runOnDeviceStopped with data {
  projectDir: '/Users/myuserprofile/develop/mycompany/mobile',
  deviceIdentifier: 'BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592'
}
Webpack process exited with code null when we expected it to be long living with watch.

Hi @nevardreik
Apologies for the late reply.
We are going to try replicate this case on our end. Let me know if you can send us a sample project that can reproduce the issue.

Hi @Ross-Olivares - I have created a sample project for you here:
https://github.com/nevardreik/tns-angular10-ios14

Cheers

Hi @Ross-Olivares I have updated all dependencies in that project to use the latest, and the error is a bit different now...

 [email protected] πŸ’€  ξ‚° ~/develop/tns-angular10-ios14 > npm run ios 

> tns-angular10-ios14@ ios /Users/nevardreik/develop/tns-angular10-ios14
> ns run ios --bundle --no-hmr --env.aot

Searching for devices...
iTunes is not installed. Install it on your system and run this command again.
Preparing project...
File change detected. Starting incremental webpack compilation...

webpack is watching the files…

Hash: 36231dafca48db4cfa7e
Version: webpack 4.44.1
Time: 14341ms
Built at: 09/03/2020 8:02:13 AM
                                              Asset       Size                                            Chunks             Chunk Names
                                          bundle.js   3.34 KiB                                            bundle  [emitted]  bundle
                                       package.json  156 bytes                                                    [emitted]  
                                         runtime.js    5.9 KiB                                           runtime  [emitted]  runtime
tns_modules/@nativescript/core/inspector_modules.js  509 bytes  tns_modules/@nativescript/core/inspector_modules  [emitted]  tns_modules/@nativescript/core/inspector_modules
                                          vendor.js   7.26 MiB                                            vendor  [emitted]  vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
Entrypoint tns_modules/@nativescript/core/inspector_modules = runtime.js vendor.js tns_modules/@nativescript/core/inspector_modules.js
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.module.ts] 87 bytes {bundle} [built]
[./app.scss] 380 bytes {bundle} [built]
[./main.ts] 1.66 KiB {bundle} [built]
[./package.json] 158 bytes {bundle} {tns_modules/@nativescript/core/inspector_modules} [optional] [built]
    + 544 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Unable to apply changes on device: A636C4FE-B69C-4E5F-B6D9-B7AA6EF205B9. Error is: ENOENT: no such file or directory, scandir '/Users/nevardreik/Library/Developer/CoreSimulator/Devices/A636C4FE-B69C-4E5F-B6D9-B7AA6EF205B9/data/Applications'.

Running ns devices still shows the device is there:

[email protected] πŸ’€  ξ‚° ~/develop/tns-angular10-ios14 > ns devices

Connected devices & emulators
Searching for devices...
iTunes is not installed. Install it on your system and run this command again.
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ # β”‚ Device Name β”‚ Platform β”‚ Device Identifier                    β”‚ Type     β”‚ Status    β”‚ Connection Type β”‚
β”‚ 1 β”‚ iPhone 11   β”‚ iOS      β”‚ A636C4FE-B69C-4E5F-B6D9-B7AA6EF205B9 β”‚ Emulator β”‚ Connected β”‚ Local           β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Interestingly, if I run ns doctor --log trace I am getting the following (which I release is a nativescript-cli issue):

 [email protected] πŸ’€  ξ‚° ~/develop/tns-angular10-ios14 ξ‚° ξ‚  master ξ‚° ns doctor --log trace 

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*                                                                                                                                               *
*  The "TRACE" log level might print some sensitive data like secrets or access tokens in request URLs. Be careful when you share this output.  *
*                                                                                                                                               *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Trying to get macOS version.
Exec system_profiler SPSoftwareDataType -detailLevel mini 
 stdout: Software:

    System Software Overview:

      System Version: macOS 11.0 (20A5354i)
      Kernel Version: Darwin 20.0.0
      Time since boot: 6 days 23:58


 stderr: 
macOS version based on system_profiler is 11.0.
Looking for project in '/Users/nevardreik/develop/tns-angular10-ios14'
Project directory is '/Users/nevardreik/develop/tns-angular10-ios14'.
Loading extensions.
System information:
{
  "platform": "darwin",
  "shell": "/bin/zsh",
  "os": "Darwin BATWORK.local 20.0.0 Darwin Kernel Version 20.0.0: Fri Aug 14 00:25:13 PDT 2020; root:xnu-7195.40.44.151.1~4/RELEASE_X86_64 x86_64\n",
  "procArch": "x64",
  "nodeVer": "12.18.3",
  "npmVer": "6.14.8",
  "nodeGypVer": null,
  "nativeScriptCliVersion": "7.0.3",
  "gitVer": "2.24.3 (Apple Git-128)",
  "dotNetVer": null,
  "javacVersion": "1.8.0_265",
  "javaVersion": "1.8.0_265",
  "javaPath": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java",
  "adbVer": "1.0.41",
  "androidInstalled": true,
  "monoVer": null,
  "gradleVer": null,
  "isAndroidSdkConfiguredCorrectly": true,
  "xcodeVer": "12.0.0",
  "xcodeprojLocation": "/usr/local/bin/xcodeproj",
  "itunesInstalled": false,
  "cocoaPodsVer": "1.9.3",
  "isCocoaPodsWorkingCorrectly": true,
  "isCocoaPodsUpdateRequired": false,
  "pythonInfo": {
    "isInstalled": true,
    "isSixPackageInstalled": true
  }
}
Current CLI version:  7.0.3
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/nevardreik/develop/tns-angular10-ios14/hooks' ]
BeforeHookName for command resolveCommand is before-resolveCommand
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/nevardreik/develop/tns-angular10-ios14/hooks' ]
AfterHookName for command resolveCommand is after-resolveCommand
Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal.
The stackTrace of the location trying to handle SIGINT is:
    at process.on (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/nativescript-cli.js:26:28)
    at /Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/signal-exit/index.js:128:15
    at Array.filter (<anonymous>)
    at load (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/signal-exit/index.js:126:21)
    at module.exports (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/signal-exit/index.js:36:5)
    at Object.<anonymous> (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/node_modules/proper-lockfile/lib/lockfile.js:331:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
spawn: /Users/nevardreik/.nvm/versions/node/v12.18.3/bin/node "/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/detached-processes/cleanup-process.js" "/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/bootstrap.js"
Initializing analytics statuses.
Analytics statuses:  { TrackFeatureUsage: 'disabled', TrackExceptions: 'disabled' }
β ‹ Getting environment information 
βœ– Getting environment information 

TypeError: Cannot read property 'filter' of null
    at DoctorService.<anonymous> (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/services/doctor-service.js:56:36)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/nevardreik/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/services/doctor-service.js:11:58)

I get the same thing, on 3 different projects, there seems to be some incompatibility with NS and Xcode 12.

I found that creating the folder "Applications" inside '/Users/yourusername/Library/Developer/CoreSimulator/Devices/yourdeviceid/data/' fix the issue

I have the same issue.

@louisportalest that worked!!! You are a hero, thank you!

@OPADA-Eng try do add the Applications folder inside the data folder as @louisportalest describes πŸ‘πŸ»

I found that creating the folder "Applications" inside '/Users/yourusername/Library/Developer/CoreSimulator/Devices/yourdeviceid/data/' fix the issue

I found this too, but it's not a suitable fix.

@Ross-Olivares has there been any progress on fixing this properly?

@nevardreik I agree, it's definitely not suitable

Am I the only one that couldn't solve this issue with the workaround suggested in here? My error message is almos identical except at the end it shows:
Unable to apply changes on device: CE34A729-ADB7-49B0-B998-3F3905176DBC. Error is: Command xcodebuild failed with exit code 65.
Adding the applications folder to it doesn't do anything.

Am I the only one that couldn't solve this issue with the workaround suggested in here? My error message is almos identical except at the end it shows:
Unable to apply changes on device: CE34A729-ADB7-49B0-B998-3F3905176DBC. Error is: Command xcodebuild failed with exit code 65.
Adding the applications folder to it doesn't do anything.

I have the same issue, have u solved it?

@huyaxiong I think my issue is that I'm still using Nativescript 6. Maybe support in limited to Nativescript 7 now? I ended up just downgrading xcode for now: https://developer.apple.com/download/more/

https://developer.apple.com/download/more/

Thank you for your reply! I will try it.

Am I the only one that couldn't solve this issue with the workaround suggested in here? My error message is almos identical except at the end it shows:
Unable to apply changes on device: CE34A729-ADB7-49B0-B998-3F3905176DBC. Error is: Command xcodebuild failed with exit code 65.
Adding the applications folder to it doesn't do anything.

Please check that you are using the latest tns-ios > 6.5.3... as described here : https://nativescript.org/blog/nativescript-6-7-xcode-compatibility/

So my set ups is NS ^6 and update manualy tns-core-modules to 6.5.20 and tns-ios, then created the folder and i was able to keep my current configuration, also if you find problem with your dev check #8867

Was this page helpful?
0 / 5 - 0 ratings

Related issues

minjunlan picture minjunlan  Β·  3Comments

Pourya8366 picture Pourya8366  Β·  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  Β·  3Comments

hshristov picture hshristov  Β·  3Comments

Leo-lay picture Leo-lay  Β·  3Comments