Skip to content

Commit e1d7177

Browse files
authored
fix(sign-windows): pin SSD 2.9.14, dismiss version-check modal, add CI screenshots
Root cause: a 'Newer application version is available (2.9.14)' modal began popping in front of the login form between v0.14.1 and v0.15.0, stole focus from xdotool, and left the OAuth WebKit panel without cached credentials. Pin to 2.9.14-9.4.3.0, dismiss any future version-check modal defensively, and add a screenshot/window-enumeration loop with an if: failure() artifact upload so the next regression is visible instead of invisible.
1 parent d0e86ee commit e1d7177

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ jobs:
380380
scripts/windows-sign.sh dist/unsigned/*.exe
381381
rm -f "$ARCHIVE"
382382
cd dist && zip -j "$(basename "$ARCHIVE" .zip).zip" unsigned/*.exe && cd ..
383+
- name: Upload sign-windows screenshots
384+
if: failure()
385+
uses: actions/upload-artifact@v4
386+
with:
387+
name: sign-windows-screens
388+
path: /tmp/sign-screens/
389+
if-no-files-found: ignore
383390
- uses: actions/upload-artifact@v4
384391
if: env.HAS_SIGNING != ''
385392
with:

scripts/windows-sign.sh

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,29 @@ for f in "$@"; do
3232
fi
3333
done
3434

35+
dump_windows() {
36+
echo "==> X11 windows snapshot:"
37+
for wid in $(xdotool search --name "" 2>/dev/null); do
38+
local name
39+
name=$(xdotool getwindowname "$wid" 2>/dev/null || true)
40+
[[ -n "$name" ]] && echo " wid=$wid name='$name'"
41+
done
42+
}
43+
3544
# --- Install dependencies ---
3645

3746
echo "==> Installing dependencies..."
3847
sudo apt-get update -qq
3948
sudo apt-get install -y -qq \
40-
xvfb xdotool oathtool osslsigncode \
49+
xvfb xdotool oathtool osslsigncode scrot \
4150
p11-kit opensc stalonetray \
4251
libpulse-mainloop-glib0 libxss1 libnss3 libxkbcommon0 \
4352
> /dev/null 2>&1
4453
echo "==> Dependencies installed"
4554

4655
# --- Install SimplySign Desktop ---
4756

48-
SSD_URL="https://files.certum.eu/software/SimplySignDesktop/Linux-Ubuntu/2.9.13-9.4.2.0/SimplySignDesktop-2.9.13-9.4.2.0-x86_64-prod-ubuntu.bin"
57+
SSD_URL="https://files.certum.eu/software/SimplySignDesktop/Linux-Ubuntu/2.9.14-9.4.3.0/SimplySignDesktop-2.9.14-9.4.3.0-x86_64-prod-ubuntu.bin"
4958
SSD_DIR="/opt/SimplySignDesktop"
5059

5160
if [[ ! -d "$SSD_DIR" ]]; then
@@ -92,6 +101,14 @@ XVFB_PID=$!
92101
export DISPLAY=:99
93102
sleep 2
94103

104+
mkdir -p /tmp/sign-screens
105+
( while true; do
106+
scrot -o "/tmp/sign-screens/$(date +%s.%N).png" 2>/dev/null
107+
sleep 2
108+
done ) &
109+
SCROT_PID=$!
110+
trap "kill $SCROT_PID 2>/dev/null || true" EXIT
111+
95112
stalonetray --geometry 1x1+0+0 --grow-gravity W &
96113
sleep 1
97114

@@ -101,6 +118,20 @@ echo "==> Launching SimplySign Desktop..."
101118
"$SSD_EXE" &
102119
SSD_PID=$!
103120
sleep 8
121+
dump_windows
122+
123+
# Dismiss "Newer application version is available" modal if it appeared.
124+
# It steals focus from the login form; if SSD ever falls behind Certum's
125+
# advertised version again we still want signing to proceed.
126+
VERSION_MODAL=$(xdotool search --name "Application version check" 2>/dev/null | head -1 || true)
127+
if [[ -n "$VERSION_MODAL" ]]; then
128+
echo "==> Dismissing version-check modal (wid=$VERSION_MODAL)"
129+
xdotool windowactivate --sync "$VERSION_MODAL" 2>/dev/null || true
130+
sleep 0.5
131+
xdotool key --window "$VERSION_MODAL" Escape
132+
sleep 1
133+
dump_windows
134+
fi
104135

105136
echo "==> Searching for login window..."
106137
WINDOW_ID=$(timeout 30 xdotool search --sync --onlyvisible --name "SimplySign" 2>/dev/null | head -1 || true)
@@ -121,6 +152,8 @@ fi
121152
xdotool windowactivate --sync "$WINDOW_ID" 2>/dev/null || true
122153
sleep 1
123154

155+
dump_windows
156+
124157
# Generate TOTP right before typing to avoid expiration
125158
TOTP=$(oathtool --totp=sha256 -b --digits=6 "$CERTUM_TOTP_SECRET")
126159

@@ -172,6 +205,7 @@ if [[ "$TOKEN_READY" != "true" ]]; then
172205
exit 1
173206
fi
174207
echo "==> PKCS#11 token available"
208+
dump_windows
175209

176210
# --- Start p11-kit server ---
177211

@@ -211,6 +245,7 @@ echo "==> Key alias: $KEY_ALIAS"
211245

212246
for f in "$@"; do
213247
echo "==> Signing $f..."
248+
dump_windows
214249

215250
java -jar "$JSIGN_JAR" \
216251
--storetype PKCS11 \

0 commit comments

Comments
 (0)