Closed Bug 1944202 Opened 14 days ago Closed 4 days ago

Frequent failures of navigations with "Too many calls to Location or History APIs within a short timeframe." errors in console with ClearURLs extension

Categories

(WebExtensions :: Developer Outreach, defect)

Firefox 134
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: omerfaruko, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0

Steps to reproduce:

Navigate casually in Twitter and Google and switch between tab elements (e.g. switch between "Latest" and "Top" tabs in Twitter search or switch between "All" and "Images" in Google Search, note that these are pseudo navigation tabs, not actual browser tabs)

Actual results:

Recently clicking the tab has started having no effect or delayed effects. First, I assumed something wrong with the mouse, but when I opened the console I observed "Too many calls to Location or History APIs within a short timeframe." message which seemed relevant. Then I assumed something got broken in Twitter, but then the same thing happened with Google Search and upon inspection I observed same message. Since it's somewhat unlikely for Google and Twitter to have same regression, that made me decision to file this bug.

Expected results:

There shouldn't be a delay for switching pseudo-tabs when causally surfing. I wasn't frantically switching between these tabs. Since these tabs are likely modifying history. I suspected it might be something changing in Firefox somewhere. Were there any changes recently on rate limits for history API? How can I further debug that (like verbose printing of sources of history change requests)?

that made me decision to file this bug

That roughly translates to "I decided to file this bug" from weekday evening gibberish.

Component: Untriaged → DOM: Navigation
Product: Firefox → Core

What is the value of dom.navigation.navigationRateLimit.count in your about:config? The default value is 200.

Flags: needinfo?(omerfaruko)

It looks like some additional checking was added in bug 1913000 which landed in Firefox 132, which is semi-recent, but a few versions earlier than what you are using.

dom.navigation.navigationRateLimit.count is 200 and dom.navigation.navigationRateLimit.timespan is 10.

(I got access denied on bug 1913000.)

Flags: needinfo?(omerfaruko)

Emma, any chance you could look into what might be going wrong here? Thanks. Maybe there's some addon doing something weird?

I'm marking this S3. It sounds like a big issue for anybody hitting this but I don't think I've seen any other reports.

Severity: -- → S3
Flags: needinfo?(emz)

An extension could be causing this. I've never seen rate limits hit for legitimate use cases.

Reporter, could you share your list of installed extensions? You can find that data on about:support for example.
Does the issue still occur when you start Firefox in troubleshoot mode (via about:support)?

Flags: needinfo?(emz) → needinfo?(omerfaruko)

Please access the addon list through https://pastebin.com/3p8Px195 with password "FBXv0YaUvx2!s^&".

I'm also using Wayland on Nvidia. I just hope this is unrelated, but it worths mentioning.

Let me try out troubleshoot mode.

Flags: needinfo?(omerfaruko)

It didn't give same error in troubleshoot mode. Let me start bisecting my addons. :(

Thanks!

(In reply to Omer Ozarslan from comment #8)

It didn't give same error in troubleshoot mode. Let me start bisecting my addons. :(

You could also see if devtools show you a meaningful stacktrace. On an affected site you could check the sources in devtools to see which addons inject scripts.

I suspect the culprit is ClearURLs. It happens with only ClearURLs enabled in private browsing window and all other disabled. Likewise, I tried a while without ClearURLs and it behaved normal (though it might take some time to ensure). Skimming through its tracker, https://github.com/ClearURLs/Addon/issues/419 might be related to the issue I'm having.

Steps I followed: In a private browsing window, search something at Google. Click Google Images, then start clicking through 1-2 images per second (as if you're skimming through images in the panel opens on the right after click). If it doesn't happen, click one of associated term buttons on top (where it's placed in the row below search bar and above images grid) and try same.

This is fixed in ClearURLs 1.27.2 or 1.27.3. This can be closed.

Thank you for doing the work to figure out which addon was responsible and following up with them to get it fixed.

Status: UNCONFIRMED → RESOLVED
Closed: 4 days ago
Component: DOM: Navigation → Developer Outreach
Product: Core → WebExtensions
Resolution: --- → FIXED
Summary: Frequent failures of navigations with "Too many calls to Location or History APIs within a short timeframe." errors in console while navigating in Twitter and Google → Frequent failures of navigations with "Too many calls to Location or History APIs within a short timeframe." errors in console with ClearURLs extension
You need to log in before you can comment on or make changes to this bug.