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

Failures and delays on Apple endpoints #45

Open
121593 opened this issue Nov 15, 2023 · 1 comment
Open

Failures and delays on Apple endpoints #45

121593 opened this issue Nov 15, 2023 · 1 comment

Comments

@121593
Copy link
Contributor

121593 commented Nov 15, 2023

I observed the process hanging on for a very long time on several occasion, that I believe were related with pushing to https://web.push.apple.com/....

With debug turned on I could not reproduce the delayed response, but I noticed 403 Forbidden responses from Apple.

Is the bundle known to work with Apple ?

And to prevent hanging response, what about adding a timeout in sendAsync options at src/Sender/PushMessageSender.phpL93 ?

@121593
Copy link
Contributor Author

121593 commented May 24, 2024

I found the issue :

Apple has exigences on the sub claim of the JWToken.

In src/DependencyInjection/WebPushExtension.php the subject is defined this way :

$container->setParameter('bentools_webpush.vapid_subject', $config['settings']['subject'] ?? $container->getParameter('router.request_context.host'));

But in my context (CLI consumer execution, no request), there is no request and the fallback was not working.
Explicitly setting the subject in the config did the trick.

It could be worth trying to find a more robust fallback, or at least adding a mention in the docs.

121593 pushed a commit to 121593/webpush-bundle that referenced this issue May 24, 2024
bpolaszek pushed a commit that referenced this issue May 24, 2024
Co-authored-by: 121593 <5079173-121593@users.noreply.gitlab.com>
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

1 participant