braze-inc / braze-web-sdk

Public repo for the Braze Web SDK
https://www.braze.com
Other
73 stars 26 forks source link

Push giving me a 410 error #32

Closed naissa12 closed 6 years ago

naissa12 commented 6 years ago

When I send a push for spark.adobe.com, I get a 410error from google the second time. Can someone check our server configuration to make sure I’ve set it up right?

naissa12 commented 6 years ago

This is sending push to a chore browser

naissa12 commented 6 years ago

Chrome

froodian commented 6 years ago

Hi @naissa12, thanks for reaching out.

A very common reason that we see repeated 410 errors in web push is because there is a bug in Mac Chrome where if a user has disabled Chrome's notifications at the OS level in System Preferences, the browser will continually provide us with new push subscriptions as if permission has been granted, but those subscriptions will then bounce with a 410. When we get the bounce, we remove the user's subscription from our system, but then the browser provides a new subscription, we store it again, and the cycle repeats.

We've considered various workarounds on our end to prevent this situation, like blacklisting new push subscriptions for users who have received multiple 410s; the downside would be that if the user reenables Chrome's notification permissions in the future, we wouldn't ever register them for push again, even though they've indicated their desire to receive push again. Unfortunately, I think the only satisfactory solution to this problem will be to lean on Chrome to fix this issue: to detect whether they've been denied permission to display notifications at the OS level, and to treat that similarly to situations where the user has denied permission from within the browser.

I suspect that this bug is probably the issue at play here, but please let me know if that doesn't appear to be the case on your end and we can dig into it further.

naissa12 commented 6 years ago

"Unfortunately, I think the only satisfactory solution to this problem will be to lean on Chrome to fix this issue: to detect whether they've been denied permission to display notifications at the OS level, and to treat that similarly to situations where the user has denied permission from within the browser."

How do I accomplish that using the Braze SDK functions?

froodian commented 6 years ago

We can't accomplish that alone unfortunately - only the Chrome developers can accomplish that, if they fix https://bugs.chromium.org/p/chromium/issues/detail?id=762546

naissa12 commented 6 years ago

I don't think that is the issue on my end. Can you please check? Can you check my server configuration to make sure it's good. Also, what other issues affect the deliverability of web push?

naissa12 commented 6 years ago

also, what's the percentage of users (ballpark) with this issue you mentioned above

froodian commented 6 years ago

I can successfully send push through the Braze dashboard to the user that's created when I log into https://spark.adobe.com from Chrome, and I receive it, so it looks like your configuration is all correct for your production app on the server (if you're testing with a beta/test/QA instance of the spark site, configuration could still be wrong for that QA instance).

To verify whether your specific user is in this state, you can check this permission setting - in order for a user to receive push, there needs to be a row for "Google Chrome" which has "Banners" selected as shown (make sure you're looking at the row for the right version of Chrome too, if you use Canary builds or Chromium):

image

The percentage of users in this state will change over time and across userbases depending on how many users disable push at the OS level - it looks like on some of your ongoing web push campaigns you're seeing a sustained bounce rate of about 4%, I'd estimate that around half of that 4% is from users in this state but it's hard to be sure.

Please note also that the entire situation I'm describing is only when a single user is receiving 410 repeatedly - if a given user has only received "410: Unregistered" once, and their user profile says "Push Registered For No Apps" in their Engagement section, that's a normal unsubscribe, and the user merely removed permission for spark.adobe.com to send them push.

froodian commented 6 years ago

Since this is now delving into the realm of debugging your specific campaigns on the Braze Dashboard, I'm going to close this issue and direct you to support@braze.com where we can discuss your specific setup in a more private, secure setting. Thanks for your understanding.