When running tns run IOS --emulator
, the project builds successfully, however, it presents the error Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device.
Yes, this is a real problem.
When running tns run IOS --emulator
, the project builds successfully, however, it presents the error Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device.
iOS
tns --version
to fetch it): 3.4.3
node_modules/tns-core-modules/package.json
file in your project): 4.0.0
"tns-android"
and "tns-ios"
properties in thepackage.json
file of your project) 3.4.1
package.json
file of yourUnknown
Hi @mcaustin1,
Can you check if this error is reproducible with the latest CLI and iOS runtime? To do that you can follow the below-attached steps:
npm uninstall nativescript --g
npm install nativescript --g
tns platform remove ios
tns platform add ios
node_modules
folder.tns run ios
.I get the same error after following the steps above that @tsonevn mentioned. I ran tns run ios --emulator --log trace
and I get the same error. Here is the log from running it
```Loading extensions.
System information:
{ platform: 'darwin',
shell: '/bin/bash',
os: 'Darwin Austins-MacBook-Air.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64\n',
procArch: 'x64',
nodeVer: '8.5.0',
npmVer: '5.8.0',
nodeGypVer: null,
nativeScriptCliVersion: '4.0.0',
gitVer: '2.14.1',
dotNetVer: null,
javacVersion: '1.8.0_162',
adbVer: '1.0.39',
androidInstalled: true,
monoVer: null,
gradleVer: null,
isAndroidSdkConfiguredCorrectly: true,
xcodeVer: '9.3.0',
xcodeprojLocation: '/usr/local/bin/xcodeproj',
itunesInstalled: true,
cocoaPodsVer: '1.4.0',
isCocoaPodsWorkingCorrectly: true,
isCocoaPodsUpdateRequired: false,
pythonInfo: { isInstalled: true, isSixPackageInstalled: true } }
Looking for project in '/Users/austin/Desktop/apps/earings'
Project directory is '/Users/austin/Desktop/apps/earings'.
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
action: 'Check Local Build Setup',
label: 'Starting',
customDimensions: {} }
Initializing analytics statuses.
Analytics statuses: { TrackFeatureUsage: 'enabled', TrackExceptions: 'enabled' }
spawn: node "/usr/local/lib/node_modules/nativescript/lib/services/analytics/analytics-broker-process.js" "/usr/local/lib/node_modules/nativescript/lib/bootstrap.js"
Xcode is installed and is configured properly.
xcodeproj is installed and is configured properly.
CocoaPods are installed.
CocoaPods update is not required.
CocoaPods are configured properly.
Your current CocoaPods version is newer than 1.0.0.
Python installed and configured correctly.
The Python 'six' package is found.
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
action: 'Check Local Build Setup',
label: 'Finished: Is setup correct: true',
customDimensions: {} }
Exec xcodebuild -version | head -n 1 | sed -e 's/Xcode //'
stdout: 9.3
stderr:
Validate options for platform: iOS
Searching for devices...
startLookingForDevices; platform is iOS
Starting to look for iOS devices.
Found device with identifier 'EC3591F5-20AE-495D-93A2-E8347F03D15D'
startLookingForDevices; platform is iOS
Project dir from hooksArgs is: /Users/austin/Desktop/apps/earings.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/Users/austin/Desktop/apps/earings/hooks' ]
BeforeHookName for command liveSync is before-liveSync
Changes info in prepare platform: ProjectChangesInfo {
appFilesChanged: false,
packageChanged: false,
appResourcesChanged: false,
nativeChanged: false,
configChanged: false,
nativePlatformStatus: '3' }
Project dir from hooksArgs is: /Users/austin/Desktop/apps/earings.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/Users/austin/Desktop/apps/earings/hooks' ]
BeforeHookName for command shouldPrepare is before-shouldPrepare
Executing before-shouldPrepare hook from /Users/austin/Desktop/apps/earings/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Executing before-shouldPrepare hook at location /Users/austin/Desktop/apps/earings/hooks/before-shouldPrepare/nativescript-dev-webpack.js in-process
Validating before-shouldPrepare arguments.
Project dir from hooksArgs is: /Users/austin/Desktop/apps/earings.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/Users/austin/Desktop/apps/earings/hooks' ]
AfterHookName for command shouldPrepare is after-shouldPrepare
Skipping prepare.
Will send the following information to Google Analytics: { googleAnalyticsDataType: 'event',
action: 'LiveSync',
label: 'iOS_Simulator_11.3',
customDimensions: { cd2: 'Pure JavaScript' } }
Unable to get application path on device.
Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device..
Project dir from hooksArgs is: /Users/austin/Desktop/apps/earings.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/Users/austin/Desktop/apps/earings/hooks' ]
AfterHookName for command watch is after-watch
Executing after-watch hook from /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-sass.js
Executing after-watch hook at location /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-sass.js in-process
Validating after-watch arguments.
Executing after-watch hook from /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-webpack.js
Executing after-watch hook at location /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-webpack.js in-process
Validating after-watch arguments.
Project dir from hooksArgs is: /Users/austin/Desktop/apps/earings.
Hooks directories: [ '/usr/local/lib/node_modules/nativescript/lib/hooks',
'/usr/local/lib/node_modules/nativescript/lib/common/hooks',
'/Users/austin/Desktop/apps/earings/hooks' ]
AfterHookName for command liveSync is after-liveSync
```
The error line is: Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device..
Hi @mcaustin1,
Can you reproduce the same issue into sample NativeScript project?
Also, can you send us the package.json file of your project?
@tsonevn
I downloaded the sample-Groceries sample NativeScript project and the error is not thrown.
Here is my package.json:
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.earings",
"tns-ios": {
"version": "4.0.1"
}
},
"scripts": {
"lint": "eslint \"app/**/*.js\""
},
"dependencies": {
"nativescript-pro-ui": "~3.4.1",
"nativescript-theme-core": "~1.0.4",
"tns-core-modules": "4.0.0"
},
"devDependencies": {
"eslint": "~4.19.1",
"nativescript-dev-sass": "~1.5.0",
"nativescript-dev-webpack": "~0.10.2",
"webpack": "~4.6.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0",
"copy-webpack-plugin": "~4.5.1",
"raw-loader": "~0.5.1",
"css-loader": "~0.28.7",
"nativescript-worker-loader": "~0.8.1",
"resolve-url-loader": "~2.3.0",
"extract-text-webpack-plugin": "~3.0.2",
"uglifyjs-webpack-plugin": "~1.2.5",
"sass-loader": "~7.0.1",
"clean-webpack-plugin": "~0.1.19"
}
}
Hi @mcaustin1,
We are still unable to recreate the issue on our side. I noticed in your package.json file that it is used "nativescript-pro-ui": "~3.4.1",
, which is deprecated in favour of the separate plugins for every component. I would suggest to the replace the old plugin with the new ones and to check if you will have the same issue. More about the migration process can be found here. After the migration, make sure to delete node_modules and hook folders and to remove the platform before rebuilding tns platform remove ios
@tsonevn no luck, I still get the error.
Here is the console output after updating the plugins as well as, deleting the hooks folder and the node modules folder.
```Searching for devices...
[email protected] install /Users/austin/Desktop/apps/earings/node_modules/fsevents
node install
[fsevents] Success: "/Users/austin/Desktop/apps/earings/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
[email protected] install /Users/austin/Desktop/apps/earings/node_modules/node-sass
node scripts/install.js
Cached binary found at /Users/austin/.npm/node-sass/4.8.3/darwin-x64-57_binding.node
[email protected] postinstall /Users/austin/Desktop/apps/earings/node_modules/nativescript-worker-loader/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js
[email protected] postinstall /Users/austin/Desktop/apps/earings/node_modules/node-sass
node scripts/build.js
Binary found at /Users/austin/Desktop/apps/earings/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Testing binary
Binary is fine
[email protected] postinstall /Users/austin/Desktop/apps/earings/node_modules/nativescript-dev-sass
node postinstall.js
[email protected] postinstall /Users/austin/Desktop/apps/earings/node_modules/nativescript-dev-webpack
node postinstall.js
The current project contains a webpack.config.js file located at /Users/austin/Desktop/apps/earings/webpack.config.js that differs from the one in the new version of the nativescript-dev-webpack plugin located at /Users/austin/Desktop/apps/earings/node_modules/nativescript-dev-webpack/templates/webpack.javascript.js. Some of the plugin features may not work as expected until you manually update the webpack.config.js file or automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.
Dev dependency: webpack already added. Leaving version: ~4.6.0
Dev dependency: copy-webpack-plugin already added. Leaving version: ~4.5.1
Dev dependency: resolve-url-loader already added. Leaving version: ~2.3.0
Dev dependency: uglifyjs-webpack-plugin already added. Leaving version: ~1.2.5
Dev dependency: sass-loader already added. Leaving version: ~7.0.1
NativeScript Webpack plugin was successfully added.
You can now bundle your project by passing --bundle flag to NativeScript CLI commands:
- tns build android --bundle
- tns build ios --bundle
- tns run android --bundle
- tns run ios --bundle
You can also pass the "--env.uglify" flag to use UglifyJS for minification.
For more information check out https://docs.nativescript.org/tooling/bundling-with-webpack#bundling.
Some dependencies have already been added. If you want to force update them, please run "node_modules/.bin/update-ns-webpack".
added 1002 packages from 636 contributors in 30.174s
Copying template files...
⠏ Installing tns-ios
=== BUILD TARGET earings OF PROJECT earings WITH CONFIGURATION Debug ===
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/UIKit-1V5UHAPTOD24G.pcm: No such file or directory
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Dispatch-2LX9MWM6UEPQW.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/ObjectiveC-1RQA2RIXJIE19.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/UIKit-1V5UHAPTOD24G.pcm: No such file or directory
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Dispatch-2LX9MWM6UEPQW.pcm: No such file or directory
while processing /Users/austin/Desktop/apps/earings/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/ObjectiveC-1RQA2RIXJIE19.pcm: No such file or directory
Project successfully built.
Unable to apply changes on device: EC3591F5-20AE-495D-93A2-E8347F03D15D. Error is: Unable to get application path on device..
Executing after-watch hook from /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-sass.js
Executing after-watch hook from /Users/austin/Desktop/apps/earings/hooks/after-watch/nativescript-dev-webpack.js
```
Here is a video of me running the command with the error(not on rebuild).
https://youtu.be/GzMmbdogec8
In the iOS Simulator, try: Hardware > Erase All Content And Settings...
HI all,
Can you reproduce the issue with latest NativeScript 4.0.1?
@tsonevn I have abandoned this project and used a different template which has fixed it.
Hi @mcaustin1,
If you are no longer able to recreate the issue I assume that we can close this issue.
If the issue is reproduced again and we have stable steps to reproduce I will reopen it.
@gordonboyle Thanks a lot that was really really helpful..
omg i get this like every other build. latest global nativescript. Having to wipe all simulator data is frustrating since I have to reinstall proxy certs every time.
I am still getting this on 4.1.2 on a fresh install.
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/UIKit-1V5UHAPTOD24G.pcm: note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
No such file or directory
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
while processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
while processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Darwin-38I6DLZ5IH61J.pcm: No such file or directorywhile processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
while processing while processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o)/Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
:
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Foundation-3DFYNEBRQSXST.pcmwarning: : /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/Dispatch-2LX9MWM6UEPQW.pcmNo such file or directory:
No such file or directory
while processing while processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o)/Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: :
/Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/2DKXPQ92SAISO/ObjectiveC-1RQA2RIXJIE19.pcm: warning: No such file or directory/Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/Dispatch-2LX9MWM6UEPQW.pcm
: No such file or directory
while processing /Users/fakeuser/code/aa/packages/aa-client/nativescript/platforms/ios/internal/TKLiveSync/TKLiveSync(TKLiveSync.o):
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache/28BJBFDGVGZZ3/ObjectiveC-1RQA2RIXJIE19.pcm: No such file or directory
Project successfully built.
Unable to apply changes on device: 46151B95-90A9-4623-B1C8-5F4CA33663C3. Error is: Unable to get application path on device..
HI @vance,
Try to upgrade NativeScript CLI to 4.2.3
and check if you will be able to recreate the issue.
👍 tried with 4.2.3. Tried switching branches and back, re-yarning with new deps, rebooting etc. (just trying to simulate use over time). Seems to work. Was there a related PR to {N} which fixed this? Thanks, BTW.
HI @vance,
With the latest patch version, there were some improvements on the way how the app is deployed on a device/simulator and the app start. I am not sure if someone has worked on the same problem. Regarding that, I can not link any PR, that contains a fix for the problem.
Driving me nuts. It "installs", but apparently can't locate/copy from app/. That directory exists and is empty when I reach this state. So the app crashes after the splash screen.
Project successfully built.
Installing...
Successfully installed on device with identifier 'xxx-xxx-xxx-xxx-xxxxxxx'.
Unable to apply changes on device: xxx-xxx-xxx-xxx-xxxxxxx. Error is: cp: no such file or directory: /Users/xusr/code/aa/packages/aa-client/nativescript/platforms/ios/nativescript/app/*.
^C
:nativescript$ nativescript --version
4.2.3
Yeah, pretty untenable. Had to factory reset the emulator, uninstall nativescript, do npm clear cache -f, delete the repository, re-install nativescript, reclone, re-yarn, tns rebuild, re-install emulator certs. should I just make a bash script for that, or what? None of these by themselves did the trick.
@vance -- Is there a chance that your main package.json file does NOT match the name in your app/app_resources/ios/ files; I've seen this happen before when I tried to rename my app without getting all the files; it causes the rebuilds to not be able to know what the app is on the device.
Why is this issue closed? This is still happening after a fresh install of v5 CLI and a brand new hello world app. It's really frustrating and kinda kills the whole live sync benefit. I don't know what else I can do to solve this.
Hi all,
We were able to recreate the issue on one of our machines. Currently, we are working on identifying what is causing it. Follow up issue #4095.
I’m able to consistently reproduce this on MacOS high sierra. When I’m running a project in a simulator and live syncing, if I go out to Finder and copy the project folder to another location (just copying using the UI, not moving), the app immediately crashes in the sim and restart attempts lead to this error.
Maybe this will help troubleshoot
On Nov 8, 2018, at 2:52 AM, Nikolay Tsonev notifications@github.com wrote:
Hi all,
We were able to recreate the issue on one of our machines. Currently, we are working on identifying what is causing it. Follow up issue #4095.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
I am also able to consistently reproduce this on macOS High Sierra on multiple test projects. The issue occurs for me when:
tns run ios --bundle
in directory A, create a new project with the same name in directory B and run ins run ios --bundle
I solved this by resetting my Xcode 10 simulator device (or specifying a new one). Reset by opening the simulator device Hardware > Erase All Content and Settings. I did not need to reinstall nativescript
globally.
Thanks Mahmood. Yes, this is a good fix to keep developing, but it adds about an extra minute to the dev cycle per change. That’s totally unacceptable and needs to be actually fixed.
On Nov 10, 2018, at 6:50 AM, Zahid Mahmood notifications@github.com wrote:
I am also able to consistently reproduce this on macOS High Sierra on multiple test projects. The issue occurs for me when:
I copy a project as described by @alexziskind1, or
I run tns run ios --bundle in directory A, create a new project with the same name in directory B and run ins run ios --bundle
I solved this by resetting my Xcode 10 simulator device (or specifying a new one). Reset by opening the simulator device Hardware > Erase All Content and Settings. I did not need to reinstall nativescript globally.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
What I've found is when I get into this situation, just delete platforms
dir and run again.
Deleting "platforms" folder worked for me too. Thanks!
thanks to rynop. it worked for me as well
Most helpful comment
In the iOS Simulator, try: Hardware > Erase All Content And Settings...