Firefox doesn't recognize network connection

When I start Firefox before starting network connection Firefox doesn’t recognize anymore network connection.
To be more clear here’s how to reproduce:

  1. start Firefox
  2. wait a bit (one minute or two is enough)
  3. start network connection (tethering or wifi)
  4. try to browse the net and I get this error message:
Hmm. We’re having trouble finding that site.

We can’t connect to the server at

If that address is correct, here are three other things you can try:

    Try again later.
    Check your network connection.
    If you are connected but behind a firewall, check that Firefox has permission to access the Web.

Press “Try Again” button doesn’t change anything.
If I close and start again Firefox from then on it works normally.
Chromium started before network connection works normally as soon as network connection is established. Then this problem s Firefox specific.

Firefox looks for the network at startup. It does not see it after you start the networking.

Try starting the network before firefox.

1 Like

What kind of network manager are you using?

I am using Network Manager and for me things work for this scenario:

  • I start up the computer and the ADSL modem (same switch), the ADSL modem is connected via Ethernet
  • After the computer is started, I start Firefox, it does see the Ethernet interface and works even if the secondary connection to the Internet via ADSL is not yet up.

What is important I think is that the interface is present, I do not think there is a problem if the connection is not yet up.

In other distributions Firefox works normally provided that network connection works when you use Firefox, not when you start Firefox.

Of course this solve the problem but restarting Firefox every time network connection stop working is not the best way to use it.

I’m using KDE and Network Manager that’s the default.

At present no ADSL available. I’m using my mobile phone as modem and I connect it to pc with tethering or wifi as I wrote.
If you want to check if the problem affect ADSL too you could disconnect ethernet cable before starting Firefox.

I did verify on my setup using an ADSL modem.

Without the cable connected:

2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 94:de:80:a6:bd:a1 brd ff:ff:ff:ff:ff:ff

Started Firefox and connected the cable and things work.

So how does you network interface look like when there is no WiFi connnection yet? Please show the output of “ip a” and “nmcli device”

He is using wifi to a phone.
With ADSL you have the same ip each time so Firefox see the network every time.
With a mobile phone - you get a different ip and possibly a different DNS server ip each time - so Firefox cannot connect to the old ip any more. Mobile phone providers do this to prevent application that provide unpaid wifi network access from attaching to their network without paying for the right to do so. Even the “hot spots” have this unintended feature.

No I think it has nothing to do with fixed versus dynamic IP addresses.

Like I wrote I think the difference is in how the interface presents itself to the system when the connection is not yet up and that is why I asked dumping the output of “ip a” and “nmcli device”

Agreed – even if the interface hasn’t been configured by YaST, system procedures such as “Network Manager” or “wicked” or “systemd network” will still enable and use the interface hardware when called – through their respective configuration setups.

I suspect that, if the interface hasn’t been configured by YaST, Firefox can’t find it if, the interface isn’t active when Firefox starts …

Yast does not configure the interface unless you start yast. Yast is a tool to configure openSUSE - it does not run all the time - in fact it is not even needed if you know the commands to configure linux without the yast crutch.
It is rules in /usr/lib/udev /rules.d that configures the interface names if not overwritten by /etc/udev/rules.d - it is done at boot time by /boot/initrd or /boot/vmlinux unless the interface is added via USB device after the system is up.

Network Manager, or wicked attaches the hardware port to an ip. gateway and DNS.

Tumbleweed is removing wicked as the default and adding Network Manager to be the default if you install the latest Tumbleweed iso. This is my eth0 rule:

llr@VM1:/etc/udev/rules.d> cat 70-persistent-net.rules
# This file was automatically generated by the /usr/lib/udev/write_net_rules
# program,run by the persistent-net-generator.rules rules file.
# You can modify it,as long as you keep each rule on a single
# line,and change only the value of the NAME= key.

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM==“net”, ACTION==“add”, DRIVERS=="?", ATTR{address}==“08:09:99:98:f8:88”, ATTR{dev_id}==“0x0”, ATTR{type}==“1”, KERNEL=="eth", NAME=“eth0”

Wit usb cable (tethering) unplugged and wifi not connected:

~> ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 70:5a:0f:94:1d:d7 brd ff:ff:ff:ff:ff:ff
    altname enp2s0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 3e:13:d4:63:fd:72 brd ff:ff:ff:ff:ff:ff permaddr 44:1c:a8:48:b1:b7
    altname wlp3s0


~> nmcli device
DEVICE         TYPE      STATE         CONNECTION 
wlan0          wifi      disconnected  --         
p2p-dev-wlan0  wifi-p2p  disconnected  --         
eth0           ethernet  unavailable   --         
lo             loopback  unmanaged     --  

Okay, your interface (wlan0) is present but down, that is the same as for my Ethernet interface for the test I did. I started Firefox with the cable disconnected and when the cable was connected again Firefox could access the Internet but I do not have other interfaces apart for the loopback interface,.

So I do not see why it would not work for you.

As you wrote chrome has no problem it seems to be a Firefox specific problem, not sure I can further help with that.

Yes it’s eons that FF works this way, a bit ugly but just close FF and reopen when net conn is completely up and running.

I had same problem in Leap 15.3.
In Linux Mint 21 and OpenMandriva 4.3 FF gives error message if connection is down but works normally as soon as connection is up and running.
Then it should be possible in openSuse too.

Having no alternative of course I have to restart. But sometimes connection come and go many times (at least for me) and restarting FF become nasty.

1 Like

I wonder if the answer on nic - How to force/fake linux eth0 in 'up' status even without cable connected? - Server Fault is a methodology that would solve this? I haven’t had this problem in many, many, many moons, which is about the time since my LAN configuration didn’t match that description.