-
Notifications
You must be signed in to change notification settings - Fork 4.8k
chore(trace): local network access error message #38221
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
base: main
Are you sure you want to change the base?
Conversation
|
I deployed this to |
Screen.Recording.2025-11-14.at.12.42.02.mov |
Test results for "MCP"2432 passed, 116 skipped Merge workflow run. |
Test results for "tests 1"3 flaky40288 passed, 787 skipped Merge workflow run. |
| // Since all our requests go through the service worker, we cannot open the permission prompt for them. | ||
| const lnaPermission = await navigator.permissions.query({ name: 'local-network-access' as PermissionName }).catch(() => { }); | ||
| if (lnaPermission && lnaPermission.state !== 'granted') | ||
| message += `\n\nIf your trace is in a local or private network, please grant Local Network Access in your browser's site settings and reload.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No such thing on my machine. How do I make things work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're on latest Chrome, you should have it. Everybody else shouldn't see it because lnaPermission is undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the setting. I can see the warning. How do I make it go away in my Chrome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the video in #38221 (comment). If you see the warning, you should also see the setting.
Closes #38207.
The current implementation of LNA doesn't really allow us to detect violations.
fetchoutside of a service worker automatically prompts for permission, butfetchinside a service worker does not and simply fails with "failed to fetch".Even if we were able to detect it, the only way of obtaining the permission is through issuing a
fetch. But since that always goes through the service worker in our case, and service-worker-initiatedfetchdoesn't prompt the permission, all we can do is ask the user to grant it in site settings.