Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
How do I export a HAR log from a firefox extension?

I am trying to trigger a HAR log export from the background script of a Firefox extension, but for the life of me cannot figure out how to do it.

I am using the code found here, I would expect this to work and return the HAR export, but keep getting this error TypeError: browser.devtools is undefined

The documentation on that page also points out the browser devtools will export the HAR log of the page the devtools are attached to, but other than manually opening them on the page (which I have tried to no avail) I have no Idea how to do this programmatically. (I suspect this is the part that is going wrong, as the devtools are undefined).

I have included the "devtools" permission in my manifest file, other than that I'm at a loss as to what else I have overlooked.

Here is the exact lines of code I'm trying to get working (these are contained within an async function)

const har = await browser.devtools.network.getHAR();
console.log(har);

Any help or pointing me in the right direction documentation wise will be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!