Error during the initialization of the SDK! DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope'

118 Views Asked by At

First of all, my project uses node 14.17.0. I'm using BlinkID in browser SDK version 5.14.0. I get the following error:

Error during the initialization of the SDK! DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://yourdomain.test/advanced/BlinkIDWasmSDK.js' failed to load.

I'm using the same as the docs

import * as BlinkIDSDK from "@microblink/blinkid-in-browser-sdk";

mounted(){
  this.initializeBlinkIDSdk()
}
methods(){
  initializeBlinkIDSdk(){
     if ( BlinkIDSDK.isBrowserSupported() )
        {
            const loadSettings = new BlinkIDSDK.WasmSDKLoadSettings( "your-base64-license-key" );

            BlinkIDSDK.loadWasmModule( loadSettings ).then
            (
                ( wasmSDK) =>
                {
                    // The SDK was initialized successfully, save the wasmSDK for future use
                },
                ( error ) =>
                {
                    // Error happened during the initialization of the SDK
                    console.log( "Error during the initialization of the SDK!", error );
                }
            )
        }
        else
        {
            console.log( "This browser is not supported by the SDK!" );
        }

  }
}
0

There are 0 best solutions below