navigator.onLine doesn't return false on Windows when disconnected from network
Categories
(Core :: Networking, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: sguergachi, Assigned: kernp25)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Updated•8 years ago
|
Updated•8 years ago
|
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Updated•6 years ago
|
Comment 3•4 years ago
|
||
We might just want to skip some interface types that are known to be virtual interfaces (VMWare) here
Updated•3 years ago
|
Will this bug ever be fixed?
Comment 7•10 months ago
|
||
We could try to use PhysicalAdapter for this - but I'm not sure if switching to WMI is justified by this one issue.
I haven't checked, but it's possible that simply checking the PhysicalAddressLength would also get us the information we want - as long as this is 0 for virtual interfaces created by VMs.
I'm happy to review a patch for this.
Comment 8•10 months ago
|
||
PhysicalAdapter was useless to detect VMware Adapters:
PS C:\Users\****> Get-WmiObject Win32_NetworkAdapter | Select-Object Name,PhysicalAdapter
Name PhysicalAdapter
---- ---------------
ASIX USB to Gigabit Ethernet Family Adapter True
Realtek Gaming 2.5GbE Family Controller True
MediaTek Wi-Fi 6E MT7922 160MHz Wireless LAN Card True
Microsoft Kernel Debug Network Adapter False
VMware Virtual Ethernet Adapter for VMnet1 True
Bluetooth Device (Personal Area Network) True
VMware Virtual Ethernet Adapter for VMnet8 True
Microsoft Wi-Fi Direct Virtual Adapter False
Microsoft Wi-Fi Direct Virtual Adapter #2 False
WAN Miniport (SSTP) False
WAN Miniport (IKEv2) False
WAN Miniport (L2TP) False
WAN Miniport (PPTP) False
WAN Miniport (PPPOE) False
WAN Miniport (IP) False
WAN Miniport (IPv6) False
WAN Miniport (Network Monitor) False
PS C:\Users\****>
Comment 9•10 months ago
|
||
PhysicalAddressLength did not help, either.
Comment 10•10 months ago
|
||
Thank you for checking, Masatoshi.
In that case, I suspect the best option here would be to skip adapters that contain "VMware" or "Virtual" in the name.
Definitely doesn't cover all of the possible virtual adapters, but it's better than nothing I suppose.
| Assignee | ||
Comment 11•10 months ago
|
||
(In reply to Valentin Gosu [:valentin] (he/him) from comment #10)
In that case, I suspect the best option here would be to skip adapters that contain "VMware" or "Virtual" in the name.
Definitely doesn't cover all of the possible virtual adapters, but it's better than nothing I suppose.
Is this the same?
If so, should the patch only check for VMnet or should it check for VMware and Virtual?
Comment 12•10 months ago
|
||
VMware should not be checked according to this comment:
// but don't ignore any GUEST side adapters with a description like:
// VMware Accelerated AMD PCNet Adapter #2
| Assignee | ||
Comment 13•10 months ago
|
||
Updated•10 months ago
|
| Assignee | ||
Comment 14•10 months ago
|
||
My adapters:
PS C:\Users\kernp> Get-WmiObject Win32_NetworkAdapter | Select-Object Name,PhysicalAdapter
Name PhysicalAdapter
---- ---------------
Microsoft Kernel Debug Network Adapter False
Realtek Gaming GbE Family Controller True
Realtek RTL8822CE 802.11ac PCIe Adapter True
Microsoft Wi-Fi Direct Virtual Adapter #3 False
WAN Miniport (SSTP) False
WAN Miniport (IKEv2) False
WAN Miniport (L2TP) False
WAN Miniport (PPTP) False
WAN Miniport (PPPOE) False
WAN Miniport (IP) False
WAN Miniport (IPv6) False
WAN Miniport (Network Monitor) False
Microsoft Wi-Fi Direct Virtual Adapter #4 False
Realtek USB GbE Family Controller True
VMware Virtual Ethernet Adapter for VMnet1 True
VMware Virtual Ethernet Adapter for VMnet8 True
| Assignee | ||
Comment 15•10 months ago
|
||
I tested it with the patch applied and it worked perfectly. navigator.onLine was false when there was no internet connection.
Comment 16•10 months ago
|
||
(In reply to kernp25 from comment #11)
If so, should the patch only check for
VMnetor should it check forVMwareandVirtual?
I think only checking for VMnet should be OK if that's all Chrome is doing and it's enough.
Comment 17•10 months ago
|
||
Comment 18•10 months ago
|
||
| bugherder | ||
Description
•