Hello,
I am currently trying to use the vuforia spatial toolbox with the Philips Hue system. Sadly I am running into an error that leads to a shutdown of my edge server as soon as the image target of a lamp gets recongnized. My Edge Server is installed on a Raspberry Pi 4 OS Ubuntu Server 20.04 lts. I realy struggle to understand the Error message. I attach a screenshot of the whole message, so maybe someone can make sense out of it.
Hi @SidneyFielitz can you share some more console logs?
Shortly before this error message you should see the following message:
reality editor subscription for object: ...
Can you share the logs starting with this message and everything that follows until your error?
Hi thanks for replying. I will attach the console log. So far i was able to prevent the server from crashing by adding a Try Catch argument within the server.js. Now I dont get the console log exactly like above anymore. But i still get the error 'cannot read property ’ ’ of undifiened ’
Can you tell me the version of Socket.io that you are using? You can find that in the folder node_modules/socket.io/package.json “version”:
I am asking this question, because Toolbox is currently using Socket.io 2.2.0 and according to the socket.io documentation you would get exactly this error message with anything 3.x and 4.x.
It says 4.0.1. I do not know when i activly installed that. But when i get you right you say i should downgrade the version to 2.2.0 somehow?
A quick fix is,
- to make sure that the package.json file in the server folder is identical with the one from github: vuforia-spatial-edge-server/package.json at cbb0d29e4ca2334b8d22187b1501df71f993ec0b · ptcrealitylab/vuforia-spatial-edge-server · GitHub
- delete the node_modules folder and execute
npm install
within the terminal again.
This should make sure that you have all the right libraries installed.
I did. But when i look up the socket.io version it still says 4.0.1
You might want to execute via terminal
npm install socket.io@2.2.0
In your server folder.
I found it. Sorry for being a bit slow but linux and nodejs is quite new to me. I copied the package.json which you linked manualy to my spatial edge server. For some reason the version of socket.io within mine was 4.0.1. Then i removed the whole stuff and reinstalled. Now the correct version of socket.io is installed and i do not get the Error anymore. Thanks for helping out!
wonderful!