Send notification in Manifest V3

2,173 views
Skip to first unread message

Med Amine Souaiaia

unread,
Jan 16, 2021, 2:38:56 PM1/16/21
to Chromium Extensions
Hello,

I'am trying to migrate my extension to the MV3; i have an issue with notifications. In fact, calling chrome.notification.create from a service worker raises an error : 
"Uncaught (in promise) ReferenceError: Image is not defined"

Is it no longer possible to show notifications in the MV3 or there is something that I missed ?

Thank you

ilyaigpetrov

unread,
Jan 17, 2021, 9:08:20 AM1/17/21
to Chromium Extensions, so.m...@gmail.com
In the official google document about MV3 I read that developers must migrate from extensions notifications API to web notifications: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API.

And you error message is about an "Image" -- you should check if image is present and is it required in the API you use.

ilyaigpetrov

unread,
Jan 17, 2021, 9:12:44 AM1/17/21
to Chromium Extensions, ilyaigpetrov, so.m...@gmail.com

Med Amine Souaiaia

unread,
Jan 18, 2021, 11:43:21 AM1/18/21
to Chromium Extensions, ilyaigpetrov
Good to know. Thank you for the assistance. 

Simeon Vincent

unread,
Jan 19, 2021, 2:12:05 PM1/19/21
to Med Amine Souaiaia, Chromium Extensions, ilyaigpetrov
Med, to my knowledge this is not an intentional change. Could you file a bug report on crbug.com? It would also be helpful if you could include a simplified example extension to help the folks triaging the issue easily reproduce the bug and get it directed to the right engineers.

ilyaigpetrov, the Manifest V3 design doc is a launching off point for implementation work and does not necessarily reflect the end product. This API is an example of something we originally intended to deprecate but adjusted our plans for logistical reasons. Our MV3 Migration docs should be our canonical list of what's intentional. If you see something you think may be a mistake, I'd encourage you to look for and possibly open a new doc bug or an extension platform bug.

Cheers,

Simeon - @dotproto
Chrome Extensions DevRel


--
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 view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/f608e50a-ebfb-4acd-b1e0-93b86cb5f4d3n%40chromium.org.

Med Amine Souaiaia

unread,
Jan 20, 2021, 7:41:02 AM1/20/21
to Chromium Extensions, Simeon Vincent, Chromium Extensions, ilyaigpetrov, Med Amine Souaiaia
Reply all
Reply to author
Forward
0 new messages