question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Popups no longer work in 0.106

See original GitHub issue

After 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
CAB426commented, Mar 4, 2020

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.

2reactions
thomaslovencommented, Mar 31, 2020

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”.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found