lukeed / pwa

(WIP) Universal PWA Builder
https://pwa.cafe
3.13k stars 100 forks source link

Handle LauncherError exception #72

Closed sapegin closed 4 years ago

sapegin commented 4 years ago

During pwa export:

[PWA] Started local server on http://localhost:49393
(node:26485) UnhandledPromiseRejectionWarning: Error
    at new LauncherError (/Users/artim.sapegin/_/coffeetimer/node_modules/chrome-launcher/dist/utils.js:35:22)
    at new ChromeNotInstalledError (/Users/artim.sapegin/_/coffeetimer/node_modules/chrome-launcher/dist/utils.js:66:9)
    at Launcher.<anonymous> (/Users/artim.sapegin/_/coffeetimer/node_modules/chrome-launcher/dist/chrome-launcher.js:145:27)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/artim.sapegin/_/coffeetimer/node_modules/chrome-launcher/dist/chrome-launcher.js:9:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:26485) 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(). (rejection id: 2)
(node:26485) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior

  1. Show a readable error message.
  2. Terminate the process.

P. S. Weird thing that I have Chrome installed ;-/

lukeed commented 4 years ago

Odd. Formatting error is easy but I'd wanna figure out how/why your Chrome isn't found.

Do you have it in a non-standard install location?

sapegin commented 4 years ago

No, pretty standard stable Chrome on macOS. At first glance, it should work, I'll need to debug chrome-launcher to understand what's wrong ;-/

sapegin commented 4 years ago

Maybe we need to update chrome-launcher:

448a1d48 chrome-finder: Add support for MacOS Catalina (#149)

https://github.com/GoogleChrome/chrome-launcher/blob/master/changelog.md#v0110-tue-jul-09-2019

sapegin commented 4 years ago

Seems to work! I'll open a pull request ;-)