Skip to content

Commit ff06ea3

Browse files
antonisclaude
andcommitted
fix(ios): Correct timeout calculation in dSYM wait logic
Fixed the timeout warning message to report actual elapsed time instead of calculated max_attempts * wait_interval. With progressive backoff (0.5s, 1s, 2s), the old calculation was incorrect (e.g., reported 20s when actual was ~12.5s). Changes: - Track actual wait time with total_wait_time variable - Accumulate elapsed time after each sleep interval - Update timeout message to show actual time and attempt count - Add reference to BUILD_CONFIGURATION.md for configuration options Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5c5e07c commit ff06ea3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/core/scripts/sentry-xcode-debug-files.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
# Upload Debug Symbols to Sentry Xcode Build Phase
33
# PWD=ios
4+
#
5+
# Configuration: See BUILD_CONFIGURATION.md for all available environment variables
46

57
# print commands before executing them
68
set -x
@@ -64,6 +66,7 @@ wait_for_dsym_files() {
6466
local max_attempts="${SENTRY_DSYM_WAIT_MAX_ATTEMPTS:-10}"
6567
local wait_interval="${SENTRY_DSYM_WAIT_INTERVAL:-2}"
6668
local attempt=1
69+
local total_wait_time=0
6770

6871
# Check if we should wait for dSYM files
6972
if [ "$SENTRY_DSYM_WAIT_ENABLED" == "false" ]; then
@@ -179,13 +182,14 @@ wait_for_dsym_files() {
179182

180183
echo "Waiting ${current_interval}s for dSYM generation to complete..."
181184
sleep $current_interval
185+
total_wait_time=$(awk "BEGIN {print $total_wait_time + $current_interval}")
182186
fi
183187

184188
attempt=$((attempt + 1))
185189
done
186190

187191
# Timeout reached
188-
echo "warning: Timeout waiting for dSYM files after $((max_attempts * wait_interval))s"
192+
echo "warning: Timeout waiting for dSYM files after ${total_wait_time}s ($max_attempts attempts)"
189193
echo "warning: This may result in incomplete debug symbol uploads"
190194
echo "warning: To disable this check, set SENTRY_DSYM_WAIT_ENABLED=false"
191195
return 1

0 commit comments

Comments
 (0)