Closed positlabs closed 1 year ago
Can confirm this is happening. It seems to never appear when using certain markers, but always (or almost always) when using others. However when generating .mind again (using the same image that apparently works) also produces erroneous .mind. If the problem is even there, that is.
Upon further investigation this turned out to be a simple case of missing files, the path to the .mind 'imageTargetSrc' file was wrong.
Create-react-app (or webpack) can't know .mind files should be copied to a folder that will be served publicly, unless you specifically configure them to do so.
The error itself sounds strange and/or misleading but, in my case at least, was resolved.
I suggest you copy your targets file (e.g. 'targets.mind') to your build folder (public, dist, or whatever the final destination of your app is called), then set:
<a-scene mindar-image="imageTargetSrc: ./targets.mind;" >
Oh, that sort of makes sense because in that case, my server would have been returning an html 404 page and not a response with an error code.
I tested and confirmed this is the issue. Thanks for your insights @divljikunic!
@hiukim Do you think it would make sense to catch this error and emit something more descriptive?
I've encountered this in my project. I moved my files to public folder and it works. Thanks.
I have been getting this error intermittently while trying to load my image targets.
RangeError: Extra 5000 byte(s) found at buffer
I took some random screenshots... terrible targets, but you can use these to reproduce the bug.
Do the target images need to be a specific size? I tried 1024 square but it gave me the same error.