Skip to content

Commit eeedf0e

Browse files
committed
test v2026.6.1 for regression
1 parent fffbc89 commit eeedf0e

10 files changed

Lines changed: 56 additions & 71 deletions

.github/workflows/a11y-eval-browser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
certutil -d "sql:$HOME/.pki/nssdb" -A -t "CP,CP," -n TestAutomationSSL -i "./$BW_SSL_CERT"
9191
9292
- name: Install Bitwarden CLI
93-
run: npm install -g @bitwarden/cli@2026.4.1
93+
run: npm install -g @bitwarden/cli@2026.6.0
9494

9595
- name: Install project dependencies
9696
run: |

.github/workflows/a11y-eval-web.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
certutil -d "sql:$HOME/.pki/nssdb" -A -t "CP,CP," -n TestAutomationSSL -i "./$BW_SSL_CERT"
6969
7070
- name: Install Bitwarden CLI
71-
run: npm install -g @bitwarden/cli@2026.4.1
71+
run: npm install -g @bitwarden/cli@2026.6.0
7272

7373
- name: Install project dependencies
7474
run: |

.github/workflows/test-all-custom-flags.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
certutil -d "sql:$HOME/.pki/nssdb" -A -t "CP,CP," -n TestAutomationSSL -i "./$BW_SSL_CERT"
145145
146146
- name: Install Bitwarden CLI
147-
run: npm install -g @bitwarden/cli@2026.4.1
147+
run: npm install -g @bitwarden/cli@2026.6.0
148148

149149
- name: Install project dependencies
150150
run: |
@@ -154,6 +154,16 @@ jobs:
154154
- name: Build and start the test vault
155155
run: docker compose up -d --build --remove-orphans --wait --wait-timeout 60
156156

157+
- name: Wait for admin DB migrations to complete
158+
run: |
159+
echo "Waiting for admin DB migrations..."
160+
timeout 180 sh -c '
161+
until docker compose exec -T bitwarden sh -c "grep -q \"Migration successful\" /etc/bitwarden/logs/admin-*.log 2>/dev/null"; do
162+
sleep 2
163+
done
164+
'
165+
echo "Migrations complete."
166+
157167
- name: Generate crypto values
158168
run: npm run setup:crypto
159169

.github/workflows/test-all.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,26 @@ jobs:
140140
certutil -d "sql:$HOME/.pki/nssdb" -A -t "CP,CP," -n TestAutomationSSL -i "./$BW_SSL_CERT"
141141
142142
- name: Install Bitwarden CLI
143-
run: npm install -g @bitwarden/cli@2026.4.1
143+
run: npm install -g @bitwarden/cli@2026.6.0
144+
145+
# Temporary workaround for PM-39403: server >= 2026.6.1 returns responses
146+
# that node-fetch v2 treats as a premature close (ERR_STREAM_PREMATURE_CLOSE),
147+
# even though the response body is fully delivered. Neutralize the two
148+
# `new Error('Premature close')` emission sites in the CLI's bundled
149+
# node-fetch so seed:vault:ciphers can proceed. Remove this step once
150+
# PM-39403 ships and the lite image is rebuilt with the fix.
151+
- name: Patch @bitwarden/cli node-fetch (PM-39403 workaround)
152+
run: |
153+
NF=$(npm root -g)/@bitwarden/cli/node_modules/node-fetch/lib/index.js
154+
BEFORE=$(grep -c "Premature close" "$NF" || echo 0)
155+
# Each match is followed by `err.code = ...` and an emit/callback
156+
# line; delete the 3-line body, leaving the surrounding `if` empty.
157+
sed -i "/new Error('Premature close')/,+2d" "$NF"
158+
AFTER=$(grep -c "Premature close" "$NF" || echo 0)
159+
echo "node-fetch patch: removed $((BEFORE - AFTER)) of $BEFORE match(es)"
160+
if [ "$AFTER" != "0" ]; then
161+
echo "WARNING: not all Premature-close references removed; @bitwarden/cli's node-fetch may have changed shape"
162+
fi
144163
145164
- name: Install project dependencies
146165
run: |
@@ -155,6 +174,16 @@ jobs:
155174
- name: Build and start the test vault
156175
run: docker compose up -d --build --remove-orphans --wait --wait-timeout 60
157176

177+
- name: Wait for admin DB migrations to complete
178+
run: |
179+
echo "Waiting for admin DB migrations..."
180+
timeout 180 sh -c '
181+
until docker compose exec -T bitwarden sh -c "grep -q \"Migration successful\" /etc/bitwarden/logs/admin-*.log 2>/dev/null"; do
182+
sleep 2
183+
done
184+
'
185+
echo "Migrations complete."
186+
158187
- name: Generate crypto values
159188
run: npm run setup:crypto
160189

package-lock.json

Lines changed: 0 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"@types/chrome": "0.1.31",
2020
"@types/node": "24.13.2",
2121
"cross-env": "10.1.0",
22-
"cross-fetch": "4.1.0",
2322
"dotenv": "17.4.1",
2423
"husky": "9.1.7",
2524
"lint-staged": "17.0.7",

scripts/create-account.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "cross-fetch";
21
import { configDotenv } from "dotenv";
32

43
configDotenv({ quiet: true });
@@ -39,7 +38,7 @@ async function createAccount() {
3938
const vaultHost = `${VAULT_HOST_URL}:${VAULT_HOST_PORT}`;
4039

4140
try {
42-
const requestOptions = {
41+
const requestOptions: RequestInit = {
4342
headers: {
4443
accept: "application/json",
4544
"content-type": "application/json; charset=utf-8",
@@ -55,8 +54,11 @@ async function createAccount() {
5554
},
5655
);
5756

58-
const preCreationResponseData =
59-
(await preCreationResponse.json()) as PreAccountCreateResponseData;
57+
const rawText1 = await preCreationResponse.text();
58+
59+
const preCreationResponseData = JSON.parse(
60+
rawText1,
61+
) as PreAccountCreateResponseData;
6062

6163
if (
6264
typeof preCreationResponseData !== "string" &&
@@ -117,14 +119,18 @@ async function createAccount() {
117119
},
118120
);
119121

120-
const responseData = (await response.json()) as AccountCreationResponseData;
122+
const rawText2 = await response.text();
123+
console.log(
124+
`[debug] response status=${response.status} body=${rawText2.slice(0, 500)}`,
125+
);
126+
const responseData = JSON.parse(rawText2) as AccountCreationResponseData;
121127

122128
if (responseData.object === "registerFinish") {
123129
emitSuccessMessage(vaultHost);
124130
return;
125131
}
126132
} catch (error) {
127-
// Server isn't ready yet
133+
console.log("[debug] caught:", error);
128134
}
129135

130136
console.log(`Retrying account creation at ${vaultHost}...`);

scripts/first-time-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ else
3636
echo "nvm not detected; skipping 'nvm install'. Ensure your active Node version matches ${projectRoot}/.nvmrc."
3737
fi
3838

39-
npm install -g @bitwarden/cli@2026.4.1
39+
npm install -g @bitwarden/cli@2026.6.0
4040

4141
npm ci
4242
npx playwright install --with-deps chromium

scripts/match-server-config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "cross-fetch";
21
import path from "path";
32
import fs from "fs";
43
import { configDotenv } from "dotenv";

scripts/vault-seeder.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "cross-fetch";
21
import { configDotenv } from "dotenv";
32
import {
43
CardItemTemplate,

0 commit comments

Comments
 (0)