Skip to main content

Troubleshooting

Validation and error states

When the iframe loads, it validates the token and origin against the Heuristik API:

Error codes

HTTP CodeConstantMeaning
401UNAUTHORIZED_CODEToken is invalid or region is not the one associated
403Origin does not match the registered URL
409CONFLICT_CODEToken is already associated with an active session
421MISDIRECTED_CODERequest was directed to the wrong server
424FAILED_DEPENDENCY_CODEA required upstream service is unavailable

When validation fails, the iframe displays the NotAllowedIframeModal with an error message. No postMessage is sent to the parent.

Common issues

SymptomCauseResolution
Iframe shows error modal immediatelyInvalid tokenIframe and/or regionCodeContact your Heuristik representative to verify the token and region code
Iframe shows error modal on valid tokenOrigin mismatch — your URL doesn't match the registered URLVerify with your Heuristik representative that the allowed URL matches your domain exactly
Cookie warning appearsThird-party cookies are blockedEnable cookies for iframe.heuristik.com in browser settings
Local networks permission warning appearsThe 'Apps on Device' permission is not accepted or is not being delegated to the iframeCheck in your browser settings that your website has permission enabled for 'Applications on device' and that this permission is being delegated when loading the iframe using allow="local-network-access"
Local networks permission warning appears (II)The iframe is loading on an http website and the browser blocks the connection due to mixed contentGenerate and configure a security certificate to be able to load your website with the https protocol and avoid communication due to mixed content
Copy buttons do not workThe 'Clipboard' permission is not accepted or is not being delegated to the iframeCheck in your browser settings that your website has 'Clipboard' permission enabled and that this permission is being delegated when loading the iframe using allow="clipboard-write"
Scanner not detectedLocal driver not runningStart the local driver service on the workstation
Scanner not detected (driver running)WebSocket connection blockedEnsure ws://127.0.0.1:2794 is not blocked by firewall or proxy
No postMessage receivedOrigin validation in listener is wrongVerify you check against https://iframe.heuristik.com
409 Conflict errorToken already in use by another sessionWait for the active session to end, or contact your Heuristik representative to release the token