BrowserInterop icon indicating copy to clipboard operation
BrowserInterop copied to clipboard

Uncaught (in promise) DOMException: The operation is insecure.

Open thepra opened this issue 5 years ago • 6 comments

On firefox I have endless console error logs about this, the interested section in the script.js is at the line 183:

for (var i in data) {
    var currentMember = data[i]; // <- This line

    if (typeof currentMember === 'function' || currentMember === null) {
        continue;
    }
   //...
}

Can you figure out how to make it scream this log?

thepra avatar Jan 09 '21 17:01 thepra

Can you show me which method call displays this message ? Or send a repro. I guess it's because this script browsing object tree and is not allowed to read some properties. I think it can happen if you try to read some property from a window in an other domain name

RemiBou avatar Jan 11 '21 13:01 RemiBou

Window.Navigator.Online and then in another browser I also get this about deprecation: immagine

thepra avatar Jan 16 '21 00:01 thepra

Same problem as #110 , we browse the object tree in order to pass window information to c#, I'll try to find a way to avoid those

RemiBou avatar Jan 16 '21 07:01 RemiBou

ok, it that other one is handled in another issue, then my is still this: image

thepra avatar Jan 17 '21 13:01 thepra

Can you send a repro ? Which method are you using ?

RemiBou avatar Jan 17 '21 14:01 RemiBou

Window.Navigator.Online, as said above, I check this boolean in many components, that's why it's spamming the error. As of now I get this value from this wrapping function inside a DI service:

public async Task<bool> IsOnline() =>
	(await (await JsRuntime.Window()).Navigator())?.Online ?? false;

thepra avatar Jan 17 '21 14:01 thepra