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

[Bug]: [Firefox] Request to access cookie or storage on “https://cdn.onesignal.com/sdks/OneSignalSDK.js” was blocked because it came from a tracker and content blocking is enabled. #1149

Open
quarryman opened this issue Dec 27, 2023 · 1 comment

Comments

@quarryman
Copy link

What happened?

Starting from Firefox version 109 I am getting next error in console
It's clear this comes from browser policy to prevent 3-d party services from tracking users.

I consider this is known however I didnt find direct best practice from OneSignal how to deal with it.

What browsers are you seeing the problem on?

Firefox

What operating system are you running?

macOS SONOMA 14.2

Steps to reproduce?

Add OneSignal CDN to page
Get error in console in Firefox

What did you expect to happen?

CDN script to execute and work without errors

Relevant log output

No response

@quarryman quarryman changed the title [Bug]: Request to access cookie or storage on “https://cdn.onesignal.com/sdks/OneSignalSDK.js” was blocked because it came from a tracker and content blocking is enabled. [Bug]: [Firefox] Request to access cookie or storage on “https://cdn.onesignal.com/sdks/OneSignalSDK.js” was blocked because it came from a tracker and content blocking is enabled. Dec 27, 2023
@jkasten2
Copy link
Member

jkasten2 commented Jan 3, 2024

@quarryman Thanks for reporting, I was able to reproduce the warning in Firefox 121.0 with default settings, but everything continues to work correctly.

Request to access cookie or storage on “<URL>” was blocked because it came from a tracker and content blocking is enabled. 4

Request to access cookie or storage on “https://onesignal.com/sdks/OneSignalSDK.js” was blocked because it came from a tracker and content blocking is enabled.
Request to access cookie or storage on “https://cdn.onesignal.com/sdks/OneSignalPageSDKES6.js?v=151605” was blocked because it came from a tracker and content blocking is enabled.
Request to access cookie or storage on “https://onesignal.com/api/v1/sync/f246ca4c-d595-454b-8c7e-4ddfad76e978/web?callback=__jp0” was blocked because it came from a tracker and content blocking is enabled.
Request to access cookie or storage on “https://onesignal.com/sdks/OneSignalSDKStyles.css?v=2” was blocked because it came from a tracker and content blocking is enabled.

image
Screenshot from Firefox 121.0's JS console

Work around to hide some console warnings

crossorigin="anonymous" can be added to the <script> tag where you include OneSignal, as noted by Mozilla's docs, however this only removes 2 of the 4 warnings.

Follow up

We will investigate more if this should be the new recommendation for integrating the OneSignal SDK. Also on how the other 2 warnings can be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants