-
Notifications
You must be signed in to change notification settings - Fork 34
Issue Loading blinkid-in-browser SDK #155
Description
Hello,
First of all, I would like to thank the Microblink team for their great work. I am reaching out because I am experiencing an issue when loading the blinkid-in-browser SDK.
Issue Description
The problem occurs when trying to load the SDK. Below are the steps I followed for the configuration:
- Installed Microblink SDK via npm(version 6.13.0) and copied the resources folder to my public assets directory, located at priv/static and publicly accessible via:
/services/static/resources - Specified the UI module path in the HTML headers:
<script type="module" src="https://cdn.jsdelivr.net/npm/@microblink/blinkid-in-browser-sdk@v6.13.0/ui/dist/blinkid-in-browser/blinkid-in-browser.esm.js"></script> - Added the blinkid-in-browser component to the HTML page, specifying the Recognizer and license key:
<blinkid-in-browser
license-key={System.get_env("MICROBLINK_LICENSE_KEY")}
recognizers="BlinkIdMultiSideRecognizer">
</blinkid-in-browser>
- In a JavaScript script that runs when the component loads, I set the engine and worker paths according to my static route:
const blinkId = document.querySelector("blinkid-in-browser");
blinkId.engineLocation = "/services/static/resources";
blinkId.workerLocation = "/services/static/resources/BlinkIDWasmSDK.worker.min.js";
Issue Encountered
When I load the page, I get the following error message in the JS console, coming from p-e970386f.entry.js:
Failed to load resource: the server responded with a 404 error - BlinkIDWasmSDK.worker.min.js not found at resources/BlinkIDWasmSDK.worker.min.js
However, as mentioned above, I explicitly set workerLocation to: /services/static/resources/BlinkIDWasmSDK.worker.min.js
Could you please help me resolve this issue?
Thank you in advance for your time and assistance!
Best regards, Julio