Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thepra opened this issue Jan 9, 2021 · 6 comments
Open

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

thepra opened this issue Jan 9, 2021 · 6 comments

Comments

@thepra
Copy link
Contributor

thepra commented Jan 9, 2021

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?

@RemiBou
Copy link
Owner

RemiBou commented Jan 11, 2021

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

@thepra
Copy link
Contributor Author

thepra commented Jan 16, 2021

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

@RemiBou
Copy link
Owner

RemiBou commented Jan 16, 2021

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

@thepra
Copy link
Contributor Author

thepra commented Jan 17, 2021

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

@RemiBou
Copy link
Owner

RemiBou commented Jan 17, 2021

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

@thepra
Copy link
Contributor Author

thepra commented Jan 17, 2021

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 added a commit to thepra/BrowserInterop that referenced this issue Jan 31, 2021
This should fix the issue RemiBou#112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants