Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Hanging requests when closing the browser while offline

jbr replied
Артем Кралин

Hi! We have automated tests that run in Firefox across a large number of instances. There are about a hundred nodes where the browser is launched. For security reasons, there is no Internet access. When the browser closes, requests are sent to 146.75.117.91. Since there is no Internet connection, the request fails to complete, and the process terminates due to a timeout. Because the browser is controlled by geckodriver, the `driver.close()` call fails with an error. I’ve tried numerous browser startup options, but none solve the problem; the process still crashes. The only thing that works is blocking the IP address at the firewall level or in the `hosts` file. However, I’m not happy with this solution because it would need to be applied to a hundred nodes, which would create scalability issues down the line. Are there perhaps any options I missed? I also found these addresses in `omni.ja`. Could it be that they are hardcoded and cannot be changed via options?


What I tried

  1. телеметрия

options.set_preference('toolkit.telemetry.enabled', False)

options.set_preference('toolkit.telemetry.rejected', True)

options.set_preference('datareporting.healthreport.uploadEnabled', False)

options.set_preference('datareporting.policy.dataSubmissionEnabled', False)

options.set_preference('toolkit.telemetry.shutdownPingSender.enabled', False)

options.set_preference('toolkit.telemetry.shutdownPingSender.enabledFirstSession', False)

options.set_preference('toolkit.telemetry.firstShutdownPing.enabled', False)

options.set_preference("telemetry.fog.init_on_shutdown", False)


pac = """data:text/plain,function FindProxyForURL(url, host) {

   var blocked = [
       "incoming.telemetry.mozilla.org",
       "telemetry.mozilla.org",
       "normandy.cdn.mozilla.net",
       "firefox.settings.services.mozilla.com",
       "contile.services.mozilla.com",
       "push.services.mozilla.com",
       "aus5.mozilla.org",
       "versioncheck.addons.mozilla.org"
   ];
   for (var i = 0; i < blocked.length; i++) {
       if (dnsDomainIs(host, blocked[i]) || host == blocked[i]) {
           return "PROXY 127.0.0.1:1";
       }
   }
   return "DIRECT";

}"""

fp.set_preference('network.proxy.type', 2)

fp.set_preference('network.proxy.autoconfig_url', pac)


  1. Направить телеметрию в несуществующий адрес

options.set_preference('toolkit.telemetry.server', )

options.set_preference('toolkit.telemetry.server_owner', 'localhost')


  1. Или через proxy — завернуть весь трафик в несуществующий прокси
  2. только для доменов телеметрии это сложно, но можно отключить все внешние запросы при shutdown

fp.set_preference('toolkit.telemetry.shutdownPingSender.backgroundtask.enabled', False)


  1. fp.set_preference('toolkit.asyncshutdown.crash_timeout', 10000)

fp.set_preference('telemetry.fog.log.level', 'off')

fp.set_preference('telemetry.fog.artifact_build', False)

  1. Отключить фоновые задачи при shutdown

fp.set_preference('browser.background.tasks.enabled', False)

fp.set_preference('browser.backgroundtasks.scheduled.task.timeout.sec', 0)


  1. Заблокировать через hosts-like механизм Firefox

options.set_preference('network.dns.localDomains',

                 'incoming.telemetry.mozilla.org,telemetry.mozilla.org,normandy.cdn.mozilla.net')


options.set_preference('network.captive-portal-service.enabled', False)

options.set_preference('network.connectivity-service.enabled', False)


  1. Отключить Mozilla Remote Settings

options.set_preference('services.settings.server', )


  1. Glean telemetry (новая система Mozilla)

options.set_preference('telemetry.fog.artifact_build', False)

options.set_preference('telemetry.fog.test.localhost_port', -1)

options.set_preference('toolkit.telemetry.archive.enabled', False)

options.set_preference('toolkit.telemetry.bhrPing.enabled', False)

options.set_preference('toolkit.telemetry.newProfilePing.enabled', False)

options.set_preference('toolkit.telemetry.reportingPolicy.firstRun', False)

options.set_preference('toolkit.telemetry.unified', False)

options.set_preference('toolkit.telemetry.unifiedIsOptIn ', False)

options.set_preference('toolkit.telemetry.prompted ', 2)

options.set_preference('toolkit.telemetry.unifiedIsOptIn ', False)

options.set_preference('toolkit.telemetry.updatePing.enabled', False)


  1. Отключить Glean полностью

options.set_preference('datareporting.glean.enabled', False)

options.set_preference('telemetry.fog.enabled', False)

Hi! We have automated tests that run in Firefox across a large number of instances. There are about a hundred nodes where the browser is launched. For security reasons, there is no Internet access. When the browser closes, requests are sent to 146.75.117.91. Since there is no Internet connection, the request fails to complete, and the process terminates due to a timeout. Because the browser is controlled by geckodriver, the `driver.close()` call fails with an error. I’ve tried numerous browser startup options, but none solve the problem; the process still crashes. The only thing that works is blocking the IP address at the firewall level or in the `hosts` file. However, I’m not happy with this solution because it would need to be applied to a hundred nodes, which would create scalability issues down the line. Are there perhaps any options I missed? I also found these addresses in `omni.ja`. Could it be that they are hardcoded and cannot be changed via options? What I tried # телеметрия options.set_preference('toolkit.telemetry.enabled', False) options.set_preference('toolkit.telemetry.rejected', True) options.set_preference('datareporting.healthreport.uploadEnabled', False) options.set_preference('datareporting.policy.dataSubmissionEnabled', False) options.set_preference('toolkit.telemetry.shutdownPingSender.enabled', False) options.set_preference('toolkit.telemetry.shutdownPingSender.enabledFirstSession', False) options.set_preference('toolkit.telemetry.firstShutdownPing.enabled', False) options.set_preference("telemetry.fog.init_on_shutdown", False) pac = """data:text/plain,function FindProxyForURL(url, host) { var blocked = [ "incoming.telemetry.mozilla.org", "telemetry.mozilla.org", "normandy.cdn.mozilla.net", "firefox.settings.services.mozilla.com", "contile.services.mozilla.com", "push.services.mozilla.com", "aus5.mozilla.org", "versioncheck.addons.mozilla.org" ]; for (var i = 0; i < blocked.length; i++) { if (dnsDomainIs(host, blocked[i]) || host == blocked[i]) { return "PROXY 127.0.0.1:1"; } } return "DIRECT"; }""" fp.set_preference('network.proxy.type', 2) fp.set_preference('network.proxy.autoconfig_url', pac) # Направить телеметрию в несуществующий адрес options.set_preference('toolkit.telemetry.server', '') options.set_preference('toolkit.telemetry.server_owner', 'localhost') # Или через proxy — завернуть весь трафик в несуществующий прокси # только для доменов телеметрии это сложно, но можно отключить все внешние запросы при shutdown fp.set_preference('toolkit.telemetry.shutdownPingSender.backgroundtask.enabled', False) # fp.set_preference('toolkit.asyncshutdown.crash_timeout', 10000) fp.set_preference('telemetry.fog.log.level', 'off') fp.set_preference('telemetry.fog.artifact_build', False) # Отключить фоновые задачи при shutdown fp.set_preference('browser.background.tasks.enabled', False) fp.set_preference('browser.backgroundtasks.scheduled.task.timeout.sec', 0) # Заблокировать через hosts-like механизм Firefox options.set_preference('network.dns.localDomains', 'incoming.telemetry.mozilla.org,telemetry.mozilla.org,normandy.cdn.mozilla.net') options.set_preference('network.captive-portal-service.enabled', False) options.set_preference('network.connectivity-service.enabled', False) # Отключить Mozilla Remote Settings options.set_preference('services.settings.server', '') # Glean telemetry (новая система Mozilla) options.set_preference('telemetry.fog.artifact_build', False) options.set_preference('telemetry.fog.test.localhost_port', -1) options.set_preference('toolkit.telemetry.archive.enabled', False) options.set_preference('toolkit.telemetry.bhrPing.enabled', False) options.set_preference('toolkit.telemetry.newProfilePing.enabled', False) options.set_preference('toolkit.telemetry.reportingPolicy.firstRun', False) options.set_preference('toolkit.telemetry.unified', False) options.set_preference('toolkit.telemetry.unifiedIsOptIn ', False) options.set_preference('toolkit.telemetry.prompted ', 2) options.set_preference('toolkit.telemetry.unifiedIsOptIn ', False) options.set_preference('toolkit.telemetry.updatePing.enabled', False) # Отключить Glean полностью options.set_preference('datareporting.glean.enabled', False) options.set_preference('telemetry.fog.enabled', False)
Attached screenshots

All Replies (1)

That's your nearest CDN so you'd need to point the hosts to loopback as you've already figured.

There is this "Work Offline" option of the browser that I'm not sure how exactly is supposed to work regarding local and private network resources but you might be able to test what exactly it does to what ranges or lookups.

You're right this would be related to remote settings, glean ping to remove telemetry, and/or the aus5 updater endpoint, try adding more of your FindProxyForURL list into the network.dns.localDomains

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.