Troubleshooting
iFrame Usage
If the DeviceAssure library is embedded in a cross-origin iframe, the following attributes are required to suppress warnings in the console. The library will continue to work, the errors/warnings are non-blocking in the library.
allow="accelerometer; gyroscope;"
Warning Logs
[Violation] Permissions policy violation: accelerometer is not allowed in this document.
[Violation] Permissions policy violation: gyroscope is not allowed in this document.
Full Example
<iframe
id="deviceassure-iframe"
src="https://path-to-cross-origin-page>"
allow="accelerometer; gyroscope;"
>
</iframe>
Content Security Policy (CSP)
If your site uses a Content Security Policy, the DeviceAssure API URLs may need to be added to the connect-src directive:
Content-Security-Policy: connect-src 'self' https://api1.devicevalidation.io https://api2.devicevalidation.io https://api3.devicevalidation.io;
Note: If you are also using QR Code functionality, additional domains are required for
frame-srcandscript-src.
See Also
- Quick Start Guide - Getting started with DeviceAssure
- Configuration Options - Storage, caching, tags, and IMEI options
- Sample Application - Working examples included in the library package