decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

SDK6: movePlayerTo sometimes not working #960

Open pravusjif opened 11 months ago

pravusjif commented 11 months ago

A creator reported this happening in their scene using SDK 6.12.0.

Their live scene is at 35, 80.

Error:

logger.ts:35 kernel:scene: [Building 2] Error: TypeError: Cannot read properties of null (reading 'movePlayerTo')
Error: TypeError: Cannot read properties of null (reading 'movePlayerTo')
at Object.error (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:1:403371)
at error (dcl://node_modules\decentraland-ecs\dist\src\index.js:175:15)
at EventManager.fireEvent (dcl://node_modules\decentraland-ecs\dist\src\index.js:312:23)
at eval (dcl://node_modules\decentraland-ecs\dist\src\index.js:2146:43)
at ip (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2060)
at async va (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:1761)
at async op (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2343)
at async Dy (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2977) {"message":"TypeError: Cannot read properties of null (reading 'movePlayerTo')","name":"Error","stack":"Error: TypeError: Cannot read properties of null (reading 'movePlayerTo')\n at Object.error (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:1:403371)\n at error (dcl://node_modules\\decentraland-ecs\\dist\\src\\index.js:175:15)\n at EventManager.fireEvent (dcl://node_modules\\decentraland-ecs\\dist\\src\\index.js:312:23)\n at eval (dcl://node_modules\\decentraland-ecs\\dist\\src\\index.js:2146:43)\n at ip (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2060)\n at async va (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:1761)\n at async op (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2343)\n at async Dy (blob:http://127.0.0.1:8000/3dc28237-ee76-42c7-9131-4d8ffe0e0ca2:2:2977)"}

Code they're using image (20)

pravusjif commented 11 months ago

I tested using movePlayerTo from scratch on a test scene and it worked fine, something else must be going on in their scene.

aminekha commented 1 month ago

When you have a timer or an interval it doesn't work.