thomasloven / hass-browser_mod

🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.36k stars 188 forks source link

Remnants of browser mod after uninstallation #519

Closed FSund closed 1 year ago

FSund commented 1 year ago

Home Assistant 2023.1.4 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest

What I am doing: I had browser_mod installed for a while, but uninstalled it a week or two ago since I was not really using it.

Today I had Chrome developer tools open (F12), and noticed the following error:

GET https://<HA-URL>/browser_mod.js?automatically-added net::ERR_ABORTED 404

What I expected to happen:

I do not expect any trace of browser_mod after uninstallation.

What happened instead:

Something related to browser_mod seems to be trying to load when I load HA.

Error messages from the browser console:

card-mod.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
home:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://<HA-URL>/config/www/community/lovelace-card-mod/card-mod.js
a18df7ad.js:24          GET https://<HA-URL>/browser_mod.js?automatically-added net::ERR_ABORTED 404
(anonymous) @ a18df7ad.js:24
r @ a18df7ad.js:24
a @ a18df7ad.js:24
(anonymous) @ a18df7ad.js:53
a @ a18df7ad.js:53
(anonymous) @ a18df7ad.js:83
Promise.then (async)
value @ a18df7ad.js:83
value @ a18df7ad.js:83
_$AE @ app.c86c7218.js:1365
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
w @ app.c86c7218.js:1365
r @ a18df7ad.js:53
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
value @ app.c86c7218.js:1149
value @ app.c86c7218.js:1149
_currentLoadProm.l.then._currentLoadProm @ app.c86c7218.js:1149
Promise.then (async)
value @ app.c86c7218.js:1149
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
set @ app.c86c7218.js:1365
value @ app.c86c7218.js:1149
await in value (async)
value @ app.c86c7218.js:1454
value @ app.c86c7218.js:1454
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
r @ app.c86c7218.js:1149
i @ app.c86c7218.js:1454
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
p @ app.c86c7218.js:1365
T @ app.c86c7218.js:1365
_$AI @ app.c86c7218.js:1365
S @ app.c86c7218.js:1365
update @ app.c86c7218.js:1365
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
w @ app.c86c7218.js:1365
n @ app.c86c7218.js:1454
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
p @ app.c86c7218.js:1365
T @ app.c86c7218.js:1365
_$AI @ app.c86c7218.js:1365
S @ app.c86c7218.js:1365
update @ app.c86c7218.js:1365
value @ app.c86c7218.js:1511
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
set @ app.c86c7218.js:1365
value @ app.c86c7218.js:1365
(anonymous) @ app.c86c7218.js:1365
s @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
Promise.then (async)
d @ core.d18ed81d.js:1
u @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
subscribe @ core.d18ed81d.js:1
S @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
Promise.then (async)
(anonymous) @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
mini-graph-card-bundle.js?hacstag=1512800620110:1  MINI-GRAPH-CARD  0.11.0 
a18df7ad.js:24 Uncaught (in promise) https://<HA-URL>/browser_mod.js?automatically-added
n.onerror @ a18df7ad.js:24
error (async)
(anonymous) @ a18df7ad.js:24
r @ a18df7ad.js:24
a @ a18df7ad.js:24
(anonymous) @ a18df7ad.js:53
a @ a18df7ad.js:53
(anonymous) @ a18df7ad.js:83
Promise.then (async)
value @ a18df7ad.js:83
value @ a18df7ad.js:83
_$AE @ app.c86c7218.js:1365
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
w @ app.c86c7218.js:1365
r @ a18df7ad.js:53
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
value @ app.c86c7218.js:1149
value @ app.c86c7218.js:1149
_currentLoadProm.l.then._currentLoadProm @ app.c86c7218.js:1149
Promise.then (async)
value @ app.c86c7218.js:1149
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
set @ app.c86c7218.js:1365
value @ app.c86c7218.js:1149
await in value (async)
value @ app.c86c7218.js:1454
value @ app.c86c7218.js:1454
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
r @ app.c86c7218.js:1149
i @ app.c86c7218.js:1454
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
p @ app.c86c7218.js:1365
T @ app.c86c7218.js:1365
_$AI @ app.c86c7218.js:1365
S @ app.c86c7218.js:1365
update @ app.c86c7218.js:1365
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
o @ app.c86c7218.js:1365
b @ app.c86c7218.js:1365
w @ app.c86c7218.js:1365
n @ app.c86c7218.js:1454
E @ app.c86c7218.js:849
t @ app.c86c7218.js:849
p @ app.c86c7218.js:1365
T @ app.c86c7218.js:1365
_$AI @ app.c86c7218.js:1365
S @ app.c86c7218.js:1365
update @ app.c86c7218.js:1365
value @ app.c86c7218.js:1511
performUpdate @ app.c86c7218.js:1365
scheduleUpdate @ app.c86c7218.js:1365
_$EC @ app.c86c7218.js:1365
await in _$EC (async)
requestUpdate @ app.c86c7218.js:1365
set @ app.c86c7218.js:1365
value @ app.c86c7218.js:1365
(anonymous) @ app.c86c7218.js:1365
s @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
Promise.then (async)
d @ core.d18ed81d.js:1
u @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
subscribe @ core.d18ed81d.js:1
S @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
Promise.then (async)
(anonymous) @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
(anonymous) @ core.d18ed81d.js:1
layout-card.js?hacstag=156434866244:228 LAYOUT-CARD 2.4.4 IS INSTALLED
card-mod.js?hacstag=190927524320:5 CARD-MOD 3.2.0 IS INSTALLED
vacuum-card.js?hacstag=261291295263:4  VACUUM-CARD  2.6.2 
button-card.js?hacstag=146194325342:425   BUTTON-CARD   Version 3.4.2 
xiaomi-vacuum-map-card.js?hacstag=193372044212:856    XIAOMI-VACUUM-MAP-CARD      Version v2.1.2           
posten-card.js:140   POSTEN-CARD   Version 1.0.0    
hourly-weather.js?hacstag=499270202493:215   HOURLY-WEATHER-CARD   Version 4.9.3    
mushroom.js?hacstag=444350375241:2496 🍄 Mushroom 🍄 - 2.4.1
apexcharts-card.js?hacstag=331701152202:835  APEXCHARTS-CARD  v2.0.2 
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation ↔️ - v1.10.0
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [D] Object refreshed: "home-assistant".
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [V] Reconnecting 1 observers to home-assistant
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [D] Object refreshed: "home-assistant-main".
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [V] Reconnecting 1 observers to home-assistant-main
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [D] Object refreshed: "partial-panel-resolver".
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [V] Reconnecting 1 observers to partial-panel-resolver
swipe-navigation.js?hacstag=5017254791100:1 ↔️ Swipe navigation: [D] Object refreshed: "ha-panel-lovelace".

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

Scoff123 commented 1 year ago

Similar here, I uninstalled browser_mod as I never got around to actually using it. In Chrome Developer tools I see the error:

Failed to load resource: the server responded with a status of 404 (Not Found) for

http://homeassistant.local:8123/browser_mod.js?automatically-added

Also I see

Uncaught (in promise) http://homeassistant.local:8123/browser_mod.js?automatically-added for

3e82212d.js:2

I never configured or used Browser_mod, only installed it via HACS

craigmdennis commented 1 year ago

I have the same issues. I can't find a solution (hence this came up as a result in my search).

tyzen9 commented 1 year ago

I think I have this resolved. Assuming you have the browser_mod HACS integration uninstalled, follow these steps:

:warning: Use extreme caution editing the contents of the config/.storage directory

  1. Make a full backup of your Home Assistant in case of issues
  2. In the config/.storage directory, find the file named lovelace_resources, and open this in a text editor
  3. Remove the browser_mod.js item
      {
        "url": "/browser_mod.js?automatically-added",
        "type": "module",
        "id": "d5e2cae8eaa34b0f8b55a243b3e8d5ab"
      },
  1. Restart Home Assistant

My lovelace_resources file before the change:

{
  "version": 1,
  "minor_version": 1,
  "key": "lovelace_resources",
  "data": {
    "items": [
      {
        "url": "/hacsfiles/button-card/button-card.js?hacstag=146194325350",
        "type": "module",
        "id": "6fedb0c03c6c43179c786a9399e91fd6"
      },
      {
        "url": "/hacsfiles/lovelace-mushroom/mushroom.js?hacstag=444350375271",
        "type": "module",
        "id": "eee426684a2b480bb504b73da2b4bcc2"
      },
      {
        "url": "/browser_mod.js?automatically-added",
        "type": "module",
        "id": "d5e2cae8eaa34b0f8b55a243b3e8d5ab"
      },
      {
        "url": "/hacsfiles/lovelace-layout-card/layout-card.js?hacstag=156434866244",
        "type": "module",
        "id": "64adcbd431d94f2191e26af4146b1c9d"
      }
    ]
  }
}

My lovelace_resources file following the required change:

{
  "version": 1,
  "minor_version": 1,
  "key": "lovelace_resources",
  "data": {
    "items": [
      {
        "url": "/hacsfiles/button-card/button-card.js?hacstag=146194325350",
        "type": "module",
        "id": "6fedb0c03c6c43179c786a9399e91fd6"
      },
      {
        "url": "/hacsfiles/lovelace-mushroom/mushroom.js?hacstag=444350375271",
        "type": "module",
        "id": "eee426684a2b480bb504b73da2b4bcc2"
      },
      {
        "url": "/hacsfiles/lovelace-layout-card/layout-card.js?hacstag=156434866244",
        "type": "module",
        "id": "64adcbd431d94f2191e26af4146b1c9d"
      }
    ]
  }
}
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.