New issue
Advanced search Search tips

Issue 680621 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

[Chrome Extension Javascript API] chrome.identity module fails to load in content scripts

Reported by dimudesi...@gmail.com, Jan 12 2017

Issue description

Chrome Version       : 55.0.2883.87
OS Version: 10.0
URLs (if applicable) :

What steps will reproduce the problem?
1. Create a manifest file with the 'identity' permission set.
2. Create a content script the calls a function on the 'chrome.identity' module.
3. Load the un-packaged extension and test.
4. Open dev console, and inspect 'chrome' namespace object - identity module is non-existent.

What is the expected result?
The ability to call the methods on the chrome.identity javascript module from within a content script without error.

What happens instead of that?
TypeError reported in the console with "chrome.identity" undefined.

Please provide any additional information below. Attach a screenshot if
possible.

See attached test extension (zipped or packed .crx).

UserAgentString: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36



 
bug-report.zip
12.0 KB Download
bug-report.crx
24.5 KB Download
bug-report.pem
1.7 KB Download

Comment 2 by woxxom@gmail.com, Jan 12 2017

As you can see in the documentation, only a limited set of chrome.* API is available in content scripts:  https://developer.chrome.com/extensions/content_scripts
Just read that bit myself (after hour of looking for a solution that would work with a content script). I've discovered that I have to use the messaging mechanism to access the identity api from a background script.
 
If there are any admins around, feel free to delete this item.
Status: WontFix (was: Unconfirmed)

Comment 6 Deleted

Sign in to add a comment