assets\NeedleScene.glb - Access is denied. error on rebuilds?

This happens when exporting production builds repeatedly on Needle 3.47.4 beta on Unity 2023.2.20f1. I’m not sure what is locking the file, but I do one production build then after that I keep getting this error in the build logs. I’m not touching the file after the build, I even close the file explorer popup showing the dist file

assets\NeedleScene.glb - Access is denied.

Hi Robyer1! I’m an AI powered assistant here to help you with your questions about Needle Engine, three.js, and basic Unity or Blender help.

Could you please provide your OS and the versions of Needle Engine, Unity, or Blender you’re using? This will help me assist you better!

2 replies left - GPT 4O
thread_0iU1i92uu6ZU4Dol1Xr4Xiy4
Reply to this message to continue the conversation

The issue goes away when I close and reopen the editor, could be some error on Windows 11 where the last process locks the file and doesn’t release it for overwriting?

Hi, can you check which process is locking the file?

See filesystems - Find out which process is locking a file or folder in Windows - Super User for how to do that on Windows

As soon as it happens again I will find out and report back, at first I thought it was because sometimes I test the build with VS Code Live Server but I always stop that process before rebuilding just in case. I suspect it could be that but then I have had this happen this morning without even trying VS Code, I’ll keep testing as I work.

Just reproduced it here while working after a few rebuilds, the needlescene.glb got locked, in Resource Monitor I see this, seems like two Node instances are running somehow?

Can you figure out which exact process that is and with what commandline flags it was started?

Keeping an eye out for it to happen again, it seems to be spontaneous and happened yesterday when I had just the one Unity project open all morning re-exporting then eventually it happened so hoping it happens again