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
Related
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/home/dharmendra/Documents/gitlab/rnative/AwesomeProject/android/settings.gradle' (/home/dharmendra/.gradle/caches/7.5.1/scripts/6hrksilieebwgbc2tk6l5h8hd).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 30s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/home/dharmendra/Documents/gitlab/rnative/AwesomeProject/android/settings.gradle' (/home/dharmendra/.gradle/caches/7.5.1/scripts/6hrksilieebwgbc2tk6l5h8hd).
I resolved this problem final only change JAVA Version 18 Use in java of version
Check java -version :- if showing 19.x.x then change java version 18.x.x install.
follow the step :
sudo apt update
sudo apt install -y openjdk-18-jdk
sudo apt install -y openjdk-18-jre
then run your project
npx react-native start && npx react-native run-android
.............................
I change launcher icon in this address:
Projects\nameproject\android\app\src\main\res
And then linked them by this command:
npx react-native link
after re-building project by this command:
react-native run-android
I am getting following error:
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with
Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:comman
d_line_warnings
108 actionable tasks: 5 executed, 103 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\Users\TORANJ\Desktop\Projects\insta\android\app\build\intermediates\merged_
manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher
_round (aka com.insta:mipmap/ic_launcher_round) not found.
error: failed processing manifest.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 25s
error Failed to install the app. Make sure you have the Android development envi
ronment set up: https://facebook.github.io/react-native/docs/getting-started.htm
l#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8
081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\Users\TORANJ\Desktop\Projects\insta\android\app\build\intermediates\merged_
manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher
_round (aka com.insta:mipmap/ic_launcher_round) not found.
error: failed processing manifest.
I ran gradlew clean but issue is persisting:
Does anybody have any idea how can i fix this?
I faced this same issue. It is because react-native android app icons run in round shaped. It shows build/ processDebugResources failed because we didn't add circle shaped app icon in res folder.
First, after creating a fresh project, look in the android/app/src/main/res folder, you will find ic_launcher & ic_launcher_round, right?
So, I suggest you to go Launcher icon generator to make two shaped icons (circle and square), paste them in icon folders with same name(ic_launcher & ic_launcher_round) and build the project.
You will find that app icon is updated.
I just copy ic_launcher and past it to same folder as ic_launcher_round. for example in mipmap-hdpi folder i just have an ic_launcher file and I manually copy and paste this, then run cd android && ./gradlew clean and run npx react-native link in root folder again, then rebuild the project again with npx react-native run-android command.
We have created robot framework with java using Jython as below.
When we execute this from Eclipse IDE and it works fine.
We are going to configure this into Jenkins and we have created the below batch script for
Build and test
Build:
call mvn clean
call mvn assembly:assembly -DdescriptorId=jar-with-dependencies
build is created successfully
Test:
java -cp target\KTOC-TRB-automation-1.0-SNAPSHOT-jar-with-dependencies.jar;robotframework-3.0.2.jar -Dwebdriver.chrome.driver=chromedrivers\chromedriver.exe -Dheadless=false org.robotframework.RobotFramework --variablefile KTOC_TRB_TestAutomation\FrontlinesTRB\France.py --variablefile KTOC_TRB_TestAutomation\FrontlinesTRB\TRB-env.py KTOC_TRB_TestAutomation\TestSuites\RegressionTest_France.robot
When we trigger this script, we are getting the below error :
C:\Users\k64066262\rep\KTOC-TRB-Automation>test.bat >>status.txt
[ ERROR ] Error in file 'C:\Users\k64066262\rep\KTOC-TRB-Automation\KTOC_TRB_TestAutomation\TestSuites\RegressionTest_France.robot': Importing test library 'com.KTOC.TRB.testautomation.Keywords.Keywords' failed: ImportError: No module named KTOC
error message :
C:\Users\k64066262\rep\KTOC-TRB-Automation>java -cp target\KTOC-TRB-automation-1.0-SNAPSHOT-jar-with-dependencies.jar;robotframework-3.0.2.jar -Dwebdriver.chrome.driver=chromedrivers\chromedriver.exe -Dheadless=false org.robotframework.RobotFramework --variablefile KTOC_TRB_TestAutomation\FrontlinesTRB\France.py --variablefile KTOC_TRB_TestAutomation\FrontlinesTRB\TRB-env.py KTOC_TRB_TestAutomation\TestSuites\RegressionTest_France.robot
==============================================================================
RegressionTest France
==============================================================================
Verify Tender Created Successfully | FAIL |
Parent suite setup failed:
No keyword with name 'Launch Browser' found.
I'm trying run my project on android. But I get an error like that.
C:\Users\Alperen\Desktop\AwesomeProject>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Alperen\Desktop\AwesomeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Command.handleAction (C:\Users\Alperen\Desktop\AwesomeProject\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:164:9)
I don't understand. What should I do ?
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