shd101wyy / vscode-markdown-preview-enhanced

One of the "BEST" markdown preview extensions for Visual Studio Code
https://shd101wyy.github.io/markdown-preview-enhanced
Other
1.41k stars 170 forks source link

[BUG] Error: Failed to launch the browser process! #1998

Closed xiaoxstz closed 1 month ago

xiaoxstz commented 1 month ago

Describe the bug

When I export PDF by clicking Export-Chrome(Puppeteer)-PDF . It will throw the error below

Error: Failed to launch the browser process! TROUBLESHOOTING: https://pptr.dev/troubleshooting

I am sure I have set the right chrome path

"markdown-preview-enhanced.chromePath":  "C:\\Users\\Tanzi\\scoop\\shims\\chrome.exe"

Environment

To Reproduce Steps to reproduce the behavior:

  1. Open any markdown file
  2. Open the preview panel
  3. Click on Export-Chrome(Puppeteer)-PDF
  4. See error

Expected behavior Export pdf successfully

Markdown file

# About

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

xiaoxstz commented 1 month ago

I solved the issue.

Please don't use chrome.exe in shims folder, instead, use C:\\Users\\{YourUserName}\\scoop\\apps\\googlechrome\\current\\chrome.exe in the configuration file

For example

"markdown-preview-enhanced.chromePath":  "C:\\Users\\{YourUserName}\\scoop\\apps\\googlechrome\\current\\chrome.exe"