launcher
launcher copied to clipboard
[BUG] Browser Mode extension is broken on MacOS
Describe the bug
Games that use :browser-mode:
fail to launch on MacOS. When clicking the Play button, nothing happens. One of the games affected is Mini Metro: London.
Expected behavior These games should launch in a separate launcher window (Browser Mode).
Desktop (please complete the following information):
- OS: MacOS Catalina (10.15)
- Flashpoint Version: 10.1 Infinity
- Log text:
INFO [21:13:44] Mini Metro: London: Mini Metro: London failed to start - spawn "/Users/nosamu/Flashpoint/Flashpoint 10.1 Infinity - Modded/Launcher/Flashpoint.app/Contents/Frameworks/Flashpoint Helper.app/Contents/MacOS/Flashpoint Helper" ENOENT
Additional context I have verified that the Flashpoint Helper path actually exists, despite the launcher's ENOENT message.
Can you make sure this happens on the latest version
I've hunted it down: quotes are added to the filename regardless of execFile
on Mac and Linux.
https://github.com/FlashpointProject/launcher/blob/6d2bfc469253c998e9da9a73df486702a7785d94/src/back/responses.ts#L1354-L1364
I'll be changing execFile(file, args)
to spawn(file, args, {'shell':false})
in an upcoming PR. I'll fix this in that too.
Unfortunately, Browser Mode still seems to be broken. Here are the errors I receive now:
INFO [15:23:44] (node:22878) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'preferences.json'
INFO [15:23:44] at Object.openSync (node:fs:585:3)
INFO [15:23:44] at Object.func [as openSync] (node:electron/js2c/asar_bundle:5:1812)
INFO [15:23:44] at Object.readFileSync (node:fs:453:35)
INFO [15:23:44] at e.readFileSync (node:electron/js2c/asar_bundle:5:9160)
INFO [15:23:44] at readJsonFileSync (/Applications/Flashpoint/Flashpoint.app/Contents/Resources/app.asar/build/shared/Util.js:32:26)
INFO [15:23:44] at Object.readOrCreateFileSync (/Applications/Flashpoint/Flashpoint.app/Contents/Resources/app.asar/build/shared/preferences/PreferencesFile.js:20:50)
INFO [15:23:44] at startup (/Applications/Flashpoint/Flashpoint.app/Contents/Resources/app.asar/build/main/BrowserMode.js:32:57)
INFO [15:23:44] at startBrowserMode (/Applications/Flashpoint/Flashpoint.app/Contents/Resources/app.asar/build/main/BrowserMode.js:22:11)
INFO [15:23:44] at Object.<anonymous> (/Applications/Flashpoint/Flashpoint.app/Contents/Resources/app.asar/build/main/index.js:14:40)
INFO [15:23:44] at Module._compile (node:internal/modules/cjs/loader:1118:14)
INFO [15:23:44] (Use `Flashpoint Helper --trace-warnings ...` to show where the warning was created)
INFO [15:23:44] (node:22878) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
INFO [15:23:45] [0817/152345.035417:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app