Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
Chrome Notifications API for Extension on Mac not working

This is for a Chrome extension.

The following docs have been taking into account: Chrome Notification API

The following 3 files for example of problem:

Manifest:

{
  "name": "Title",
  "description": "desc",
  "version": "1.1",
  "manifest_version": 3,
  "background": {
    "service_worker": "bg_page.js"
  },
  "permissions": ["notifications"],
  "content_scripts": [
  {
    "matches": [
      "<all_urls>"
    ],
    "js": ["contents.js"]
  }
  ]

}

content.js

// content.js

tld = 'com';

var url = 'https://stackoverflow.com';

console.log(url);

chrome.runtime.sendMessage({
    action: 'xhttp',
    url: url,
    tld: tld
}, function(responseText) {
    console.log(responseText);
    //handleCallback(responseText);
    //console.log(responseText);
    /*Callback function to deal with the response*/
});

bg_page.js

chrome.runtime.onMessage.addListener(function(request, sender, callback) {

    var name = 'test' + (Math.floor(Math.random() * 10000)).toString() + 'v5';

    chrome.notifications.create(name, {
        type: 'basic',
        iconUrl: 'https://i.picsum.photos/id/919/536/354.jpg?hmac=NQVTG38LLhSmuQu5ztuZ846sqRtDy4nzwI-1C457j-o',
        title: 'Test',
        message: 'Current Name: ' + name,
        priority: 2,
        }
    );
    console.log('test');

    console.log(name);

  return true;
}); 

The above works in Chrome on Windows, but not on Mac with version 95 of chrome (and possibly others as well).

So my question is:

Why does this not work on Mac with new versions of Chrome?

The Extention should show a Desktop notification everytime a site is visited in this test case.

Note: Has been tested on 3 seperate Macs.

It might also not work on older versions, has not been tested, but im only focussing on newer versions/newest version of Chrome.

The following has been tested and discussed:

  • Permission issue between Chrome and Mac - has been tested on 3 different Macs, all with same result, and not working.
  • Permission issue between Chrome and Site - but since it should work on all sites in the test code above, this shouldn't be the case. Has also been tested and confirmed, and problem still exists.

So im out of ideas.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!