Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The browser sometimes cannot launch due to profile's singleton lock #589

Closed
yhatt opened this issue Sep 12, 2024 · 0 comments · Fixed by #591
Closed

The browser sometimes cannot launch due to profile's singleton lock #589

yhatt opened this issue Sep 12, 2024 · 0 comments · Fixed by #591
Labels
bug Something isn't working

Comments

@yhatt
Copy link
Member

yhatt commented Sep 12, 2024

Version of Marp Tool

Marp CLI v3.4.0

Operating System

macOS

Environment

  • OS version: macOS Sonoma 14.6.1
  • Node.js version (Marpit / Marp Core/ Marp CLI): v20.11.0
  • VS Code version (Marp for VS Code): VS Code 1.93.0

How to reproduce

  1. Launch Marp CLI with server mode: marp -s .
  2. Show an any Markdown slide as PDF: http://localhost:8080/markdown.md?pdf
  3. Try to convert some Markdown into PDF with another Marp CLI process (e.g. Export command in Marp for VS Code)

Expected behavior

Success exporting PDF in step 3

Actual behavior

Failure to export: [CLIError] Failed converting Markdown. (Failed to launch the browser process! undefined
[31630:259:0912/234955.283762:ERROR:process_singleton_posix.cc(335)] Failed to create /private/var/folders/q3/skswxg4x7934y_xc5vjbyhrw0000gn/T/marp-cli-conversion/SingletonLock: File exists (17)
[31630:259:0912/234955.283936:ERROR:chrome_main_delegate.cc(592)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.


TROUBLESHOOTING: https://pptr.dev/troubleshooting
)

Additional information

The current Chrome seems to be strictly managed to start the profile in a single process. We are currently using named temporary directory as the Chrome's data dir, but we have to consider to name them as unique.

@yhatt yhatt added bug-triage May be a bug and needs triage bug Something isn't working and removed bug-triage May be a bug and needs triage labels Sep 12, 2024
@yhatt yhatt changed the title Cannot launch the browser due to profile's singleton lock The browser sometimes cannot launch due to profile's singleton lock Sep 15, 2024
@yhatt yhatt linked a pull request Sep 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant