I always get this error in Chrome's console.

Uncaught Error: chrome.tabs is not supported in content scripts. See the content scripts documentation for more details.

But everything works fine.

Anyone knows what is causing this and how I can solve it?


Typically, the cause is a misbehaving extension. In my case it was "MeasureIt!". To identify, which extension is making troubles, you can either

deactivate them one by one and test

  1. deactivate all the extensions
  2. ensure the error is gone
  3. activate extensions one by one
  4. test if the error reappears, repeat from step 3


search their source code

  1. open chrome://extensions
  2. activate "Developer mode" in the top right corner
  3. now you can open background.html for every extension
  4. Ctrl+F, type in "chrome.tabs" to search for suspicious code spots
  5. give feedback to the extension creator
  • 8
    Nice one :) Was 'Measureit!' for me also.. – Eddie Sep 20 '11 at 10:32

You cannot use chrome.tabs in content scripts. According to the documentation,

...content scripts have some limitations. They cannot:

  • Use chrome.* APIs (except for parts of chrome.extension)
  • Use variables or functions defined by their extension's pages
  • Use variables or functions defined by web pages or by other content scripts

So, you can only use the chrome.tabs API in background pages or other extension pages. You can use extension message passing to request that a background page use chrome.tabs.

  • I don't get what is using chrome.tabs. Could it be one of my Chrome extensions? – 8k_of_power Aug 7 '11 at 9:39
  • 3
    Yes, this error can only be thrown by a Chrome extension (as of now). – Digital Plane Aug 7 '11 at 11:07
  • 5
    For me, it was MeasureIt! causing the error. – Justin Bull Aug 24 '11 at 19:20
  • @weng If you still get the error, try disabling some extensions in groups and see if the error is removed. – Digital Plane Aug 25 '11 at 4:24
  • MeasureIt! Also causing this error for. Can't be bothered to debug someone else's code so I'm just bearing with it for now. – sw00 Sep 5 '11 at 12:29

This is caused by an extension using the chrome.tabs permission, but without specifying that it does so in the manifest.json packaged with the extension. The trick is not just to find the extension that uses chrome.tabs, but to find the one that does so without announcing it.

Start with a more automated approach (multi-line commands for readability): On *nix:

$ find . -type f \
> | xargs grep -l chrome.tabs \
> | cut -d '/' -f 2 \
> | uniq

On Windows, using PowerShell:

> gci -rec |? {-not $_.PSIsContainer} `
>> | sls 'chrome.tabs' `
>> | select -Unique Path `
>> |% {$_.Path.Split('\')[10] } `
>> | select -Unique

Then go to the chrome://extensions tab to match directories in the results to extension names, and click the permissions of each one to see who isn't copping to their usage of chrome.tabs. Note that on the 4th line of the PowerShell snippet, I index '10' because that's how many path components there are from C:\ to the Extensions directory; it could be different on your system.

In my case, I fully automated the search by tacking on a couple more segments to the pipeline:

$ find . type f \
> | xargs grep -l chrome.tabs \
> | cut -d '/' -f 2 \
> | uniq \
> | xargs -I % find % -name 'manifest.json' \
> | xargs grep -L tabs

Now, looking in chrome://extensions:

enter image description here


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.