-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Bug]: Doesn't work with Brave browser, but Chrome does. Also can't seem to receive notifications on localhost. Tried to use optOut as well. #1154
Comments
Tested on a Vercel hosted version that I had when I tested back then and it worked, got the subscribe message. I dont get it, it doesnt work on localhost or on brave, The hosted one in vercel only worked on chrome. I just can't seem to be able to test it in localhost. |
I think I need to update the importScript to /v16 just noticed that changed to that. |
@Inzendis Brave blocks OneSignal by default, tuning off Braves shields should fix the issue you are seeing.
Make sure both the .js file used in the |
Ok fixed it. I made sure to update the SDK importScript and did something else. If anyone sees this and is using NextJS App Dir 13.5+:
Put it in your RootLayout, but inside The body tag as children. Maybe there is another solution, but that is what worked for me. Im going to be rendering this if the user is logged in. My auth is with NextAuth, Im going to fetch the session with their method in server component and then check if there is any to active the notifications. Im also going to pass a data tag to the OneSignal.User. |
What happened?
In Chrome I can do
And I get all the correct info. In Brave browser I get
Also I got notifications enabled in my PC and in Chrome and I can subscribe there but when I do test notifications it doesn't work.
It used to work a couple of months ago, maybe July of last year when I was testing this before thinking of using it. And now that I need it its a problem.
Maybe because im in a sub directory /home?
What browsers are you seeing the problem on?
Brave
What operating system are you running?
Windows 10
Steps to reproduce?
What did you expect to happen?
Just basic notifications to be sent and received
Relevant log output
The text was updated successfully, but these errors were encountered: