Event webNavigation.onCompleted not firing

Following this example, I’m unable to trigger this listener, added it on my content script:

const filter = {
  url:
  [
    {hostContains: "example.com"},
    {hostPrefix: "developer"}
  ]
}

function logOnCompleted(details) {
  console.log(`onCompleted: ${details.url}`);
}

browser.webNavigation.onCompleted.addListener(logOnCompleted, filter);

I also tried moving it to background script but still, the event is never triggered.

Content scripts barely have any APIs: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts#webextension_apis

Also, where are you checking when you tried it in the background script and do you have the necessary permissions?

sure I do, I actually implemented this workaround:

Which workaround? If it’s the popstate listener then that’s not a workaround, that’s expected behavior afaik, since the page doesn’t actually load.

I mean a way to get updated on current url change, since I were unable to make the background script work.