Closed Bug 1358932 Opened 7 years ago Closed 7 years ago

Firefox needs to be restarted if launched before the network connection is active

Categories

(Core :: Networking, defect)

52 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nate, Assigned: bagder)

Details

(Whiteboard: [necko-active])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170324000000

Steps to reproduce:

Linux distro: openSUSE Tumbleweed
Desktop environment: KDE Plasma 5.9.4
Firefox version: 52.0.2 

1. Turn on your computer without a wifi network connected
2. Launch Firefox
3. Connect to a wifi network
4. Wait a few seconds and try to browse the web with Firefox


Actual results:

Firefox says "Can't find the network" and can't load any pages. If you restart Firefox, it's able to load pages It seems to need a network connection active before it's started.


Expected results:

Firefox should detect that the network connection has activated without needing to be rebooted.
Component: Untriaged → Networking
Product: Firefox → Core
Can you please provide a networking log from a reproduction of this for further investigation? Instructions at https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging

Thanks
Flags: needinfo?(pointedstick)
Oh you're gonna like this one. When I turn on logging, reboot, and go through my Steps to reproduce again, the problem doesn't happen. When I turn off logging and do the same thing, the problem returns.
Flags: needinfo?(pointedstick)
Hrm, best guess without logs is this has something to do with link detection. Daniel, have you ever seen anything like this?
Flags: needinfo?(daniel)
I've tried to reproduce this on my Linux laptop running KDE plasma with Firefox 52.0.2. I can start without network, enable wifi and once it has negotiated that my Firefox seems to work fine. I've tried to toggle on/off multiple times and I cannot see the problem described here.

Just to make sure: you're not using some sort of proxy? Is there anything else that is special in your case that you think I might miss when trying to reproduce?
Flags: needinfo?(daniel) → needinfo?(pointedstick)
Assignee: nobody → daniel
Whiteboard: [necko-active]
No proxy, no weird network settings. To be clear, the common denominator for environment is openSUSE Tumbleweed, not KDE Plasma. I tried Plasma on several other distros and Firefox never exhibited the problem there; only with openSUSE Tumbleweed.
Flags: needinfo?(pointedstick)
I just (30 minutes ago) installed OpenSUSE Tumbleweed in a VM on my Linux box for the purposes of experimenting with this, and since it runs in a VM (so it appears as only having a physical network, no wifi) I instead played with plugging the "cable" in and out from the host to see how it behaved. I've tried numerous different takes at starting without network and toggling it on/off while Firefox is running but I have not even once been able to reproduce this issue. If it starts without network, I can insert the cable and then reload just fine in the affected tabs... I also tried to toggle the network on/off with suse's own network manager but I saw no difference.

I'm at loss.

How reproducible is this issue for you? Does it happen every time you try this maneuver?
This issue is 100% reproducible for me, running on bare metal. I always use Wifi, but I just tried your use case using a USB-to-Ethernet dongle (my laptop doesn't have a hardware Ethernet port) and it reproduced. Here are my exact steps to reproduce using a wired connection:

1. Connect to a Wifi network
2. Open Firefox and browse to some websites
3. Turn off Wifi
4. Plug in a USB-to-Ethernet dongle
5. Verify that the connection is active (e.g. check mail with Thunderbird)
6. Try to browse with Firefox again

This reproduces the issue, and I get "Unable to connect - Firefox can’t establish a connection to the server at <website>". Restarting Firefox makes the new instance see the connection, as usual.

This is very reproducible for me, so either it doesn't reproduce in your VM, or else my system has some particular odd misconfiguration somewhere.


FWIW I've worked around the issue for now by having KDE Plasma connect to my Wifi network more quickly on boot:

System Settings > Connections > General Configuration > All users may connect to this network
and
System Settings > Connections > Wi-Fi Security > Store password for all users (not encrypted)

With these settings, the Wifi network connects quickly enough on boot that it's active before Firefox starts.

I can try to acquire a USB-to-Ethernet dongle so I can try your plugging-in-the-cable maneuver.
I think some logs would be useful here, to figure out exactly why this is happening

https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging#Linux

export MOZ_LOG=timestamp,sync,nsHttp:5,nsHostResolver:5,nsIOService:5
Unfortunately (or fortunately!), I'm no longer able to reproduce this issue. Wanna close it, or keep trying to repro?
When nobody around can reproduce anymore I think we're better off closing it. We can always reopen or file a new one should new facts or problems arise.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.