ENOENT system.log while running ionic emulate ios - ios

I am following this guide: http://ionicframework.com/getting-started/
Once I get to ionic emulate ios I get
Error: ENOENT: no such file or directory, stat '/Users/$USERNAME/Library/Logs/CoreSimulator/DCB9BBDE-FFEC-43CD-B88E-FFFB6CBF0045/system.log'
I tried what other people did to solve their problem, like
chown your $HOME to yourself
remove platforms folder
remove XCode and install again
But none of this solved my problem.
I am on OSX El Capitan, using node v4.3.1 installed with nave (might this be an issue?).
I've tried with a fresh new project and got this
ENOENT: no such file or directory, stat '/Users/$USER/Library/Logs/CoreSimulator/FF5BE4A0-C42E-4C35-884F-21EFC514A846/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/$USER/workspace/myApp/platforms/ios/build/emulator/myApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/$USER/workspace/myApp/platforms/ios/cordova/console.log,--stdout,/Users/$USER/workspace/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/$USER/workspace/myApp/platforms/ios/cordova/run: Command failed with exit code 2
Thank you in advance

Hi please see my answer to the following question:
ionic emulate ios (domain=com.apple.CoreSimulator.SimError, code=163)
After this, I tried:
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
in terminal and was able to run the app in a simulator

Related

cordova permission denied on mac terminal

I installed globaly cordova and already get the path when I type which cordova, it show cordova: aliased to /Users/myusername/lib/node_modules/cordova/bin
but when I type cordova create hello com.example.hello HelloWorld, it got response as zsh: permission denied: /Users/myusername/lib/node_modules/cordova/bin
then I tried type sudo chown -R myusername /Users/myusername/lib/node_modules/cordova/bin
but it got response as zsh: permission denied: /Users/myusername/lib/node_modules/cordova/bin when I type cordova create hello com.example.hello HelloWorld again.
how to repair it so I can create new ios cordova project from my angular app?
I type npm config set prefix /usr/local, and then after enter I type npm install -g cordova and enter again. the I can got cordova --version. It starting create new project when I type cordova create hello com.example.hello HelloWorld.
that is the solution for me. Hope this can help other.
After having the issue above when trying to install it globally, I tried locally and it worked. Simply type the following on Terminal:
npm install cordova

Intern on IOS - Unable to launch WebDriverAgent because of xcodebuild failure: not found: carthage

When I am running Intern Standalone
staring appium and then Running Intern Script Script perfectly works
By when I Run same using java Program at that time it gives issue
UnknownError: [POST http://localhost:65505/wd/hub/session / {"desiredCapabilities":{"name":"DS/tests/intern.js","idle-timeout":60,"platformName":"iOS","deviceName":"iPhone 6","bundleId":"com.apple.mobilesafari","automationName":"XCUITest","Simulator":true}}] An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: not found: carthage
at Server.createSession
Carthage is installed correctly
Is there any access issue to it
Please please help
Problem with Carthage Folder, Check in below path /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent
Carthage Folder
If it is not there, Follow Below steps
Step-1: For Appium 1.15.1 and above
Open below path in Terminal
$ cd /Applications/Appium.app/Contents/Resources/app/node_modules
$ sudo chmod -R 777 . appium-webdriveragent/*
Step-2: goto
1) $ cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
2) sudo mkdir -p Resources/WebDriverAgent.bundle
3) sudo sh ./Scripts/bootstrap.sh -d
Step-3: Build WebDriverAgent Project with sign
Open below project in XCode
/Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj

Installing watchman when having a non-standard homebrew install

I am using React Native which needs watchman. When running react-native run-ios, I see this error.
watchman --no-pretty get-sockname returned with exit code=1, signal=null,
stderr= 2017-05-05T08:17:49,256: [2110218240] while computing sockname:
failed to create /usr/local/var/run/watchman/foo-state: No such file or directory
After investigating this, it seems that it is caused by not having a standard /usr/local/ homebrew install.
Is their a way to change the statedir being used by watchman?
I was able to solve this issue by creating the directory and giving my user the ownership of the directory.
sudo mkdir /usr/local/var/run/watchman/foo-state
sudo chown -R myusername /usr/local/var/run/watchman/foo-state
From watchman --help:
--statefile=PATH Specify path to file to hold watch and trigger state
So I think you need to use the --statefile option.
The safest way to resolve this is to delete the state dir. Run rm -rf /usr/local/var/run/watchman/root-state. This resolved the same problem for me.

Error While adding Cordova Platform add iOS

I am using Mac OS Sierra v10.12 and getting error while adding to my Phonegap project within the folder myApp:
$ node -v
v7.2.0
$ npm -v
3.10.9
$ cordova platform add ios
received following errors:
Error during untar for /Users/{user_name}/.cordova/lib/npm_cache/cordova-ios/4.3.0/package.tgz: Error: EACCES: permission denied, open '/Users/{user_name}/.cordova/lib/npm_cache/cordova-ios/4.3.0/package/package.json'
Error: Failed to fetch platform ios
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: EACCES: permission denied, open '/Users/{user_name}/.cordova/lib/npm_cache/cordova-ios/4.3.0/package/package.json'
Note: {user_name} is my mac user Id, Can anybody help me!
I think you have to issue with permission to add platform .
Try to following :
$sudo chown -R {user_name} /Users/{user_name}/.cordova/lib/npm_cache/
For more please check here.
Hopes this will help you !
Maybe this is a cache problem of cordova. Delete the cache and try to add the platform again:
rm -rf ~/.cordova
Try upgrading npm, this worked for me:
npm install npm#latest -g

cant run ios simulator on cordova

On running the command
cordova emulate ios
I get an error, as below. I actually get rm: could not remove & permission denied errors so I use sudo. I was able to run this no problem, and then after a reboot - although nothing was changed - this function does not work. After build succeeded - deploying to emulator I get this error
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
ENOENT: no such file or directory, stat '/Users/user/Library/Logs/CoreSimulator/8F3C9A0F-D432-49A4-84DA-D0480829884A/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/user/helloworld/platforms/ios/build/emulator/helloworld.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-4s,--stderr,/Users/user/helloworld/platforms/ios/cordova/console.log,--stdout,/Users/user/helloworld/platforms/ios/cordova/console.log,--exit
Error: /Users/user/helloworld/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I have reinstalled sudo npm install ios-sim -g and same error. How can I run it properly?
This happens due to the permissions on mac:
Here are the steps you can use to correct this issue:
Empty the 'platforms' folder in your Cordova project.
Re-run Cordova platform add ios, Cordova build ios, and Cordova emulate ios without sudo.
If you are on a Mac and are still getting a permissions error, make sure all the files in your user's home folder actually belong to that user by running sudo chown -R username /Users/username
Its happening when you don't have simulator configurations for the root user.
Following command worked for me
sudo npm install -g ios-sim
If it's not working you can try removing platforms as the root user and add it back as normal user.
This happens because xcode command line tools are not installed in your system
https://github.com/driftyco/ionic/issues/4657.
Do a xcode-select --install from your terminal and reboot the system should work fine.

Resources