Project can't preview in r432 - possibly exclamation point related

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • 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

    My project was suddenly unable to be previewed after updating to the "Stable r432" version of Construct. I wanted to share the details of my problem and temporary solution in case it's useful to anyone else.

    Summary

    It looks like r432 may have a problem with the one symlink folder in my project.

    Every prior version of Construct I've used from r424.2 backwards has had no problem with this symlink folder.

    Project overview

    I have a fully script based project, with no event sheets.

    I edit the JS files in VSCode, and use Git to track changes.

    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 version r432.

    Last working state

    My project ran with no problems on the "Stable r424.2" version of Construct.

    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'"

    Things I initially tried that didn't work include, reloading Construct, clearing cache and cookies, and trying multiple browsers (Chrome, Brave, Firefox).

    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. I removed that file from the project, attempted to preview again, and the alphabetically next file inside "eggECS_4" showed up in that console error.

    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 and VSCode.

    Temporary Solution

    I was able to roll back to the r424.2 version of Construct, using the following link:

    editor.construct.net/r424-2

    And the project opens and previews perfectly again.

  • If you run in to a problem please file an issue following all the guidelines, as we need all that information to be able to help. Notably that includes a project file demonstrating the issue which this post doesn't appear to include, and without it there's little we can do.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey Ashley, will do. Sorry for the sparse details in my initial post. Since I got stuck on this for a while, I mostly just wanted to share my temporary workaround, while I tried to ferret out what was actually happening.

    I usually try to do some investigation before submitting an issue, in case I can find a simple way to reliably reproduce the problem.

    In this case, after testing a bunch of slight variations on a nearly empty project, I think I may have figured out what is going on.

    It's actually not symlink related. It's much simpler.

    The "Failed to start preview..." popup issue seems to occur under the following conditions:

    1. Within the "scripts" folder, if any JS file name includes an exclamation point "!", the game won't preview.

    2. Likewise, within the "scripts" folder, if any folder name includes an exclamation point "!", the game won't preview, but only if that folder is part of a path to at least one JS file.

    3. This only happens if the Monaco code editor is selected in Construct's settings. With the legacy code editor selected, the game will preview just fine regardless of exclamation points. It also doesn't matter if the Monaco code editor is ever used or opened in the Construct UI, it only matters that it is selected in Construct's settings.

    Anyway this is what was happening in my project, where I happened to have a notes file that started with a "!", and it was also a .js file, just so I could have syntax highlighting in it.

    By coincidence, this notes file happened to be in my only symlink folder. I ruled out the symlink being the problem while experimenting with the various near-empty projects I mentioned earlier.

    I switched to the legacy code editor and the project previews perfectly in the r432 version of Construct.

    Anyway, I'm working on putting together the info for the issue submission now.

  • Anyway this is what was happening in my project, where I happened to have a notes file that started with a "!"

    It's easy to test a script file with a "!" in the name in a new project, and it does indeed to cause an error. I filed this issue about that.

  • Hey Ashley, I just finished writing up all the stuff I was able to test or figure out about the issue. Hope it helps out. Since it looks like you've already got a handle on it, no worries if you want to close it. Just wanted to share my findings.

    github.com/Scirra/Construct-bugs/issues/8521

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)