edit
After experimenting with a simple test project for a while, it seems that the issue I encountered was due to an exclamation point "!" in a script file name.
It seems that if JS script files, or folders containing JS script files, have a name that includes an exclamation point "!", and the Monaco code editor is selected in Construct's settings, then the "Failed to start preview... " popup appears, and the project won't preview.
In my original post, I suspected this issue was related to a symlink folder, but that folder happened to contain a file with an exclamation point "!". From additional testing I've done it looks like symlinks are unrelated to the problem I was experiencing.
Ultimately I just switched to the legacy code editor in Construct's settings, and the project now previews just fine in Construct r432.
original post
Hey max fang, and BigBuckBunny, I just encountered something similar. I'm still investigating, but I wanted to leave my symptoms and solution, so far, in case it happens to be useful to you, or anyone else that happens by.
Project overview
I have a fully script based project, with no event sheets.
C3 provides a "Scripts" folder, which is the default place for your JavaScript files.
I have several sub-folders inside that "Scripts" folder.
One of these folders "eggECS_4", is a symbolic link instead of a conventional folder.
Symbolic link folders have never caused me any issues in prior versions of Construct, but it might be involved with my sudden inability to preview in Construct 3 version r432.
Last working state
My project ran with no problems on the "Stable r424.2" version of Construct 3.
Problem
Immediately after updating to the newest "Stable r432" version, my project could no longer be previewed at all.
On r432, when attempting to preview I would get the following:
- A popup saying:
"Failed to start preview. Try reloading Construct before trying again."
- And this console error:
"Error starting preview: Error: Could not find source file: 'file:///scripts/project/eggECS_4/!Notes/!Unsorted_Notes.js'"
Cause?
I can't be 100% sure, but what stands out to me about that console error, is that the file it's saying it can't find is the alphabetically first file inside the "eggECS_4" folder, which is the only symbolic link folder in the project.
Again, I've been previewing and working on this project for quite a while with no issues, in "Stable r424.2" and earlier, with the symbolic link folder behaving as expected within both Construct 3 and VSCode.
Solution
I was able to roll back to the r424.2 version of Construct 3, using the following link:
editor.construct.net/r424-2
And the project opens and previews perfectly again.