Xcode server bot: pre Scripts error Trigger Error: Trigger exited with non-zero status 1 - xcode

I wanna setup a Xcode server for archive my project, but i get a tigger issues that tigger error Tigger exited with non-zero status 1.
That is my scripts:
#!/bin/sh
#make sure the encoding is correct
export LANG=en_US.UTF-8
# fix the path so Ruby can find it's binaries
export PATH=/usr/local/bin:$PATH
# echo "PATH: $PATH"
cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"
/usr/local/bin/pod install --verbose --no-repo-update
My Project named ZHXShop, also "/usr/local/bin/pod" can search in my computer finder, and i don't use Fastlane in my project
My env:
Xcode -> 11.5
Mac os -> 10.15.5
Cocoapods -> 1.9.1
Ruby -> 2.7.0
rvm -> 1.29.10
The end i hope your answers

Try adding a wait right after you call to pod install. You can add this as a Add Pre-Integration Triggers when you edit your Xcode Server Bot.
#!/bin/sh
# cd to where your Podfile is
cd "${XCS_PRIMARY_REPO_DIR}/ZHXShop/"
# add to the path, or explicitly add the path to your `pod` call
export PATH=/usr/local/bin:$PATH
pod install --verbose --no-repo-update
wait
Notes I found on wait
The wait() function suspends execution of its calling thread until status information is available for a child process or a signal is
received.

Related

ddev get drud/ddev-platformsh configuration - error when generating needed environment variables on MacOS

I'm encountering an issue with undefined project variables following the installation steps outlined here: https://github.com/drud/ddev-platformsh#install
Steps 1-3 were smooth, with no issues.
On step 4 ddev get drud/ddev-platformsh, the script runs successfully until the 'Executing post-install actions:' section. Here is the output with a few preceding lines for context:
Configuration complete. You may now run 'ddev start'.
Installing project-level components:
👍 web-build/Dockerfile.platformsh
👍 homeadditions/.bashrc.d/platformsh-environment.sh
👍 platformsh/.gitignore
👍 platformsh/generate_db_relationship.sh
👍 platformsh/generate_elasticsearch_relationship.sh
👍 platformsh/generate_memcached_relationship.sh
👍 platformsh/generate_redis_relationship.sh
Installing global components:
👍 commands/web/platform
Executing post-install actions:
👍 Support composer and python3 dependencies
BASE64_ENCODE=base64 -w 0
base64: illegal option -- w
base64: illegal option -- w
👎 Installing dependencies and generating needed environment variables
could not process post-install action (2) 'Installing dependencies and generating needed environment variables'
How do I address this? The issue could be that I'm running this on MacOS, which doesn't support the -w flag for BASE64 (based on this other SO issue).
Also, I see that Platform has these environment variables: https://docs.platform.sh/development/variables/use-variables.html#use-platformsh-provided-variables
...but I'm unclear how/where they should be integrated into the DDEV config files.
Also, after encountering the config error, I ran this command, which failed and further indicated that at least one project variable was missing:
$ ddev drush cr
In Config.php line 567:
The appDir variable is not defined. Are you sure you're running on Platform.sh?
Failed to run drush cr: exit status 1
Any advice wrt how to overcome this issue would be welcome. Thank you.
My environment:
DDEV: v1.21.4
OS: MacOS Ventura 13.1
CPU: Apple M1
I think you're on macOS and you have the homebrew version of base64 installed. Unfortunately, it's quite different in its behavior. Could you please uninstall the homebrew version? brew uninstall base64 && hash -r (hash -r just makes the changes in PATH immediately effective).
See https://github.com/drud/ddev-platformsh/issues/93

Unable to locate adb on macOS Catalina

I am starting to learn how to do mobile programming with ReactNative on an android environment. I’m using MacOS Catalina and I’ve installed android studio and react-native-cli. I ran react-native init ShoppingList which passed
Downloading template,
Copying template,
Processing template
but failed at Installing CocoaPods dependencies because I wasn't at the latest OS yet(I hope this is not part of the problem because I don’t have enough memory to upgrade OS)
I’ve referred to a suggestion inside this issue, which asks me to run
npm uninstall -g react-native react-native-cli
npm install -g react-native react-native-cli
react-native start --reset-cache
I’ve also deleted the node_modules and npm install at the root of the project. Then at the root of the project I ran react-native run-android.
Which gave me the following error
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
/bin/sh: adb: command not found
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:installDebug'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/prashin/Test/ShoppingList/android/local.properties'.
* 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 2s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Inside Android Studio, the following are installed
Android 11.0(R),
Android SDK Build-Tools,
Android Emulator 30.2.6,
Android SDK-Platform-Tools 30.0.5,
Intel x86 Emulator Accelerator (HAXM installer) 7.5.1
I created a Pixel 2 Device with Release name R(API Level 30), and pressed the Play button countless times, it gives me the error of AVD Manager: Unable to locate ADB.
This is my .bash_profile file.
source ~/.profile
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
##
# Your previous /Users/prashin/.bash_profile file was backed up as /Users/prashin/.bash_profile.macports-saved_2019-10-23_at_18:32:04
##
# MacPorts Installer addition on 2019-10-23_at_18:32:04: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
export ANDROID_HOME=/Users/prashin/Library/Android/sdk
export ANDROID_SDK_ROOT=$ANDROID_HOME
export PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
# export PATH="$PATH:/Users/$USER/Library/Android/sdk/platform-tools"
# export PATH=${PATH}:/usr/local/mysql-5.7.31-macos10.14-x86_64/bin
# Finished adapting your PATH environment variable for use with MacPorts.
And I do see an adb executable inside platform-tools according to this post.
What could I be missing here which is preventing me from running my basic application on the simulator? Do inform me if more information is needed.
Edit
A suggested solution of switching to .zprofile changed the error message instead. It got stuck at info launching emulator for 30s before producing the error below.
error Failed to launch emulator. Reason: Could not start emulator within 30 seconds..
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.
> Task :app:installDebug FAILED
Skipping device 'emulator-5554' (emulator-5554): Device is OFFLINE.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 2 executed, 25 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No online devices found.
* 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 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
With Catalina, Apple has changed the default shell to zsh. Therefore you have to rename your configuration files. .bashrc is now .zshrc and .bash_profile is now .zprofile. Move the contents of your .bash_profile to a new .zprofile file and restart your terminal. Run the app again with new environment variables in place.
Simply restarting the terminal made the trick for me...

flutter doctor hangs after "Updating flutter tool..."

First: I have used Google to search for "flutter doctor" and searched your
site as well. I will detail my results below, but before that here is where I am:
1) I followed the directions at https://flutter.io/setup-windows/ up to the point where I am unable to proceed.
2) My environment is:
Windows 10, 64 bit, 210 Gb free space
Intel(R) Core(TM) i5-2320 CPU # 3.00GHz; 8.00 GB installed memory(RAM)
I have PowerShell 5.1,
I have setup Git for Windows with "Use Git from
the Windows Command Prompt" option
I am able to run git from the command prompt or power shell
3) I tried downloading the .zip of the beta but when I ran the
"flutter doctor" command it just hung.
4) Now for the search results:
I found 3 relevant questions:
a) "Getting Flutter doctor to work" - I tried cloning the "alpha" version
and checked the "Background Intelligent Transfer Service was running" (it
was).
b) "Running Flutter Doctor without any results" - I removed the alpha version
and cloned the beta version using git bash with the following results:
rex#NEXIUM MINGW64 /c/flutter
$ git clone -b beta https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Counting objects: 122267, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 122267 (delta 0), reused 0 (delta 0), pack-reused 122262
Receiving objects: 100% (122267/122267), 37.56 MiB | 2.39 MiB/s, done.
Resolving deltas: 100% (91730/91730), done.
Checking out files: 100% (2473/2473), done.
This also did not work (i.e. flutter doctor still hangs)
c) "Flutter doctor is not running in command prompt" - this one had the most
promising result:
I deleted the cache folder under the ..\AppData\Roaming\Pub directory.
when I ran "flutter doctor" this time I got the following results:
C:\Users\rex>flutter doctor
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 09d05a38912a3c1a906e95099cac9a7e14fae85f...
Unzipping Dart SDK...
// here there was some text above the ========== in the console about bits...
// which went away, window appeared compressed and then the following message:
Updating flutter tool...
// HANGS HERE
I am hoping to get the flutter tool installed and experiment with it for developing android and/or iOS apps. I have done some development using Xamarin in the Visual Studio 2017 but there is limited support for controls and I am
hoping that this tool will be more productive. IF there is anyone who can help me get past this problem I would appreciate any help. Thanks,
Rex
NEW INFORMATION BELOW:
I tried running the flutter doctor command in a command window with adminstrator privilege with the same result. It then tried editing the flutter.bat file with some echo commands to try to get additional information which showed me that the batch file was getting to the point where the following statement is executed:
>CALL "%dart%" %FLUTTER_TOOL_ARGS% "%snapshot_path%" %*
I edited the batch file to uncomment the lines assigning the FLUTTER_TOOL_ARGS which gave me additional information and the batch file exited as follows:
================== results in the command window =====================
>C:\Windows\System32>flutter doctor
>in acquire_lock ... # ECHO to get debug information
>in subroutine ... # ECHO to get debug information
>in after_subroutine ...# ECHO to get debug information
>dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe # ECHO dart
>FLUTTER_TOOL_ARGS ""--checked " --observe=65432" # ECHO FLUTTER_TOOL_ARGS
#next line is ECHO of snapshot_path
>snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
============== the following was output from the batch file =========
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ -->observe=65432'
(OS Error: The system cannot find the file specified. , errno = >2) null
# another ECHO
after CALL ... # echo to get debug information
================== end of results in the command window =====================
=========== ANOTHER NEW EDIT =============
Just to clarify the above edit, I totally deleted everything related to flutter and then re-installed/unzipped it in another directory "C:\src\flutter" which does not require admin privilege to edit, etc. but I did not delete the cache folder under the ..\AppData\Roaming\Pub directory as before so I am going back to do that this morning. I will also use the -v or -verbose option at the command prompt to see if there is any additional help and add the new information once done.
============== FOLLOW UP EDIT ================
I remove some of the debug ECHO statements, modified others, made sure 7z.exe is in the path, removed the cache directory but the results are basically the same as follows:
C:\WINDOWS\system32>flutter doctor -verbose
Show dart, FLUTTER_TOOL_ARGS, and snapshot_path:
dart - C:\src\flutter\flutter\bin\cache\dart-sdk\bin\dart.exe
FLUTTER_TOOL_ARGS ""--checked " --observe=65432"
snapshot_path C:\src\flutter\flutter\bin\cache\flutter_tools.snapshot
execute call to dart ...
Unhandled exception:
Could not load "file:///C:/Windows/System32/%20--observe=65432":
FileSystemException: Cannot open file, path =
'C:\Windows\System32\ --observe=65432' (OS Error: The system cannot find
the file specified., errno = 2)
null
returned from call to dart
exit code 255
C:\Windows\System32>
============ Another Update ===========
I decided to try the clone of the beta again since that was the most promising of all the previous things I did. When done I used the power shell and issued the "flutter channel" command just to see what that would do. Surprisingly I got a similar result to running "flutter doctor" previously. First there was an output at the top of the screen showing dart being downloaded and then when that was done the following was printed on the console below the original command:
C:\Users\rex>flutter channel
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine
1ed25ca7b7e3e3e8047df050bba4174074c9b336...
Unzipping Dart SDK...
Updating flutter tool...
and then the console hung as before...
I finally aborted the command and set echo on in flutter.bat. That file hangs with the following command displayed on the screen (all on the same line):
C:\src\flutter>CALL "C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe"
"--checked --observe=65432"
"C:\src\flutter\bin\cache\flutter_tools.snapshot" doctor
At this point I am pretty much at a loss.
Have tried the following?
Run the flutter doctor command from a command prompt with admin privileges?
Tried installing a different type of unzip program (like 7-zip) and ensuring it's in the PATH?
BTW I'm looking at this issue that seems similar to what you are describing: https://github.com/flutter/flutter/issues/11698
You can try to use the Flutter Console with Administrator Access Privilege and try to change the change the channel to the current stable version flutter channel stable
Then, once again run the flutter upgrade.
I hope this help you.
Seems like you don't have enough privilege to save or edit files in that directory.
Try to run your command prompt as admin or try to run your flutter console as admin and check if that helps.
May be Antivirus or Firewall blocking
try running windows in Safe mode and then run flutter commands
On Windows, the simplest and easiest way is, download the latest version Flutter SDK. Manually replace the current folder by pasting the downloaded flutter folder instead of the current folder in the C drive. Always choose "replace and paste".

The compilation of ocamlfind failed at "install -m 0755 ocaml-stub

I'm new to OCaml and I'm trying to install cohttp. After a failure because I hadn't accepted the Xcode license agreement (OS X Sierra 10.12.6) I get an error while the package manager (opam) is trying to install a sub-dependency, ocamlfind.
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ERROR] The compilation of ocamlfind failed at "install -m 0755 ocaml-stub /Users/greg/.opam/system/bin/ocaml".
Processing 1/27: [ocamlfind: rm]
#=== ERROR while installing ocamlfind.1.7.3-1 =================================#
# opam-version 1.2.2
# os darwin
# command install -m 0755 ocaml-stub /Users/greg/.opam/system/bin/ocaml
# path /Users/greg/.opam/system/build/ocamlfind.1.7.3-1
# compiler system (4.05.0)
# exit-code 127
# env-file /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.env
# stdout-file /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.out
# stderr-file /Users/greg/.opam/system/build/ocamlfind.1.7.3-1/ocamlfind-93888-487c34.err
The log files are empty. The env file has this (lightly edited):
PATH=/Users/greg/.opam/system/bin:/usr/local/google-cloud-sdk/bin:/Users/greg/.nvm/versions/node/v6.5.0/bin::/opt/chefdk/bin:/usr/local/mysql/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/greg/.chefdk/gem/ruby/2.1.0/bin
OCAML_TOPLEVEL_PATH=/Users/greg/.opam/system/lib/toplevel
PERL5LIB=/Users/greg/.opam/system/lib/perl5:
MANPATH=/Users/greg/.opam/system/man:/Users/greg/.nvm/versions/node/v6.5.0/share/man:/usr/local/mysql/man:/usr/local/share/man:/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man
OPAMSWITCH=system
OPAMUTF8MSGS=1
CAML_LD_LIBRARY_PATH=/Users/greg/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/fq/9ggcftcj1lsb150mldyjn5sh0000gn/T/
NVM_PATH=/Users/greg/.nvm/versions/node/v6.5.0/lib/node
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.jNLKBcDJTX/Render
TERM_PROGRAM_VERSION=388.1.1
TERM_SESSION_ID=E845D49D-9C60-4CEA-8777-19F521ED83A1
NVM_DIR=/Users/greg/.nvm
USER=greg
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.0CA6ZcRBJQ/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x52
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
PWD=/Users/greg/dev/ocaml
EDITOR=emacs
LANG=en_CA.UTF-8
NODE_PATH=./src
XPC_FLAGS=0x0
NODE_ENV=development
XPC_SERVICE_NAME=0
HOME=/Users/greg
SHLVL=1
LOGNAME=greg
NVM_BIN=/Users/greg/.nvm/versions/node/v6.5.0/bin
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist
PROMPT_COMMAND=set_tab_title
_=/usr/local/bin/opam
OPAM_PACKAGE_VERSION=1.7.3-1
OPAM_PACKAGE_NAME=ocamlfind
MAKELEVEL=
MAKEFLAGS=
I don't have a lot to go on to debug this. Any suggestions on where to go from here?
This github issue for opam led me to a solution that worked for me: https://github.com/ocaml/opam-repository/issues/10064
The solution to the github issue was that the user had the local directory, ., in their $PATH which led to the wrong install command being run. This wasn't my problem, but I had an extra : in my path.
/Users/greg/.nvm/versions/node/v6.5.0/bin::/opt/chefdk/bin:/usr/local/mysql/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
According to the comment below having two colons in a row in the path string will add the empty string as part of the path which is interpreted as the current directory.
Removing the extra colon allows the install of ocamlfind to succeed.

Xamarin iOS Framework Binding

I am trying to create a binding for the WePay Framework:
https://github.com/wepay/wepay-ios
Following are the steps that I followed.
I installed CocoaPods.
I installed ObjectiveSharpie
I run this command in terminal : $ sharpie pod init ios WePay
And I get this error: Could not install CocoaPod
here is the full error message:
** Setting up CocoaPods master repo ...
(this may take a while the first time)
Setting up CocoaPods master repo
$ /usr/bin/git pull --ff-only
From https://github.com/CocoaPods/Specs
ee36ba4..8c6767d master -> origin/master
Updating ee36ba4..8c6767d
Fast-forward
Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Specs/BluetoothKit/0.3.0/BluetoothKit.podspec.json
Setup completed
** Searching for requested CocoaPods ...
** Working directory:
** - Writing Podfile ...
** - Installing CocoaPods ...
** (running pod install --no-integrate --no-repo-update)
[!] Unknown option: --no-integrate
Did you mean: --no-ansi?
Usage:
$ pod install
Downloads all dependencies defined in `Podfile` and creates an Xcode Pods
library project in `./Pods`.
The Xcode project file should be specified in your `Podfile` like this:
project 'path/to/XcodeProject.xcodeproj'
If no project is specified, then a search for an Xcode project will be
made. If more than one Xcode project is found, the command will raise an
error.
This will configure the project to reference the Pods static library, add
a build configuration file, and add a post build script to copy Pod
resources.
Options:
--repo-update Force running `pod repo update` before
install
--project-directory=/project/dir/ The path to the root of the project
directory
--silent Show nothing
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
error: could not install CocoaPod
Well apparently the most recent CocoaPods removed the --no-integrate option that objective sharpie uses. Downgrading cocoapods to 0.39.0 should fix your issue. It worked for us.

Resources