-
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
🚧 OneSignal WebSDK v16 Released (Beta 8)! 🚧 -- seeking feedback #980
Comments
I've reviewing this, but I couldn't find some key functions in those docs. |
@netizen-ais , However, instead it will take a JWT token. Did you have any other questions? |
Hi all, thanks for v11, the new user model is exactly what we need for our client. We experienced some issues, your support desk refered to this Github issue. We are new to OneSignal, so we had to start from scratch. This did not work out for v11 due to the lack of updated documentation, so we decided to build a proof of concept based on v9. We wanted to explore all possibilities, so implemented all events and methods. This worked like a charm, then we tried migrating to v11 and ran into a few issues.
All help is well appreciated! 😀 BTW: When do you expect a stable v11 version? The 15th of March Marc said “we expect it within weeks rather than months”. 😀 |
The promise you're looking for is actually the OneSignal.init({
appId: NOTIFICATION_ONESIGNAL_APP_ID,
safari_web_id: NOTIFICATION_ONESIGNAL_SAFARI_WEB_ID,
notifyButton: {
enable: !true,
},
}).then(() => {
console.log("Opted in:", OneSignal.User.PushSubscription.optedIn);
console.log("Push notifications enabled: " + OneSignal.User.PushSubscription.optedIn);
})
Same goes for logging in. Make sure the OneSignal.init({
appId: NOTIFICATION_ONESIGNAL_APP_ID,
safari_web_id: NOTIFICATION_ONESIGNAL_SAFARI_WEB_ID,
notifyButton: {
enable: !true,
},
}).then(() => {
OneSignal.login("laurens");
})
JWT tokens (identity verification) are not currently supported. You can see a list of limitations here.
Could you clarify what you're basing the version numbers on? Did you mean v16? |
Hi @rgomezp, thank you for your reply and taking the time looking into our code! I updated our code accordingly, waiting for the init to resolve fixed the first issue, now The second issue still occurs, I tested this on Chrome 114 after resetting site's permissions and clearing site's data. Subscribing seems successful, but the error still occurs: Login: Error while identifying/upserting user: identifyUser failed: no identity found. At this time the After waiting say 10 seconds, other errors occur: Database REMOVE Error: DOMException: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. When just refreshing the page, previously mentioned errors no longer occur, About JWT, I misinterpreted your comment and now understand JWT will eventually be implemented instead of using a separate hash. Version numbers confuse me. :-) With v11 I refered to versions as communicated at https://documentation.onesignal.com/v11.0/docs. |
Hi @rgomezp, Login issuesError Login: Error while identifying/upserting user: identifyUser failed: no identity found keeps occuring: Steps to reproduce:
The promise's success callback is called. Now the error occurs, both When reloading the page, Related question: does Multiple users using the same browserOur goal is to only provide web push notifications to users with accounts on our website, is this possible on shared devices? I tried using I read in the release notes (https://github.com/OneSignal/OneSignal-Website-SDK/blob/user-model/v1/MIGRATION_GUIDE.md#version-16-alpha) Switching between users via login() and logout() is unsafe. Please stick to single user testing. Is this related? If so, is this going to be fixed? IDBDatabase issues (false alarm!)NB: the mentioned errors Database REMOVE Error: DOMException: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing (see screenshot below) always only occur once after clearing the site's data, with or without refreshing the page. Probably caused (if possible) by open promises in the background? Duplicate user ID'sWhen testing I delete all OneSignal subscriptions/users from the Users dashboard. When running the same test, I encounter a 409: One or more Aliases claimed by another User error. Is it to be expected that a match is found with a deleted user? All help is appreciated, thank you so much! |
@lmeurs Thanks for all the details here! Quick update on the "Error Login: Error while identifying/upserting user: identifyUser failed: no identity found keeps occuring:" issue. We have reproduced the issue and are looking to ship a fix for this in the next beta. You should have to only call We will follow up on your other comments soon |
Hi @jkasten2, thank you for your reply. I am looking forward to receiving your reactions! Login issuesIn the meanwhile I tested the following:
The console shows the "no identity found" error and I continued testing from the console:
In the background multiple user and subscription API calls were done, which did contain the exepected external ID, but Only after reloading the page Device/browser data per subscriptionCurrently hardly any browser data is provided per subscription, only OS (Linux for Android) and the browser version. We would like to point our users at subscriptions at other devices/browsers, to clarify the way web push is device/browser depending. At https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js I saw some advanced device/browser sniffing being done, can the result in some form be shared per subscription? |
@jkasten2, @rgomezp: I have a new POC which I would like to share with you personally. In case of any interest, please contact me at lmeurs@gmail.com. |
@lmeurs Quick update, we have addressed some of the issue were you seeing in a v16.beta6 release today.
We will be addressing your other issues soon. |
Hi @jkasten2: we can confirm the no identity found issue no longer occurs. Thank you for fixing this! Unfortunately we ran into another issue: changing notification permissions on Chrome desktop from the Chrome UI (click the padlock icon in the address bar and alter permissions) does not always fire
NB: native notification permission change events (implemented like https://stackoverflow.com/a/59111264/328272) do get fired correctly. This beta version still is too buggy, progression is slower than expected (in March a stable version was expected withing weeks) and unfortunately you did not accept our invitiation to get in touch and look into these issues together. We really prefered OneSignal, but we are going to look into other notification providers with an advanced user model + API like PushPad, Notificare or WonderPush. |
@lmeurs Sorry for our delay here, some of the delay was due to getting more feedback. However we are now pushing through our finial testing and fixes to get this major release over the finish line. The v15 is currently the stable release and can be used today, however once v16 is released out of beta v15 won't get major feature updates. We encourage you to reach out to support@onesignal.com and / or though the chat bubble from the onesignal dashboard so we can to assist you directly and with faster responses. |
Great to see beta 7 (https://github.com/OneSignal/OneSignal-Website-SDK/releases/tag/160000.beta7) having been released in the meanwhile, which seems to fix one of our issues (have not tested this yet). Issue #1071 from 151604 seems similar to an issue we reported here (#980 (comment)), but this fix seems to not have made it to the beta. Do you think these issues are related? A new finding is that new notification subscriptions are created each time when granting permissions: when granting for the first time, but also each time when granting again after denying. I guess this was not the case one or two weeks ago. Not sure what actually wanted/expected behaviour is? |
Yes, we have a matching PR #1072 that will go out in beta8 soon.
Looking back at my testing results I do see this happening back on July 20th (which would be beta5), but it could have been happening longer. Its possible however conditions have changed where this is happening more often now, so thank you for bring it up! We will also see if we get a fix for this in the next beta. |
@lmeurs v16 beta8 is now available with a fix for the permission toggle issues you noted (both the stop firing issue and new subscriptions being created), as well as a number of other fixes.
|
v16 is now out of beta and has been released! See the full release notes: This means no breaking changes will be made in v16. If you find a bug or have a feature require please create a new issue. |
Is this already implemented? As I see in the web frontend SDK documentation it seems that a user could impersonate another and receive their notifications |
What's on your mind?
In this major version beta release for the OneSignal SDK, we are making a significant shift from a device-centered model to a user-centered model. A user-centered model allows for more powerful omni-channel integrations within the OneSignal platform.
For information please see the migration guide.
🚧 Beta 2 release. Please test thoroughly prior to production use. 🚧
Please post any feedback related to the beta under this issue.
The text was updated successfully, but these errors were encountered: