Skip to content

特定の条件でPWAでインストールされたMisskeyが空白のページでスタックしてしまう。 #16951

@mattyatea

Description

@mattyatea
Member

💡 Summary

PWAでインストールされたMisskeyが、特定の手順を踏むと空白のページでスタックしてしまいます。
多分、sw.tsのハンドリングをいい感じにしてあげれば治りそうです。(PrisMisskeyでは直った)

原因は不明ですが WiFi , モバイルデータ通信 をオフした状態で、

  • タスクキルをした後
  • バックグラウンドから復帰した際
    などの状態で起こしやすいです。
    ですが、ここで問題なのは、上記の様な動作をせずとも、意図せずに発生してしまうことがあることです。
    例えば、バックグラウンド制限が厳しいHyperOSが入った端末だと、何もせずとも再現しやすかったりします。

恐らく、service workerが何かしらでロックされてしまい、オフライン画面の表示すらもままならないという状態になっているのではないかなと思います。

状況としては下の様になります。

0key

Image

mattyaski

Image

PrisMisskey

Image

🥰 Expected Behavior

本来であればオフラインである旨の画面が出る

🤬 Actual Behavior

空白のページが出る。

📝 Steps to Reproduce

  1. スマホでBetaのChromeを入れる
  2. PWAとしてインストールする
  3. WiFi , モバイルデータの通信を切る
  4. 何度もタスクキル , PWAを開く という工程下の状態になるまで
  5. 空白のページが表示され、スタックする(リロードもできない)

↑で再現できないこともあるが、大体これで再現できるはず

💻 Frontend Environment

* Model and OS of the device(s): Motorola Edge 40 neo - Android 15 
* Browser: Chrome Mobile 144.0.7559.3 (Beta Channel), 143.x 系統
* Server URL: https://misskey.io , https://prismisskey.space , https://mattyaski.co
* Misskey:

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* Misskey:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request

Activity

mattyatea

mattyatea commented on Dec 7, 2025

@mattyatea
MemberAuthor

PR出してますが、完全に改善とまではいかないが、大分改善されたとのフィードバッグを頂いたので有用なPRではありそうなのでOpenにしておきます

tamaina

tamaina commented on Dec 7, 2025

@tamaina
Contributor
mattyatea

mattyatea commented on Dec 7, 2025

@mattyatea
MemberAuthor

今回の問題は、Chrome v143 以降でしか再現できないように見えたのでChromiumのバグかな?とも思い、調べてみたら下のようなIssueが上がってたので共有しておきます
https://issues.chromium.org/issues/466515409

追記
https://issues.chromium.org/issues/381224161
これも同じような問題っぽく見えますね

mattyatea

mattyatea commented on Dec 8, 2025

@mattyatea
MemberAuthor

一旦Chromiumにissueを投げてみる
https://issues.chromium.org/issues/466790291

CyberRex0

CyberRex0 commented on Dec 9, 2025

@CyberRex0
Contributor

PWAではないが再現しました
参考まで…

Motorola moto g53y 5G
Chrome 143.0.7499.52
Android 14

Image
50sz

50sz commented on Dec 10, 2025

@50sz

PWAにおいて再現性が高いため情報提供させていただきます。

使用ブラウザ : Chrome Beta 144.0.7559.3
左側端末 Xiaomi 13 Ultra : Hyper OS 2(Android 15)
右側端末 Redmi Note 12 Turbo : Evolution X 11.4(Android 16)

Chrome側を強制終了→再試行を繰り返すと正常に動作するため、既出の通りChrome側の問題に感じます。

Image

tamaina

tamaina commented on Dec 10, 2025

@tamaina
Contributor

確かに起動がハングしがちになってきたわね

samunohito

samunohito commented on Dec 10, 2025

@samunohito
Member

弊鯖でも確認できました(v2025.12.0ベース / Chrome143.0.7499.52 / PWA / Android15)。
頻発しております…うおお

samunohito

samunohito commented on Dec 10, 2025

@samunohito
Member

#16951 (comment) を見守る必要がありそうなのでreopen
出していただいてるprは取り込んだので軽減はされているはず…

tai-cha

tai-cha commented on Dec 11, 2025

@tai-cha
Contributor

やや若干オフトピ気味ではあるのですが、AndroidでのVivaldiはこれを書いている今現在では(まだ)Chrome142ベースで、ChromeのPWAと並列でMisskeyをPWAでインストールができるので(時間稼ぎにしかならないものの)改善できるかもしれないです…
頻発してかなり困っている場合は軽減のPRが取り込まれたバージョンが出るまで使える可能性がある

mattyatea

mattyatea commented on Dec 11, 2025

@mattyatea
MemberAuthor

https://issues.chromium.org/issues/466790291
上のissueに試してないですが、

This seems related to the

ServiceWorkerAutoPreloadEnabled feature.

After testing with several devices on Chrome 143 and 142, we were able to conclude that the ServiceWorkerAutoPreloadEnabled feature is causing the issue. We applied the opt out event listener to our service worker from the feature related

GitHub repo. After doing so, the PWA started working as expected (no blank screen).

We also tried disabling the feature through

chrome://flags, which seems to fix it as well.

It seems to me that the default value for ServiceWorkerAutoPreloadEnabled has changed from Disabled to Enabled with Chrome 143.

というコメントが来ていたので、

globalThis.addEventListener('fetch', ev => {

ここあたりをコメントアウトすると直るかもしれないですね

added
Browser supportIssues about browser supporting / browser-specific bugs, features
Upstream Issue (Other Software)This is or is related to an issue caused by other than Misskey ecosystem
on Dec 11, 2025
mattyatea

mattyatea commented on Dec 12, 2025

@mattyatea
MemberAuthor

Type4ny-Project@39c7e92

一旦TypeAnyにコメントアウトの修正を入れてみた

mattyatea

mattyatea commented on Dec 12, 2025

@mattyatea
MemberAuthor

正しい修正方法らしきものでPRを作ってみました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Browser supportIssues about browser supporting / browser-specific bugs, featuresUpstream Issue (Other Software)This is or is related to an issue caused by other than Misskey ecosystem⚠️bug?This might be a bug

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @tamaina@CyberRex0@tai-cha@samunohito@mattyatea

      Issue actions