I'm using Ionic 4, Cordova 9, Nodejs 10.16, npm 6.9 and I would like to run the app on my device.
I just reinstalled Android Studio to the latest version and I got an error when using the run command:
Command
ionic cordova run android --device
Error (DEVICEID - My Device ID)
Error: Command failed: P:\Simplifiedpath\platform-tools/adb -s DEVICEID shell getprop
When using --verbose, I get those details:
ionic:lib:shell Error in subprocess stdout pipe: Error [ERR_STREAM_WRITE_AFTER_END]: write after end at writeAfterEnd (_stream_writable.js:248:12) at Object.Writable.write (_stream_writable.js:296:5) at Readable.write (C:\Simplifiedpath\npm\node_modules\ionic\node_modules\stream-combiner2\node_modules\readable-stream\lib\_stream_readable.js:85
What's the point about this error ?
after update sdk/platform-tools to version 29, i have the same error, to resolve:
Open Android Studio, and go to File>Settings>Android SDK on tab "SDK Tools" and uncheck
"Android SDK Platform-Tools 29" and click "Apply" to uninstall platform-tools
Then. download platform-tools 28 from this link
https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip
uncompress "platform-tools" under sdk directory, for example: "C:\Users\User\AppData\Local\Android\sdk"
to check if good, see File>Settings>Android SDK on tab "SDK Tools", now look like the image
Related
React native build fails in pipeline on IOS step
We run ios in the azure devops pipeline with npx react-native run-ios --configuration Release
==============================================================================
Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version : 2.201.1
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
npx react-native run-ios --configuration Release
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /Users/runner/work/_temp/ae9db986-f3a7-4f07-a6ba-d2250f5bfb5a.sh
info Found Xcode workspace "Navitus.xcworkspace"
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
error Command failed: open /Applications/Xcode_13.2.1.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID EA2BA6D4-C48C-4C19-A440-403677562929
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
.
Error: Command failed: open /Applications/Xcode_13.2.1.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID EA2BA6D4-C48C-4C19-A440-403677562929
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}
at checkExecSyncError (child_process.js:790:11)
at Object.execFileSync (child_process.js:827:15)
at runOnSimulator (/Users/runner/work/1/s/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:208:28)
at Object.runIOS [as func] (/Users/runner/work/1/s/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
at Command.handleAction (/Users/runner/work/1/s/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:192:23)
at Command.listener (/Users/runner/work/1/s/node_modules/commander/index.js:315:8)
at Command.emit (events.js:400:28)
at Command.parseArgs (/Users/runner/work/1/s/node_modules/commander/index.js:651:12)
at Command.parse (/Users/runner/work/1/s/node_modules/commander/index.js:474:21)
at setupAndRun (/Users/runner/work/1/s/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:271:24)
info Run CLI with --verbose flag for more details.
##[error]Bash exited with code '1'.
Finishing: iOS Build
To resolve "kLSNoExecutableErr: The executable is missing", you can try the following workarounds according to dsame:
retry:
steps:
- name: Open Simulator app
run: |
while ! open -Fn /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app; do
echo "Retry"
done
echo "Success"
Update launch database:
steps:
- name: Open Simulator app
run: |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app
open -Fn /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app
Reference: Launch Services database problems: correcting and rebuilding
I am getting error while deploying Oracle MAF application on android device. My error is mentioned in the image below:
I have already tried
adb kill-server
adb start-server
adb restart
But i am not getting the solution.
screenshot of error
This error seems to occur when Android SDK Platform Tools are updated to the latest version(Currently 27.0.1). Reverting to an older version will fix this.
I am currently on version 25.0.6. and am able to deploy to Android successfully.
I am new to Appium and I am running a selenium script with device connected and while running in terminal i am getting this error:
“Error: ENOENT: no such file or directory, scandir ‘/Documents/android-sdk-linux/build-tools’ at Error (native)”
I am running in Linux. Can you please help me out ?
You need to paste this two lines in .bashrc file
export ANDROID_HOME=/home/rijomon/Documents/android-sdk-linux/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
then you will not get that error
This error is caused when Appium can not find a valid path to the Android SDK in the ANDROID_HOME environment variable
...or when the SDK installation is corrupt.
Rijo Mon's answer is correct for his system but the ANDROID_HOME path will need to be changed to point to the actual location of your installed SDK.
Install Android Studio if you aren't already using it.
Make sure only one version of Android SDK is installed in Android studio, and make sure Android Studio does not display any errors or warnings about the SDK installation.
Go to Android Studio Preferences → Appearance and Behavior → System Settings → Android SDK
Uninstall all installed Android SDK versions here by unchecking
their boxes and clicking Apply
Uninstall any other copies of the Android SDK on your system
In Android Stduio, check only one SDK version and install it by clicking Apply.
Close and re-open Android Studio (you may want to reboot your machine)
Go back into the Android SDK window in Preferences → Appearance and Behavior → System Settings → Android SDK
Confirm that Android Studio does not display any warnings about the installed Android SDK.
Make sure the ANDROID_HOME environment variable is in your bash_profile and that it points to the location of your installed SDK. For an SDK installation managed by Android Studio on OSX, this should be ~/Library/Android/sdk
The output of "ls -l ~/Library/Android/sdk" or the ls for your correct path to your SDK should now show a directory listing with the installed SDK files and folders including "build-tools" and "emulator"
Add the following line to ~/.bash_profile (OSX) or ~/.bashrc (Linux)
export ANDROID_HOME="${HOME}/Library/Android/sdk" (replace the path with your actual SDK path)
Restart your terminal or source the modified bash profile with "source ~/.bash_profile" or "source ~/.bashrc"
Building my ionic app fails since this weekend:
** BUILD FAILED **
The following build commands failed:
CompileC build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/IonicKeyboard.o App/Plugins/com.ionic.keyboard/IonicKeyboard.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/me/Documents/app/platforms/ios/cordova/build-debug.xcconfig,-project,app.xcodeproj,ARCHS=i386,-target,app,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/me/Documents/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/Documents/app/platforms/ios/build/sharedpch
OSX 10.11.3
XCode 7.2.1 (7C1002)
ionic -v
1.7.14
Today I reinstalled cordova and ionic, but I still keep getting the error. I had to adjust another issue with macports (here), which I fixed by setting the rights right, but still keep getting the above error.
Error 65 seems to have originate from within Cordova plugins. I've been able to "band-aid" this issue by:
cordova plugin remove <plugin name>
ionic platform remove <os>
ionic platform add <os>
cordova plugin add <plugin name>
I've also tried using sudo while running these commands with mixed results.
I fixed with following steps
in xCode go-to "Build Phase" >> Under "Compile Sources" >>
did you notice any missing or .m files failed to link... in my case it was "IonicKeyboard.m" file
I just added the file to the list "plugins/cordova-plugin-ionic-keyboard/src/ios/IonicKeyboard.m"
then Build Project - worked
iOS
Open platforms/ios on XCode
Find & Replace io.ionic.starter in all files for a unique identifier
Click the project to open settings
Signing > Select a team
Go to your device Settings > General > DeviceManagement
Trust your account/team
ionic cordova run ios --device --livereload
I'm getting this following error after I ran my app on my own ios device.
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
ENOENT, no such file or directory '/Users/cauealmeida/Library/Logs/CoreSimulator/5C6DA43E-3993-4260-87EE-73FEB27DE181/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/cauealmeida/Documents/jobs/dev/ionic-maptest/map-test/platforms/ios/build/emulator/map-test.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/cauealmeida/Documents/jobs/dev/ionic-maptest/map-test/platforms/ios/cordova/console.log,--stdout,/Users/cauealmeida/Documents/jobs/dev/ionic-maptest/map-test/platforms/ios/cordova/console.log,--exit
Error: /Users/cauealmeida/Documents/jobs/dev/ionic-maptest/map-test/platforms/ios/cordova/run: Command failed with exit code 2
I've tried with ionic emulate ios -cls from different projects and the same error is shown.
What am I missing?
Here are the steps you can use to correct this issue:
1) Empty the 'platforms' folder in your Ionic project
2) Re-run ionic platform add ios, ionic build ios, and ionic emulate ios without sudo
3) 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
We fixed this using the SO answer here, which was just to Reset Content and Settings in the Simulator menu.
You need to download ios simulator.
Go to xcode and download ios 9 or other simulator.
you also need to install ios-sim using your terminal.
sudo npm install -g ios-sim
also check and confirmed your device is connected properly.
connected device you see in xcode window