How to Reactivate Chrome Notification API for Extensions After Being Blocked?

After conducting extensive research, I may have overlooked something, so I wanted to reach out to the StackExchange community for assistance.

Background:

In the latest version of Chrome (>65), notifications are stored on a per-site basis. If a user grants or denies notification permissions for a specific site and wants to reverse that decision (e.g., accidentally blocking notifications), they can simply access Chrome's notification settings, locate the site in question, and remove the block. This functionality is well-documented and works as intended.

However, this same mechanism also applies to extensions. When an extension is initially granted its necessary permissions and functions properly, if a user accidentally clicks "block" on a single desktop notification from the extension, a prompt appears with two buttons - "OK" and "Cancel". Subsequently, whenever the extension tries to send a notification, instead of the standard desktop alert, a JavaScript notification pops up in the middle of the screen with the same message.

The issue becomes apparent in scenarios like these, such as with the popular Tampermonkey Chrome extension, where the default permission is revoked by the user clicking "block," leading to the altered notification display.

My question consists of two parts:

  1. Where does Chrome store the boolean value of PermissionLevel for extensions since they do not appear in the regular list of granted/blocked sites? Is this setting exposed in a configuration file, or is there any way for users in Chrome >65 to reverse this decision?

  2. Is there a programmatic method that extension developers can utilize to identify when this scenario occurs and prompt users to reconsider granting permission again? While unofficial sources advise against potential abuse, I am unable to find any official guidelines concerning this matter.

Answer №1

It has been confirmed that this issue has been reported to Chromium as a bug awaiting triage with no existing workaround available. The link to the official bug report can be found here:

https://bugs.chromium.org/p/chromium/issues/detail?id=825497

Further testing revealed that attempting to re-enable Chrome desktop notifications for a specific extension by adding its ID to "sites" settings was ineffective due to some settings not saving properly. This behavior suggests another bug within the system.

The current answer, updated on 04-09-2018, states: "it is impossible to re-enable Chrome desktop notifications for a specific extension once they have been blocked."

If anyone discovers a successful workaround to reinstate normal desktop notifications for an extension (such as Tampermonkey) after the user has blocked them, please share it here. However, the lack of a solution so far indicates that there may currently be no method available, potentially attributing the issue to a UI bug.

Answer №2

Unfortunately, the only way to resolve this issue is to uninstall and then re-install the extension.

This problem has been lingering for almost six months now. It seems unlikely that a solution will be implemented anytime soon. https://bugs.chromium.org/p/chromium/issues/detail?id=825497

If you are affected by this issue, please remember to mark it as important at the provided link.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to transfer data from javascript to a Web API Controller using ajax?

I am struggling to send data from JavaScript to a Web API Controller using AJAX. I need help with creating a Web API with fields. Please share your experience and assist me in solving this issue. If you have any PDFs or notes on this topic, please share t ...

Tips for generating a random number and verifying if it matches the user input using inner HTML

I'm striving to create something more advanced than what I currently have, but I've hit a roadblock. My goal is to use the method Math.floor(Math.random()*11) to produce a random number. Then, I want to populate the inner HTML of a <p>, alo ...

jQuery - Wait for the completion of one UI change before initiating another UI change

Is there a way to implement the functionality where $("#login").toggle("drop", {direction: "left"}); is executed first and upon completion, $("#register").toggle("drop", {direction: "right"}); is then carried out? The issue arises from the fact that the ...

Utilize React JS to parse and display a sophisticated JSON structure in a dropdown menu

Looking at the backend data structure provided, we have information on various courses in different departments. { "courseDetails" : [{"departmentId" : 105654, "courses" : [{"stream" : "science","courseIds" : ["104","105 ...

Safari 10.1.1 is encountering an issue with accessing the window.innerWidth property

I'm currently working with a script that dynamically changes the font size based on the viewport size. It seems to be functioning properly in most browsers, except for Safari (I've only tested on version 10.1.1). https://i.sstatic.net/UX3az.jpg ...

Error: Collection2 validation did not pass: The field 'name' must be filled in, the field 'email' cannot be empty, and the field 'message' is mandatory

I need to set up a way for visitors to send messages through my website const mongoose = require("mongoose"); mongoose.connect("MongoDb-Connection-Uri") .then(() => { console.log("mongodb connected"); }) .catch(() => { console.log("fail ...

How can I activate an event with Jquery when the CSS is modified?

I'm wondering if there is a way to create a method or use an event listener that will be triggered when a CSS change occurs. Specifically, my stylesheet includes media queries and I am interested in knowing if it's possible to attach a listener ...

Tips for concealing an element with Vue-html-to-paper

I am working on printing pages and need to hide certain elements. Specifically, I do not want the two button signs to be displayed when I print. I am using a plugin called https://www.npmjs.com/package/vue-html-to-paper Here is my code: <div id="print ...

What manner must I understand this syntax?

After stumbling upon this code snippet online, I was left scratching my head: function cjsDetectionPlugin() { return { name: 'cjs-detection', moduleParsed({ id, meta: { commonjs: { isCommonJS } } }) { ...

What causes the elements in my JSON file to load in a seemingly random order when clicked on?

Scenario in a simplified test case: I created a slider with 2 slides, each containing a 'video' link. When the link is clicked, a <div> is displayed with an array of objects (images). Issue at hand: Upon clicking the 'video' link ...

Methods for applying a style property to a div element with JavaScriptExecutor in Selenium utilizing C#

I have been attempting to change the style of a div element using JavascriptExecutor in C#, but so far, nothing has happened. IJavaScriptExecutor js = (IJavaScriptExecutor)driver; IWebElement element = driver.FindElement(By.XPath("//div[contains(@class, ...

D3.js Sunbursts featuring Hierarchical Arcs that display values at each level, providing a comprehensive view beyond just the aggregate of the leaves

Hey there, Stackoverflow community! I've been working on creating a sunburst chart using the resources provided at: http://bl.ocks.org/kerryrodden/7090426. I've successfully replicated the artwork from the example, but now I'm trying to add ...

A step-by-step guide to displaying image upload previews using React

I am currently working on developing an image upload form with the use of Next.js/React.js. The goal is to allow users to assign tags to each uploaded image and display a preview of the image using 'URL.createObjectURL'. Although the uploading pr ...

Express: issue retrieving numbers from request body array

JavaScript / TypeScript Issue: export const updateSettings = catchErrors(async (req, res) => { console.log("updateSettings req.body: ", req.body) const { organizationId, formdata, updatedItems, updateQuota } = req.body; console.lo ...

What is the best way to display JavaScript in a view in ASP.NET MVC 3?

Good day Everyone, I am currently facing an issue with a javascript variable in my view. This is what I have been trying to do... var skinData = null; and then, when the document is ready.... $.ajax({ type: 'POST', ...

Vue not displaying local images

I'm having trouble creating an image gallery with Vue.js because local images are not loading. I have the src attributes set in the data attribute and can only load images from external sources. For example: data() { return { imag ...

What's the best way to send query parameters or body data in NextJS with Auth0 integration?

I have very limited knowledge of Next.js and JS in general, as well as Auth0. I'm looking for help on how to pass query parameters or a request body to the first block of code below. I understand that I can include a body in the fetch function, but w ...

Enhancing Django Forms with Ajax Validation

Struggling to implement ajax in my django project, I've hit a dead end in finding a solution. My view.py looks like this: from django.shortcuts import render, render_to_response, RequestContext, HttpResponseRedirect from .forms import SignUpForm f ...

How to update an HTML class using JavaScript with conditional statements

I've successfully implemented a bootstrap validation form that changes the inputField color based on error and success states. However, I'm facing an issue with changing the text-color and border-color of the Label element. I've tried vario ...

Choose from an array of JSON objects

I have an example array below: { "orders": [ { "order_id": 1, "email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="345558514c745558514c1a575b59">[email protected]</a>", "city": "London" ...