perfecty-push-wp
perfecty-push-wp copied to clipboard
Browser is not supported or the SDK is not enabled
installed 3 times in a row and the same message is shown in browser: Browser is not supported or the SDK is not enabled settings are plugins default. browser chrome, edge, firefox.. same error "/perfectly/push" is not created and i dont know if its suppose to i have Vapid private and public keys in form. please.. what i dont do or what is the problem?
Hi @themsk666 did you enable the Public Widget in https://docs.perfecty.org/wp/configuration/#1-public-widget ?
Hi @rwngallego, of course i have enabled. I dont know what else cand i do. Thank for you reply.
Our check function looks like this:
const start = async (customOptions = {}) => {
...
if (!isSupportedAndEnabled()) {
Logger.info('Browser is not supported or the SDK is not enabled')
return false
}
const isSupportedAndEnabled = () => {
return (Features.isSupported() && Options.enabled)
}
const isSupported = () => {
return ('PushManager' in window) && ('serviceWorker' in window.navigator)
}
...
}
so if ('PushManager' in window) && ('serviceWorker' in window.navigator) returns true in your Chrome developer console, then there's no other reason why we log that message.
the function that return the error looks different on my sdk.min.js..
case 0: if (t = r.length > 0 && void 0 !== r[0] ? r[0] : {}, E.init(t), m({ verbose: E.loggerVerbose, level: E.loggerLevel }), x("Starting Perfecty Push SDK"), w("SDK options", E), te()) { e.next = 8; break } return x("Browser is not supported or the SDK is not enabled"), e.abrupt("return", !1);
anyway.. i cant make it work.. :(
Hi @themsk666 it's the same code, except you're looking at the raw JS vanilla/optimized output, while I was sharing the ES6 equivalent