Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios: fix lowercased variable name in Xcode config #15184

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

jakubgs
Copy link
Member

@jakubgs jakubgs commented Feb 24, 2023

Fixing my own mistake from:

In some cases might result in failures due to empty shebang:

Command PhaseScriptExecution failed with a nonzero exit code

Because the script file looks like this:

#!
set -o errexit
export NODE_BINARY="node"
export NODE_ARGS=" --openssl-legacy-provider --max-old-space-size=16384 "

bash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./react-native-xcode.log 2>&1

@jakubgs jakubgs self-assigned this Feb 24, 2023
@status-im-auto
Copy link
Member

status-im-auto commented Feb 24, 2023

Jenkins Builds

Click to see older builds (14)
Commit #️⃣ Finished (UTC) Duration Platform Result
02c926e #1 2023-02-24 13:09:22 ~9 min ios 📄log
4e01be4 #2 2023-02-24 13:25:37 ~4 min ios 📄log
f9e3e92 #3 2023-02-24 16:10:29 ~5 min ios 📄log
d82307e #4 2023-02-24 16:17:50 ~5 min ios 📄log
4137839 #5 2023-02-24 16:37:06 ~3 min ios 📄log
7b0810b #6 2023-02-24 16:46:14 ~5 min ios 📄log
✔️ caaabea #1 2023-02-24 16:55:11 ~4 min tests 📄log
✔️ caaabea #7 2023-02-24 16:58:00 ~7 min ios 📱ipa 📲
✔️ caaabea #1 2023-02-24 16:59:55 ~9 min android-e2e 🤖apk 📲
✔️ caaabea #1 2023-02-24 17:00:00 ~9 min android 🤖apk 📲
✔️ 091f3bb #3 2023-02-24 17:08:05 ~4 min tests 📄log
✔️ 091f3bb #9 2023-02-24 17:10:13 ~6 min ios 📱ipa 📲
✔️ 091f3bb #3 2023-02-24 17:11:25 ~7 min android-e2e 🤖apk 📲
✔️ 091f3bb #3 2023-02-24 17:11:48 ~8 min android 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ bd4ec89 #4 2023-02-24 20:12:48 ~4 min tests 📄log
✔️ bd4ec89 #4 2023-02-24 20:16:50 ~8 min android 🤖apk 📲
✔️ bd4ec89 #4 2023-02-24 20:16:54 ~8 min android-e2e 🤖apk 📲
✔️ bd4ec89 #10 2023-02-24 20:54:22 ~46 min ios 📱ipa 📲
✔️ 6c7054b #5 2023-02-25 11:05:03 ~5 min tests 📄log
✔️ 6c7054b #11 2023-02-25 11:08:07 ~8 min ios 📱ipa 📲
✔️ 6c7054b #5 2023-02-25 11:08:25 ~8 min android-e2e 🤖apk 📲
✔️ 6c7054b #5 2023-02-25 11:08:50 ~9 min android 🤖apk 📲

@jakubgs jakubgs force-pushed the ci/debug-ios-macm1-02 branch from 02c926e to 4e01be4 Compare February 24, 2023 13:20
@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2023

The error in /Users/jenkins/Library/Logs/gym/Status PR-StatusImPR.log is:

    /bin/sh -c /Users/jenkins/Library/Developer/Xcode/DerivedData/StatusIm-denpfrxxxrlzgzciiksqpbdrnmyk/Build/Intermediates.noindex/ArchiveIntermediates/StatusImPR/IntermediateBuildFilesPath/StatusIm.build/Release-iphoneos/StatusImPR.build/Script-3AAD2AD524A3A60E0075D594.sh
Command PhaseScriptExecution failed with a nonzero exit code

Seems to be a known issue:

But no clarity on the exact cause.

@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2023

The script that fails is:

admin@macm1-02.he-eu-fsn1.ci.devel:~ % sudo cat '/Users/jenkins/Library/Developer/Xcode/DerivedData/StatusIm-denpfrxxxrlzgzciiksqpbdrnmyk/Build/Intermediates.noindex/ArchiveIntermediates/StatusImPR/IntermediateBuildFilesPath/StatusIm.build/Release-iphoneos/StatusImPR.build/Script-3AAD2AD524A3A60E0075D594.sh'
#!
set -o errexit
export NODE_BINARY="node"
export NODE_ARGS=" --openssl-legacy-provider --max-old-space-size=16384 "

bash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./react-native-xcode.log 2>&1

Simply this:

shellpath = "/usr/bin/env sh";
shellScript = "set -o errexit\nexport NODE_BINARY=\"node\"\nexport NODE_ARGS=\" --openssl-legacy-provider --max-old-space-size=16384 \"\n\nbash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./react-native-xcode.log 2>&1";

@jakubgs
Copy link
Member Author

jakubgs commented Feb 24, 2023

I think the reason this fails is the broken shebang at the beginning of the file:

#!
set -o errexit

Because if I look at other files for this script on another host the shebang is correct:

admin@macm1-01.he-eu-fsn1.ci.devel:~ % sudo cat /Users/jenkins/Library/Developer/Xcode/DerivedData//StatusIm-ffasoyfjcvlqpugvdnqwwfwijxbm/Build/Intermediates.noindex/ArchiveIntermediates/StatusImPR/IntermediateBuildFilesPath/StatusIm.build/Release-iphoneos/StatusImPR.build/Script-3AAD2AD524A3A60E0075D594.sh
#!/bin/sh
set -o errexit
export NODE_BINARY="node"
export NODE_ARGS=" --openssl-legacy-provider --max-old-space-size=16384 "

bash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./react-native-xcode.log 2>&1

@jakubgs jakubgs force-pushed the ci/debug-ios-macm1-02 branch 7 times, most recently from 8393de0 to 091f3bb Compare February 24, 2023 17:03
@jakubgs jakubgs changed the title debug ios build failure on macm1-02 ios: fix lowercased variable name in Xcode config Feb 24, 2023
@jakubgs jakubgs marked this pull request as ready for review February 24, 2023 17:03
@jakubgs jakubgs force-pushed the ci/debug-ios-macm1-02 branch from 091f3bb to bd4ec89 Compare February 24, 2023 20:08
In some cases might result in failures due to empty shebang:
```
Command PhaseScriptExecution failed with a nonzero exit code
```
Because the script file looks like this:
```
\#!
set -o errexit
export NODE_BINARY="node"
export NODE_ARGS=" --openssl-legacy-provider --max-old-space-size=16384 "

bash -x ../node_modules/react-native/scripts/react-native-xcode.sh > ./react-native-xcode.log 2>&1
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@jakubgs jakubgs force-pushed the ci/debug-ios-macm1-02 branch from bd4ec89 to 6c7054b Compare February 25, 2023 10:59
@jakubgs jakubgs merged commit 6c7054b into develop Feb 25, 2023
@jakubgs jakubgs deleted the ci/debug-ios-macm1-02 branch February 25, 2023 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants