Instabug/Instabug-iOS

Build fails with Xcode 14.3 due to no such file or directory, Instabug: err: script not found

jordanhbuiltbyhq opened this issue ยท 9 comments

Steps to Reproduce the Problem

  1. Run the app in Xcode 14.3

Expected Behavior

The app should build and run successfully

Actual Behavior

The Build Succeeded HUD appears but the build actually failed. If you examine the build log from the report navigator you'll find this line:

Run custom shell script 'Run Script'

SchemeAction Run\ Script /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/SchemeScriptAction-ci1gFm.sh
    cd /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/
    export CA_ASSERT_MAIN_THREAD_TRANSACTIONS=1
    export CA_DEBUG_TRANSACTIONS=1
    export COMMAND_MODE=unix2003
    export DEVICE_NAME="iPhone 14 Pro"
    export HOME=/Users/Jordan
    export LOGNAME=Jordan
    export PATH="/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export SCHEME_ACTION_NAME="Run Script"
    export SCHEME_NAME=OurAppName
    export SHELL=/bin/zsh
    export SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.yZFEoHZsb2/Listeners
    export TMPDIR=/var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/
    export USER=Jordan
    export WORKSPACE_PATH=/Users/Jordan/Developer/OurAppName/OurAppName.xcworkspace
    export XPC_FLAGS=0x0
    export XPC_SERVICE_NAME=application.com.apple.dt.Xcode.42125985.42554696
    export __CFBundleIdentifier=com.apple.dt.Xcode
    export __CF_USER_TEXT_ENCODING="0x1F5:0x0:0x0"
    /bin/sh -c /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/SchemeScriptAction-ci1gFm.sh

find: : No such file or directory
Instabug: err: script not found. Make sure that you're including InstabugResources.bundle in your project directory

Exited with status code 1

I thought this was the upload dysm run script, but I removed that and the issue still occurs. I even commented out the Instabug pod, executed pod install, cleaned the build folder, deleted all derived data, quit and relaunched, then reran but the error continues to occur. I have no idea where this shell script is coming from but it's not in my target's Build Phases. ๐Ÿ˜…

SDK Version

11.9.1

iOS Version

16.4

Device Model

Simulator

The source of this error message is the automatic dSYMs upload script mentioned in our documentation here: https://docs.instabug.com/docs/ios-symbolication#all-builds

I assume you are still getting this error even after your removed the target's run script built phase, because the script is not failing in your target's build phase, it's in your scheme run script action.
**SchemeAction** Run\ Script /var/folders/4t/7g326jh57pg0k71lf8fbhmf80000gn/T/SchemeScriptAction-ci1gFm.sh

Hi @yousefhamza thanks, ah yes I found it in the Build Post-actions (rather than Archive). Strange since we also had that in the target's Build Phases. Deleted that from the scheme and now it builds.

To keep the script, is there something we need to change for Xcode 14.3 support?

It should just work, just note that if you are using SPM, there's slightly different script needed, you will find it under "SPM" tab here: https://docs.instabug.com/docs/ios-symbolication#all-builds

We're using CocoaPods, and it's definitely not working.. see error in the first post. Works as-is in Xcode 14.2, but not 14.3.

stale commented

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

Still an issue

We are still on it ๐Ÿ‘

stale commented

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi @jordanhbuiltbyhq,
Can you update to the latest cocoapods version 1.12.1. It contains a fix for this issue.
CocoaPods/CocoaPods#11808