[解決] chrome/edge瀏覽器開啟F12開發者模式,點選應用標籤崩潰

AlexChow發表於2024-06-21

2024/6/11 晴
前一天都是好的,突然就出現題目的問題了,嘗試了各種方法

  1. 清理瀏覽器快取
  2. 隱私模式
  3. 使用chorome, 使用edge
  4. 使用win11沙盒裡面的edge

搞得人很崩潰,恰好又遇到其他元件需要除錯,一直沒定位到問題. 直到今天 2024/6/20 終於解決了.

縮小了範圍後,發現居然是網站的 manifest.json 配置導致的

網上找到的資料

實際工程的解決辦法

最終的 manifest.json 檔案

{
  "name": "xxx2025",
  "short_name": "xxx",
  "description": "xxx2025",
  "id": "/?xxxxx=1",
  "lang": "cn",
  "start_url": "/",
  "display_override": [
    "fullscreen",
    "minimal-ui",
    "window-controls-overlay"
  ],
  "display": "fullscreen",
  "background_color": "#000000",
  "theme_color": "#ffffff",
  "prefer_related_applications": false,
  "icons": [
    {
      "src": "/_content/xx.Shared/favicon.jpg",
      "sizes": "256x256",
      "type": "image/jpg"
    },
    {
      "src": "/_content/xx.Shared/appicon.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "features": [
    "Cross Platform"
  ],
  "categories": [
    "productivity",
    "food"
  ],
  "launch_handler": {
    "client_mode": "navigate-existing"
  },
  "shortcuts": [
    {
      "name": "日報表",
      "url": "/DailyReport"
    },
    {
      "name": "月報表",
      "url": "/MonthlyReport"
    },
    {
      "name": "排行榜",
      "url": "/RankingReport"
    }
  ]
}

相關文章