chrome.notifications undefined even though minimum_chrome_version is set to 32

986 views
Skip to first unread message

Sean Anderson

unread,
Aug 19, 2014, 10:41:54 PM8/19/14
to chromium-...@chromium.org
Hey there,

I have a file which uses the chrome.notifications API. I'm seeing client errors occur on the following line of code:

            chrome.notifications.getPermissionLevel(function (permissionLevel) {
                if (permissionLevel === 'granted') {
                    this._createNotification(options);
                }
            }.bind(this));


with the error message:

Uncaught TypeError: Cannot read property 'getPermissionLevel' of undefined

However, in my manifest.json, I have the following requirement:

"minimum_chrome_version": "32",

Availability:Since Chrome 28. 
How is it possible that some users do not have access to chrome.notifications given the fact that I'm enforcing the minimum chrome version for my extension to be greater than when the API became available?

Thanks

Sean

PhistucK

unread,
Aug 20, 2014, 1:02:47 AM8/20/14
to Sean Anderson, Chromium-extensions
I am not sure it is supported on Linux. Perhaps this is the issue?
Maybe it is supported once Linux enabled Aura... I do not know.


PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/424f11ed-8ec5-4abc-824d-d1ee098394ec%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Sean Anderson

unread,
Aug 20, 2014, 1:07:27 AM8/20/14
to chromium-...@chromium.org
I previously had code which omitted running chrome.notifications due to that very issue.

However, the docs have since removed the notice indicating that the API is not available on Linux -- which is why I removed my guard.

In addition, I can actually confirm that the PCs throwing the error are on Windows architecture: http://i.imgur.com/6zBG6mP.png

So I don't believe it to be a Linux or ChromeOS issue.

Sean

PhistucK

unread,
Aug 20, 2014, 1:13:59 AM8/20/14
to Sean Anderson, Chromium-extensions
That looks weird. This is probably a stupid question and a far fetched thesis, but are you sure these error come from Chrome and from your extension? Perhaps someone is messing around with the files of your extension, running it as a regular web page (in whatever browser)?


PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.

Sean Anderson

unread,
Aug 20, 2014, 1:18:55 AM8/20/14
to chromium-...@chromium.org
I suppose that's not outside the realm of possibilities. The program is open-source and someone could have lifted the code and sent the errors across.

However, I just released a new version of the program on Sunday evening (v0.144) which removed the guard and added the Chrome 32 manifest request. It's Tuesday now and my database has a ton of error logs regarding the removal of the guard all for the current version of the product. I think it's unlikely that someone forked a version of the product since the new release and started messing with it to that extent. 

My thought is the interaction between required_manifest_version and already installed extensions. If a user is on Chrome v26, has my extension installed, and I then update my extension to require Chrome 32 -- what happens? Does the application work as expected? If so, that could be the cause.

Sean

On Tuesday, August 19, 2014 7:41:54 PM UTC-7, Sean Anderson wrote:
Reply all
Reply to author
Forward
0 new messages