Issue Title:
Unable to initialise webSDK to capture Selfie, "Something went wrong" or CORS error with access blocked message on browser console logs when initialising our webSDK .
Problem Statement:
If you're integrating our Web SDK, you might encounter an error when initialising the SDK from the browser, on network console you would see a CORS error. The error message will look like this:
Access to fetch at 'https://hypersnapweb.hyperverge.co/api/proxy/liveness' from origin 'https://www.abcd.com/' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Screenshot showing Frontend and Browser console errors;
Cause and Impact:
- This error occurs when your web domain URL is not whitelisted at our end.
If you are doing a fresh integration or adding our webSDK to a new website, example web domain URL is https://www.abcd.com, and it's not whitelisted by HyperVerge, the requests will be blocked with above error. - To ensure request traffic is only allowed through authorised websites/domains, we have introduced CORS policy.
- The impact of this issue will only be seen during fresh integration of our webSDK or when you are adding it to a new website/domain. This is a pre-production issue and should be caught during early integration/UAT/testing phase.
Resolution:
To fix this error and be able to initialise the webSDK from your website/domain, please get your domain URL whitelisted by HyperVerge.
Write to us at support@hyperverge.co with below details;
- Is this a fresh integration or addition of webSDK to new domain?
- Screenshot of the frontend error and browser console logs.
- Domain URL from where the request is being initiated.
HyperVerge team will review, whitelist your domain and confirm by responding over the same email. Post confirmation, your requests from the whitelisted domain should be successfully processed.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article