playcanvas / playcanvas-sync

Real-time synchronization of files between PlayCanvas and your local machine
https://playcanvas.com/
MIT License
75 stars 19 forks source link

Cannot read properties of null (reading 'hash') #44

Open figo2264 opened 2 years ago

figo2264 commented 2 years ago

Following error occurs when I

When I restart pcwatch, it fails with the following message.

TypeError: Cannot read properties of null (reading 'hash') at Object.sameHashAsRemote (C:\Projects\playcanvas-sync\src\utils\common-utils.js:179:40) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ComputeDiffAll.handleFileOnBoth (C:\Projects\playcanvas-sync\src\sync-commands\compute-diff-all.js:97:24) at async Promise.all (index 14) at async ComputeDiffAll.handleAllFiles (C:\Projects\playcanvas-sync\src\sync-commands\compute-diff-all.js:83:5) at async ComputeDiffAll.run (C:\Projects\playcanvas-sync\src\sync-commands\compute-diff-all.js:40:5) at async Object.reportDiffAll (C:\Projects\playcanvas-sync\src\sync-commands\sync-utils.js:10:19) at async Object.errorIfDifferent (C:\Projects\playcanvas-sync\src\sync-commands\sync-utils.js:79:19) at async Object.wrapUserErrors (C:\Projects\playcanvas-sync\src\utils\common-utils.js:112:20) at async run (C:\Projects\playcanvas-sync\pcwatch.js:20:9)

and the target file is hanging in the editor. image

yaustar commented 2 years ago

I'm afraid I can't reproduce the issue with the steps provided. Does it only happen with this one file?

https://user-images.githubusercontent.com/16639049/179202791-00b09896-9f1b-407f-854a-2bf4dd5bdf6f.mp4

nikitaosyak commented 1 year ago

I run into this bug today. Seems to be connected to what is inside uploading files.

Project I have is pretty huge, and I can't determine what exact construct was producing this error. Removing generated bundles an regenerating them back fixed the issue.

If I ever run into it again on a smaller project, I'll try to investigate what causes this.