Skip to content

A local-first personal finance app

[AI] Fix fatal error when launching PWA while offline (#7978)

Matiss Janis Aboltins78f101b99525
diff --git a/packages/desktop-client/vite.config.mts b/packages/desktop-client/vite.config.mts
index 5a5200088e..e0c93a3e65 100644
--- a/packages/desktop-client/vite.config.mts
+++ b/packages/desktop-client/vite.config.mts
@@ -177,6 +177,10 @@ async function stagePublicData(): Promise<void> {
.relative(publicDataDir, path.join(e.parentPath, e.name))
.replaceAll(path.sep, '/'),
)
+ // Skip dotfiles (e.g. legacy `.force-copy-windows` marker). They have no
+ // matching extension in the workbox precache globs, so a PWA opened
+ // offline would fail to fetch them and break startup (issue #7886).
+ .filter(file => !file.split('/').some(part => part.startsWith('.')))
.sort();
await writeFile(
path.resolve(publicDir, 'data-file-index.txt'),
diff --git a/packages/loot-core/migrations/.force-copy-windows b/packages/loot-core/migrations/.force-copy-windows
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/upcoming-release-notes/7978.md b/upcoming-release-notes/7978.md
new file mode 100644
index 0000000000..46c6bbb73f
--- /dev/null
+++ b/upcoming-release-notes/7978.md
@@ -0,0 +1,6 @@
+---
+category: Bugfixes
+authors: [MatissJanis]
+---
+
+Fix fatal error preventing PWA launch when offline on iOS devices.