webarkit / ARnft

A small javascript library for WebAR with NFT
GNU Lesser General Public License v3.0
219 stars 53 forks source link

new error from worker showing up #227

Closed albjeremias closed 2 years ago

albjeremias commented 2 years ago

I am almost sure this exception comes from the imageData not being ready, or the nfts not being loaded?! -> https://github.com/webarkit/ARnft/blob/master/src/NFTWorker.ts#L106

Uncaught DOMException: Worker.postMessage: attempting to access detached ArrayBuffer ARnft.js:1
    process ARnft.js:1
    _update ARnft.js:1
    forEach self-hosted:205
    _update ARnft.js:1
    C ARnft.js:1
    (Async: FrameRequestCallback)
    C ARnft.js:1
    (Async: FrameRequestCallback)
kalwalt commented 2 years ago

I am almost sure this exception comes from the imageData not being ready, or the nfts not being loaded?! -> https://github.com/webarkit/ARnft/blob/master/src/NFTWorker.ts#L106

Uncaught DOMException: Worker.postMessage: attempting to access detached ArrayBuffer ARnft.js:1
    process ARnft.js:1
    _update ARnft.js:1
    forEach self-hosted:205
    _update ARnft.js:1
    C ARnft.js:1
    (Async: FrameRequestCallback)
    C ARnft.js:1
    (Async: FrameRequestCallback)

I think from not ready imageData, you receive a different message if the nft marker isn't loaded you should get an error from this line https://github.com/webarkit/ARnft/blob/14d6a7adfad514abbbf139966d04e34d6295bbd6/src/Worker.ts#L105