Troubleshooting
Common integration issues and how to resolve them.
Blank or missing UI
- Confirm the script loads (Network tab → 200, not blocked by CSP).
- In Elements, verify
<glamar-captureiq>has a shadow root with content. - Listen for
errorandlicenseErrorto surface failures.
License errors (licenseError)
- Ensure
api-keyis set and non-empty. - Keys are typically shaped like
test_…orlive_…. - If you use
config.license.validateUrl, the endpoint must be reachable and return JSON such as{ "valid": true }or{ "valid": false, "code": "...", "message": "..." }.
el.addEventListener("licenseError", (event) => {
console.error("Capture IQ license error", event.detail.error);
});
Config parse or validation errors
- Validate JSON:
JSON.parsetheconfigstring in the console. - Listen for
configErrorfor semantic issues (thresholds outside 0–1, invalidflow.steps).
el.addEventListener("configError", (event) => {
console.error("Invalid config", event.detail.errors);
});
Camera permission denied or no preview
- Serve over HTTPS (or
localhostfor dev)—notfile://for camera in most browsers. - Listen to
permissionandcameraError. - Ask the user to re-enable camera in browser or OS settings and reload.
el.addEventListener("permission", (event) => {
console.log("Permission", event.detail);
});
el.addEventListener("cameraError", (event) => {
console.error("Camera error", event.detail.error);
});
Auto-capture never fires
- Confirm
config.capture.autoCapture(or preset default) is appropriate. - Relax
config.qualitythresholds if they are too strict. - Inspect
captureAttempt(reason:cooldown,maxAttempts, etc.) andframeQualityfor live scores.
el.addEventListener("captureAttempt", (event) => {
console.log("Attempt", event.detail);
});
Unexpected image size or format
- Check
config.output:maxWidth/maxHeightdownscale the image;mimeTypemust be encoder-supported;formatcontrols blob vs data URL vs both.
Slow performance
- Reduce output resolution in
output. - Lower
capture.maxAttemptsin difficult environments. - Avoid heavy work in
frameQualityhandlers.
Styling
The UI lives in Shadow DOM—global CSS does not style inner nodes. Use theme and documented config; deep theming may require product-specific guidance.
Debug mode
<glamar-captureiq api-key="YOUR_KEY" preset="face" debug="true"></glamar-captureiq>
Enables extra logging where supported.