Attempting to update NWJS has permanently broken playtesting even after reverting?

Hello,

I am running the latest MV through Steam on Windows 10. I was trying to tweak performance in my game so I attempted to follow the steps in this thread to update NWJS. The update broke playtesting - the executable would launch, but it wouldn't create a window. So I decided to revert to my backups.

Unfortunately, even after putting everything back, I still cannot playtest anything anymore. I've tried verifying, reinstalling, and rebooting, none of them worked. Even clean projects cannot launch a playtest anymore, which is concerning.

I made a clean test project in the folder
Code:
D:\dizzy\Documents\GameDev\TestProject\TestProject
and tried to open Index.html in Firefox, and I get this error:

1714498533786.png


The console is flooded with errors that read
Code:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/data/Actors.json. (Reason: CORS request not http).

There is also one big error at the bottom that reads

Code:
DataManager.checkError@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:172:15
DataManager.isDatabaseLoaded@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:97:10
Scene_Boot.prototype.isReady@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_scenes.js:374:28
SceneManager.updateScene@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:2018:48
SceneManager.updateMain@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:1983:18
SceneManager.update@file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:1907:14
rpg_managers.js:1949:17
    catchException file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:1949
    update file:///D:/dizzy/Documents/GameDev/TestProject/TestProject/js/rpg_managers.js:1910

If anyone could help me fix this it would be appreciated because the program is basically a brick now 🙁
Updating your NW.js shouldn't be difficult if you've followed KillerGin's video tutorial throughly, it is pretty simple.
That aside, you should launch your game only via the "Game.rpgproject" or "Game.exe" files.
Thanks for the reply. I can load the project through Game.rpgproject, but I can't run the playtest. I did a test deployment on the default project, but Game.exe does not run either. These are fresh unmodified projects.

This is after deleting RPG maker, rebooting, and reinstalling RPG maker. So the attempted upgrade is not present in the files anymore. It must have put some temporary files on my machine. I cleared the KADOKAWA and nwjs folders in %localappdata% as well as User Data/Web Data, but that did not fix the problem.

I also noticed that game.exe is really sticky in the task manager and won't quit out even after closing it. I need to go to the task manager to end it. I worry that I've permanently broken something
the error has nothing directly to do with nwjs - it tells you that it cannot load its actor database.

if you load the project into the editor, does the actor tab of the database exist and is it filled witth your data?

if yes, please go to your main project directory and xheck if there is a www folder. If yes, report back here to learn how to repair your project as the www folder is deployment only and can only be in your project if you made the mistake of deploying into your working directory.
Actor tab is there, with all data, and there is no WWW folder. I just created another completely fresh project, no edits at all, still on a grass field with the default party with Harold. I cannot begin a playtest in that project.
I cleared the KADOKAWA and nwjs folders in %localappdata% as well as User Data/Web Data
That should have generally reset everything. Did you do this while also doing other steps at the same time? If you've deleted those files, and then tried to run the game, that might have recreated them. If so, I'd suggest doing all those steps "at once": close the game and RPG Maker, uninstall RM, delete all those folders with temporary data, reboot, and only then reinstall.

Alternatively, check your if your antivirus might be interfering here.

Also, which nwjs version did you update to? Quick google seems to point to some weird CORS problems between versions 0.41 and 0.43 (though those should not persist if you revert anyway).
can you give us a screenshot of the console?
your text copy of it might have missed something important - happened before to other people.
That should have generally reset everything. Did you do this while also doing other steps at the same time? If you've deleted those files, and then tried to run the game, that might have recreated them. If so, I'd suggest doing all those steps "at once": close the game and RPG Maker, uninstall RM, delete all those folders with temporary data, reboot, and only then reinstall.

Alternatively, check your if your antivirus might be interfering here.

Also, which nwjs version did you update to? Quick google seems to point to some weird CORS problems between versions 0.41 and 0.43 (though those should not persist if you revert anyway).
Just tried doing steps all at once (uninstall, clear temp, reboot, reinstall). No dice. I'm not running any antivirus programs, and Windows Defender does not appear to be on either.

I tried to update to latest stable nwjs (0.87.0) but opted to revert back to stock.
can you give us a screenshot of the console?
your text copy of it might have missed something important - happened before to other people.
Sure, I just made another totally fresh project and tried to run it. Here's the console:

(For context: this is when trying to open index.html in a browser, I cannot run the game at all in playtest mode. A process starts but it does not open a window.)

1714507735141.png
For context: this is when trying to open index.html in a browser, I cannot run the game at all in playtest mode. A process starts but it does not open a window
Ah, right, I didn't catch that earlier. Unfortunately those errors are not really useful here, since they'd happen if you tried to just run index.html in a browser either way, working nwjs or not. When ran through nwjs RM games have a lot of privileges that websites don't get (like reading local files), so running them with a regular browser will always produce this behaviour.

I'm a bit stumped as to how can nwjs/RM still somehow keep this corrupted state, you seem to be doing everything you should be doing. It might be worth looking through some other threads on the forum related to nwjs troubles (the keywords "profile error" should help you find some of those too).
I went digging through the rest of the forum but the most I could find was this thread which has the same problem but did not come to a conclusion. The thread recommended manually copying nwjs into the project and running Game.exe directly. I tried that on a clean project, but it didn't work.

Whenever I attempt to run a playtest, a process begins and tries to do... something, but it's unresponsive and has no window associated with it. So I can't access the console to see what it's trying to do and getting stuck on.

The most I have gathered is that a playtest opens and attempts to use nwjs (as evidenced by several files being edit-locked by that process) but does not get any farther than that. Closing RPG maker also does not terminate the playtest process, I have to open up task manager and force quit every instance of game.exe, so it is definitely stuck on something.

I also inspected nwjs-win-test, and there's a bunch of weird files in it. Specifically, these ones, which were not there beforehand:

1714520050063.png


Removing these files did not fix the problem. Still hangs. I opened up the .log file and it's just this:

1714520149559.png


I honestly have no idea what those files are or if they're even relevant, but it's weird that they're showing up since they're not part of nwjs as far as I know.

At this point I'm basically out of ideas, unless there is some other little-known file that got infected by the wrong version one time or something and now refuses to launch.
It might be that some of those files are automatically updating the nwjs.

I suggest the following as a test - it might be a long shot but at the moment everyone is guessing:

1) deinstall the maker again.
2) delete the program folder where the maker was installed, to make sure there are no files remaining there
3) if you're usng the steam version, go to steam support, search for "download cache" and hit the button to clear that cache
4) restart the computer
5) reinstall the maker
6) make a new project
7) try to playtest that

are you using the steam or the standalone version?
Thanks a lot for your response. This step was the ticket:

> 2) delete the program folder where the maker was installed, to make sure there are no files remaining there

I went to look and what did I see but the RPG Maker MV folder still there... and lo and behold nwjs 0.87 cached inside it. It must not uninstall nwjs when the program is uninstalled using the Steam interface (I am using Steam). What it seems like is that the bad version was in appdata, restoring the backup was overwritten by the version in appdata, and then the version in appdata was overwritten by the bad backup! I deleted them and - it WORKS!

So for any future readers the solution to fixing the corrupt nwjs install on Windows is to:
- Uninstall MV
- Go to where MV was installed and delete the RPG Maker MV folder (it's usually something like C:/Program Files (x86)/Steam/steamapps/common, but for me it was D:/dizzy/AltSteamLibrary/steamapps/common since I keep tools on the D drive, check wherever it is for you)
- Go to AppData/Local (type %localappdata% into the search bar) and delete the KADOKAWA folder, the nwjs folder, and if you have launched your deployed game, delete the folder in local appdata with your game's title
- Still in local appdata, go to AppData/Local/User Data/Default and delete the two files Web Data and Web Data-journal
- Reinstall MV and verify the local files

Thanks everyone for your help, I was tearing my hair out over this! What a confusing problem...
For the record,
Iirc, KillerGin's tutorial implies that you can pick any version of NWJS, but I'm truth that is I'll advised. He says he uses 49.1 (iirc), use that exact version. Newer versions will break things (as you have discovered). I think after 50 a lot of compatibility breaks.
Follow exactly the steps KillerGin says and it should be fine.

Edit:
Fixed my phone's auto correct.
It must not uninstall nwjs when the program is uninstalled
any uninstalled will always only delete files it was told to uninstall from its corresponding installer.
and files manually added afterwards cannot be deleted by it.

sometimes that is an inconvenience (like in your case), but most times its better that way for both security and shared file reasons.
(if two or more programs use the same additional library (like DirectX) and one of them deletes those files on uninstalling, all other programs requiring it would fail).
This thread is being closed due to being reported as solved. If you need it reopened, let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/attempting-to-update-nwjs-has-permanently-broken-playtesting-even-after-reverting.168207/