cinnyapp / cinny-desktop

Yet another matrix client for desktop
GNU Affero General Public License v3.0
415 stars 49 forks source link

Service Worker doesn't load #344

Closed SteffoSpieler closed 2 months ago

SteffoSpieler commented 2 months ago

Describe the bug

The service worker doesn't load (https://tauri.localhost/sw.js returning "Connection is closed, can't dispatch pending call to Network.getResponseBody"), results in no media loading.

Reproduction

  1. Open DevTools on Network tab
  2. Reload page
  3. Filter for sw.js
  4. See failed request

Expected behavior

It should load, and every image should load as well.

Platform and versions

1. OS: Windows 11 Pro
2. Cinny version: 4.2.0
3. Matrix homeserver: steffo.dev
4. Downloaded from: Auto Updater

Additional context

No response

compuguy commented 2 months ago

I'm having the exact same issue.

Uncaught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://tauri.localhost/') with script ('https://tauri.localhost/sw.js'): An unknown error occurred when fetching the script.

Only see this issue with cinny-desktop. My docker deployed Cinny instance doesn't have this issue.

kfiven commented 2 months ago

Thanks, looks like custom tauri protocol don't work with service workers. Will try to fix it and do another release today.

kfiven commented 2 months ago

We are going to do another release for service worker to work on cinny-desktop at 14 Sept 2024 at 13:00 UTC. For service worker to work on Tauri app we need to change custom tauri: protocol with http: which means the existing sessions will lost and you will have to login again. If you are not using online key-backup for encryption keys, please backup your keys before upgrading.