You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to setup OneSignal Web Push notification for AMP site using official AMP plugin. It seems like AMP support #276 not added to v3 version so I have referred that PR and AMP Web Push Setup to integrate web push to AMP site. But I'm getting The API call is missing an app ID JS error in browser console.
OneSignalApiBase.js:27Uncaught(inpromise)ve: TheAPIcallismissinganappID.atSe.call(https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:54111)atSe.get(https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:53824)athttps://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:59606atGenerator.next(<anonymous>)
at https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:7895
at new Promise (<anonymous>)
at e (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:7640)
at downloadServerAppConfig (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:59537)
at At.<anonymous> (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js:1:122394)
at Generator.next (<anonymous>)
I have tried to debug, and the following is my finding. I'm not sure if these findings are accurate.
When I try to subscribe, Se.get('sync/${t}/web', null) code execute and requestHasAppId() function called to check if request has App ID but that function look for URL start with apps/ to get App ID but executed URL is start with sync/ so The API call is missing an app ID error happening.
1. Integrate OneSignal Web Push to AMP by following #276 PR or [AMP Web Push Setup](https://documentation.onesignal.com/docs/amp-web-push-setup) documentation.
2. Try to subscribe and you can see JS error in browser console.
What did you expect to happen?
I expected to subscribe to web push notification on AMP site.
Relevant log output
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
chandrapatel
changed the title
[Bug]: AMP - The API call is missing an app ID JS error
[Bug]: [AMP] JS Error: The API call is missing an app ID
Feb 14, 2025
Hi @chandrapatel, we just published a new version of the web SDK that should address this issue. Please try again and see if the same error persists. Thank you!
What happened?
I am trying to setup OneSignal Web Push notification for AMP site using official AMP plugin. It seems like AMP support #276 not added to v3 version so I have referred that PR and AMP Web Push Setup to integrate web push to AMP site. But I'm getting
The API call is missing an app ID
JS error in browser console.I have tried to debug, and the following is my finding. I'm not sure if these findings are accurate.
When I try to subscribe,
Se.get('sync/${t}/web', null)
code execute andrequestHasAppId()
function called to check if request has App ID but that function look for URL start withapps/
to get App ID but executed URL is start withsync/
soThe API call is missing an app ID
error happening.Wordpress version
6.7.1
OneSignal Plugin version
3.1.0
Steps to reproduce?
What did you expect to happen?
I expected to subscribe to web push notification on AMP site.
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: