Open Zabi09 opened 4 years ago
Any update on this issue? @rgomezp @jasonpang
Howdy y'all, Thanks so much for your patience.
I dug into this and the issue seems to be around the helper-frame scope.
As you can see, the amp HTML shows the following in a test app I set up:
<amp-web-push id="amp-web-push" layout="nodisplay" helper-iframe-url="/wp-content/plugins/accelerated-mobile-pages/includes/onesignal-integration/amp-helper-frame.html?appId=a2bbb0ab-a15c-4c20-ba2d-dc06a6a6449b" permission-dialog-url="/wp-content/plugins/accelerated-mobile-pages/includes/onesignal-integration/amp-permission-dialog.html?appId=a2bbb0ab-a15c-4c20-ba2d-dc06a6a6449b" service-worker-url="/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php?appId=a2bbb0ab-a15c-4c20-ba2d-dc06a6a6449b" class="i-amphtml-element i-amphtml-layout-nodisplay i-amphtml-built" hidden="" i-amphtml-layout="nodisplay"> </amp-web-push>
You will notice that the helper frame is on a different path than the service worker. The problem is that the service worker scope needs to be at an equal or higher scope to include the helper frame path.
Please fix this issue in your plugin and I think we should see it working.
Edit: not only is the button not working, from what I can tell the subscription isn't working either. So the OneSignal integration is currently completely broken with your plugin. Are you seeing otherwise? (e.g: can you send a test message and receive it successfully?)
@Zabi09 , Please see my note above.
For HTTP integrations, it looks like our os.tc helper frame is outdated and needs to be fixed on our side. Thanks for your patience while we try to resolve.
Cheers
Hello Jason and Team,
I am one of the developers of the AMPforWP plugin and currently, some of our users saying that the one signal unsubscribe button is no more visible after clicking on the subscribe button. See this video - https://monosnap.com/direct/VKlLw5V40vY1QbwuJynXSNjYu6n6QY
And also when I check the same on cloudways its a valid issue - https://wordpress-123147-847862.cloudwaysapps.com/faq-test/amp/
I have debugged a lot and finally found that there is some problem in service-worker-url or in helper-iframe-url and if I remove the code of yours of amp-web-push and add this code which I copied from the AMP https://playground.amp.dev/ then it's working fine
This is the code which is not working
==========
This is the code which is working fine
==========
Will you please check once and let us know.