TypeError: Cannot read properties of undefined (reading 'stopProcessVideo') when running nextjs
I am trying to run mindar on nextjs 14, but I have not been succesful. Whetever I use AFrame or Three, I get this error:
What could it be? Thanks
i have exactly the same issue - i'll put something on the mind-ar repo and link to this too, but did you solve this
fixed this here: https://github.com/hiukim/mind-ar-js/issues/549#issuecomment-2414458455
The issue is that strictMode mounts, unmounts then remounts the component. The stop function gets run in that process. I think this points to more checking needed within the stop function perhaps to account for the video not being started yet. I don't think react strict mode should really cause this error, but it is.
One solution would be to turn off strict mode, i wouldn't, the above link uses state to do an additional check