ci_post_clone.sh failure

After months of the same script working properly, all of sudden, as of last night, our ci_post_clone.sh started failing with following error:

The ci_post_clone.sh is not executable and was run using zsh (default shell on macOS). To make sure your script runs correctly, make the file executable using `chmod +x` and add an appropriate shebang line.

Here's what I've done:

  1. Re-applied: git update-index --chmod=+x ./ci_scripts/ci_post_clone.sh; still failed to execute returning same error
  2. I was using older flutter version so changed the flutter branch to stable - still same error.

App code builds fine in local Xcode!

APPRECIATE ANY HELP!

Here is the script.

#!/bin/sh

#  ci_post_clone.sh
#  Runner
#
#  

set -e
echo "Running post clone script"

# The default execution directory of this script is the ci_scripts directory.
cd $CI_WORKSPACE # change working directory to the root of your cloned repo.

# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"

# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
echo "Doing precache"
flutter precache --ios

echo "Installing cocoa pods"
# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods

echo "calling pub get"
# Install Flutter dependencies.
flutter pub get

echo "executing pod install"
# Install CocoaPods dependencies.
cd ios && pod install # run `pod install` in the `ios` directory.

exit 0
Answered by sheshman in 777103022

I have ZERO idea why specifying the actual folder location of ios actually works.

After much trial & error, I finally got it to work with the following amendment to standard ci_post_clone.sh script

echo "change to ios folder"
# Install Flutter dependencies.
cd /Volumes/workspace/repository/ios
pwd
echo "calling pub get"
flutter pub get

echo "installing pods'
pod install

Here is a snip of the OS & Xcode versions used:

Anyone??

Are any of the Flutter builds working for others?

Looks like it is failing on flutter pub get -- any idea how to debug this stuff?

Now I'm getting some dependencies - I basically commented out the precache line.

BUT it still fails:

...
Downloading openssl...                                             105ms
Downloading ios-deploy...                                           32ms
Downloading darwin-x64/font-subset tools...                        353ms
Expected to find project root in current working directory.

I'm really, really stuck - we made a DB change and the release that's now out on AppStore will fail to load our App Home Page - appreciate any suggestions or help.

BTW: I've also emailed App Dev Support over 2 days ago - zero response from them :(

Accepted Answer

I have ZERO idea why specifying the actual folder location of ios actually works.

After much trial & error, I finally got it to work with the following amendment to standard ci_post_clone.sh script

echo "change to ios folder"
# Install Flutter dependencies.
cd /Volumes/workspace/repository/ios
pwd
echo "calling pub get"
flutter pub get

echo "installing pods'
pod install

Here is a snip of the OS & Xcode versions used:

Hi, Can you suggest a similar solution for react native and not flutter please?

Thanks!

ci_post_clone.sh failure
 
 
Q