Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to-do-notifications: Not working on Android google chrome #174

Open
im-ghost opened this issue Jul 31, 2022 · 14 comments
Open

to-do-notifications: Not working on Android google chrome #174

im-ghost opened this issue Jul 31, 2022 · 14 comments
Labels
area: to-do-notifications bug A routine task. effort: small Task is a small effort. help wanted If you know something about this, we would love your help!

Comments

@im-ghost
Copy link

For some reason the application doesn't seem to work with my browser and also there is no indication that a notification has been enabled

@teoli2003
Copy link
Member

There was a bug (my fault). We fixed it earlier today. Can you double-check it works?

@im-ghost
Copy link
Author

Some changes seems to have be implemented ,the todo item now get pretended to the body but a notification still wasn't sent. though it asked for notification permission when I clicked the allow notification button ,and I granted it

@teoli2003
Copy link
Member

Thank you, there likely is a second problem. (I suspect the notification API evolved since this has been written). I'll try to dig this out.

@im-ghost
Copy link
Author

Thank you, there likely is a second problem. (I suspect the notification API evolved since this has been written). I'll try to dig this out.

Will look up to that ,sir

@teoli2003
Copy link
Member

teoli2003 commented Aug 16, 2022

So I got the notification on Firefox:
Capture d’écran 2022-08-16 à 18 56 39

On Safari
Capture d’écran 2022-08-16 à 19 13 53

It didn't work on Chrome Desktop (though it asked for permission).

(I hope that solving this on Desktop, as we can reproduce the problem there, will fix the problem on Android too)

@im-ghost
Copy link
Author

Looks likes it is browser compatability issue

@teoli2003
Copy link
Member

I've tried in Chrome with the Native notification flag on and off, no difference. The Notification is not displayed and fail silently.

Also when I add a show event handler, it displays the message as if the notification is shown (which is not):

notification.onshow = () => {
  console.log('Notification shown');
};

I've not found anything on the Web about this. (Difficult to search for Notification API, a lot of noise…)

@jpmedley Could you find somebody who could help us? The code is fairly short and straightforward; a Web Notification API specialist will probably need only a few minutes of their time to understand it. I really would like to have this example work in Chrome (and maybe update our guides on MDN)

@jpmedley
Copy link

I ran into this a few weeks ago. The problem's not in the code. On mac, notifications need to be turned on at the OS level. I'm still trying to find out why. I'm told that this resets with every system upgrade, but I haven't confirmed this. There is no way to detect this condition in a script.

I'll keep you apprised with updates as I learn them.

image

@im-ghost
Copy link
Author

im-ghost commented Aug 17, 2022

I ran into this a few weeks ago. The problem's not in the code. On mac, notifications need to be turned on at the OS level. I'm still trying to find out why. I'm told that this resets with every system upgrade, but I haven't confirmed this. There is no way to detect this condition in a script.

I'll keep you apprised with updates as I learn them.

Thanks

@jpmedley
Copy link

We're having trouble pinning down the precise cause of this. Here's what we think at this point.

Apple has changed its notification API for mac. The old one is still available but deprecated. We think that with the new one, if you decline the first notification request, all notifications are shut off at the os level for Chrome. I recently got a new work mac, so I mentioned that I must have accepted the first Firefox request and that's why notifications work in that app. Apparently it's also possible that Firefox has yet to upgrade to the new mac API. At this point, we just don't know.

@beverloo, please correct this if I've gotten anything wrong.

@teoli2003
Copy link
Member

Thanks for digging into this. These would explain quite a lot of problems.

@schalkneethling
Copy link
Contributor

We are merging this repository into dom-examples. I will move this issue to dom-examples, so this conversation can continue there.

@schalkneethling
Copy link
Contributor

@schalkneethling schalkneethling transferred this issue from mdn/to-do-notifications Sep 26, 2022
@caugner caugner added needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. area: to-do-notifications labels Oct 10, 2023
@caugner caugner changed the title Not working on Android google chrome to-do-notifications: Not working on Android google chrome Oct 12, 2023
@zfox23
Copy link

zfox23 commented Oct 18, 2023

hi folks :) i'm going through some open MDN issues and this one popped up.

my latest understanding of this issue is:

  1. this issue is related to dom-examples/to-do-notifications
  2. this issue was opened because of a problem with this example on Chrome on Android
  3. folks learned that the example didn't work on Chrome on Desktop (on MacOS at least). a possible explanation of this problem is a failure to enable the necessary (and sometimes annoying) OS-level permissions for Chrome, preventing the notification from working at all.

i have a few questions:

  1. i tried this example on Chrome on Android (S22 Ultra) after verifying that both the site and Chrome have notification permissions, and i did not receive the notification - so it appears as though there's still a problem with the application code. does this match others' experiences?
  2. i have tried this example on Chrome on MacOS just now, ensuring that Chrome can show notifications at the OS level, and ensuring that notifications for the demo site are enabled. It worked!
    CleanShot 2023-10-18 at 12 54 50@2x
    so - is there still a problem with this example on MacOS Chrome?

if there is still a desire to fix this example on Android/Chrome, this issue should still be active. @teoli2003 - is this something that you would fix?

mentioning all involved:
@schalkneethling @teoli2003 @jpmedley @im-ghost

@zfox23 zfox23 added bug A routine task. help wanted If you know something about this, we would love your help! effort: small Task is a small effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: to-do-notifications bug A routine task. effort: small Task is a small effort. help wanted If you know something about this, we would love your help!
Projects
None yet
Development

No branches or pull requests

6 participants