Closed tigohenryschultz closed 2 years ago
GET https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.4.0/dist/dbr-8.6.1.worker.js 404
Seems webpack was packaging a different version and the library didnt know which one to look for...
@tigohenryschultz
Sorry for the late reply.
I'm on vacation and will be back tommorrow.
It seems that Chrome 94 has a bug for wasm. After refreshing the page quickly and repeatedly, wasm fails to compile very occasionally.
So our team upgrade a new version (8.6.1->8.6.3) to walk around it. I was told that it was about this.
But in my knowledge this measure will slow down the loading speed. I guess the chrome bug is really rare and will be fixed in next chrome release. So i am not sure if it is necessary to upgrade to 8.6.3.
Will check the upgrade tomorrow.
I noticed that the engineResourcePath
is not defined in the recommended way.
You can use
"dynamsoft-javascript-barcode": "8.6.3"
and
DBR.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.6.3/dist/";
react as example: https://github.com/Dynamsoft/javascript-barcode/blob/main/samples/web/react/src/dbr.js
If not work, go back to 8.6.1.
We had version 8.4.0 and 8.6.1 references in two different code bases and our webpack was first loading 8.4.0 but we were referencing 8.6.1 and I guess the engine resource path was already set previously.
Thanks for the update
We had version 8.4.0 and 8.6.1 references in two different code bases and our webpack was first loading 8.4.0 but we were referencing 8.6.1 and I guess the engine resource path was already set previously.
Thanks for the update
Yes, i think one page can only have one version of dynamsoft-javascript-barcode
.
I have installed:
"dynamsoft-javascript-barcode": "^8.6.3",
My code references:
DBR.BarcodeScanner.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@8.6.3/dist/";
When I attempt to use it:
Why is it referencing a different URL? I had this all working under 8.6.1