Needle web broken on Windows if installed in custom map drive letter

Hello everyone,
Since the beginning of using Needle (yesterday) I’ve been stuck at the web player being broken because of a script error : this.compInstance is undefined (Firefox) or Cannot read property 'pluginList' of undefined (Chrome), which makes the page only show a black background. Happening with the default CollaborativeSandbox scene.

After investigation, I found out that this happens because I’ve made it into P:/code/needle-test instead of C:/syncbox/pro/code/needle-test. If I open the Unity project on P:, the web export is broken - not on C:.

More precisely on my laptop I only have one partition, but I still wanted to have specific letters (P for Pro, M for Media, L for Local, etc.) so I have set custom drive letters to directories (using the Register or simply subst command).
The weird part is that I’ve never had any issues before, including other NPM or Unity projects, as this should be totally transparent to the system and apps.

I didn’t create an issue on Github as this is pretty specific. But I still wanted to let you know as this isn’t normal.
To redo this problem, just map a directory containing a Unity/Needle project to a drive letter, and open the project on that new path and try to play it on the web browser. P.S.: Add the ?console flag to the url to get the JS error.

Thanks in advance for the help, even if it’s easy to workaround, it’d be great to understand why this happens and to be fixed. :blush:

Original Post on Discord

by user 615280976855171083

Hello, thanks for the report, can you send the full error stack you get in chrome and firefox?

Do you get any errors in Unity when you export from P ?

No error on Unity, neither the webserver. Only on the web browser. I’ll send you the report in a minute !

by user 615280976855171083

Thank you!

by user 615280976855171083

does it also happen without the console flag? Whats the stacktrace then?

On Firefox the issue the exactly the same, just the message is different. And without the console flag still black screen but no error on the console.

by user 615280976855171083

And the stacktrace is on the screenshot, but as you can see it’s traced on the minified version. Maybe a source map is missing.

by user 615280976855171083

Hm, this shouldn’t be related to the drive letters… I have like ~10 partitions and it’s not an issue

@totjoss would you mind checking what disk format you’re using on P:? I believe we’ve seen issues before with symlinks not working in npm on some disk formats. Also which node + npm versions do you have installed?

It’s not a partition, it’s a virtual letter linking to a directory. :wink: Using the subst command (or Register) as mentionned in the first post.

by user 615280976855171083

So it’s an NTFS format (for the whole disk/partition), and Node.js is 16.15.0, NPM is 8.5.5.

by user 615280976855171083

Oh, ok. I’m honestly not familiar with that command. Will have to read about it.

It’s very simple (and goes away after reboot if not in Registry) : subst z: c:\path\to\dir
More info here: subst | Microsoft Learn

by user 615280976855171083

Yes, I found it, but had no idea this existed before :slightly_smiling_face:

I love it, ah ah. No need to partition anything in advance, so every “drives” (as letter shortcuts) has the full disk’s space.

by user 615280976855171083

by user 615280976855171083