Popups no longer work in 0.106
See original GitHub issueAfter updating to HA core 0.106, popups no longer work and i’m getting this error in the logs:
browser_mod.js:56:274 Uncaught TypeError: Cannot assign to read only property '0' of object '[object Array]'
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:29 (2 by maintainers)
Top Results From Across the Web
Block or allow pop-ups in Chrome - Computer - Google Support
By default, Google Chrome blocks pop-ups from automatically showing up on your screen. ... At the top right, click More More and then...
Read more >Block pop-ups in Microsoft Edge
The Microsoft Edge feature that blocks pop-ups is effective in preventing websites from ... In Edge, go to Settings and more at the...
Read more >Changing the Pop-up Blocker Settings in Chrome, Firefox, or ...
1. Open Internet Explorer, select the Tools button, and then select Internet options. 2. On the Privacy tab, under Pop-up Blocker, select or...
Read more >AutoLoot - AutoLoot the items you want at The Witcher 3 Nexus
This mod does its best to eliminate the tedious loot popup. ... you want from containers, or manually loot things you might not...
Read more >My Popup Won't Work - How Can I Fix It?
Popup Maker is maintained to perform well with WordPress Core and it's ecosystem of plugins and themes. Not every plugin or theme performs...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to get it working again - with a hacky method. The problem lies with the object (n) being read-only on the deviceID array. The way I got it working was to turn the object into a JSON string and then parse the JSON string back into an object. That removes the read-only constraint and allows ‘this’ to be properly written to a deviceID.
In the browser_mod.js file (/homeassistant/custom_components/browser_mod/browser_mod.js) on line 60, column 170 after
const t=e.callService;e.callService=(e,o,n)=>{
add the following:n=JSON.stringify(n);n=JSON.parse(n);
Your code should look like this once added:
const t=e.callService;e.callService=(e,o,n)=>{n=JSON.stringify(n);n=JSON.parse(n);if(n&&n.deviceID)if(Array.isArray(n.deviceID)){
Attached is an updated browser_mod.js in txt format. Download this, change extension to js and overwrite the existing file. browser_mod.txt
I am not going to submit this as a fix as it is a pretty hacky, but wanted to help you all out.
DISCLAIMER: This works in my scenario. I hope it works for everyone, but I only tested a specific scenario.
Hey everyone. Could you please try release 25, and see if that fixes this? When properly installed, your browser console should say “BROWSER_MOD 1.0.2 IS INSTALLED”.