Open nncl opened 4 years ago
@nncl Yes, I support safari_safari_web_id in safari.
I have been suffering from the same phenomenon since the day before yesterday, but now it seems to be able to call the API successfully. Are still experiencing the problem in your environment? If the problem is still there, I'll find a reproducible environment and look deeper into it.
@MSakamaki yes, unfortunately still happening when testing on Safari this following environment https://onesignal-testing.surge.sh/ Have you tried? If so, this error is shown for you?
Thanks for your time.
Temporary Report
After investigating, I found that there is a problem with the Driver inside ngsw-worker.js.
It appears that the server is returning a CORS error due to the server hooking up the "https://onesignal.com/" communication when fetching onesignal communications and executing from the application's domain. We have been able to confirm that it can be worked around by temporarily disabling this feature, but we are still investigating the underlying solution.
https://github.com/angular/angular/blob/master/packages/service-worker/worker/src/driver.ts#L404
@MSakamaki thanks, I appreciate your time. I'll try to disable and test as you did, and also if I come up with something else I'll let you know.
I am submitting a
What is the expected behavior?
Be able to get the user id through
await OneSignal.getUserId()
What is the current behavior?
It returns a bug when subscribing as shown:
What are the steps to reproduce?
As far as I can see just creating the project as the example in the docs.
What is the use-case or motivation for changing an existing behavior?
Which versions are you using for the following packages?
Angular: 10.2.0 Angular CDK: 10.2.6 Angular CLI: 10.2.0 Nx (option): ngx-onesignal: 10.0.0
Is there anything else we should know?
This is my app.module:
And my app.component:
Also, I couldn't see anything about the
safari_web_id
property as described in https://documentation.onesignal.com/docs/safari-web-push-setup, so, does this wrapper supports it?My Safari version is 14.0 (15610.1.28.1.9, 15610) and I'm on a Mac OS Catalina 10.15.7.
You can access my example here https://onesignal-testing.surge.sh and also its repository on Github https://github.com/nncl/ngx-onesignal-test
I really appreciate your help :)