chrishubert / whatsapp-api

This project is a REST API wrapper for the whatsapp-web.js library, providing an easy-to-use interface to interact with the WhatsApp Web platform.
https://www.christophehubert.com
Other
886 stars 398 forks source link

Issue: Chromium Profile Lock Error During Initialization #283

Closed tomy1989 closed 1 month ago

tomy1989 commented 1 month ago

I encountered an issue where Chromium profiles are being locked by another process, causing the following error when attempting to initialize new sessions: Initialize error: Failed to launch the browser process! [37:37:1021/124411.842146:ERROR:process_singleton_posix.cc(358)] The profile appears to be in use by another Chromium process (36) on another computer (e77b1ebe9b51). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.

Azathoth88 commented 1 month ago

@tomy1989 I have the same problem. How do you solve this?

tomy1989 commented 1 month ago

Hi @Azathoth88,

To solve this issue with Chromium profiles being locked, follow these steps within your Docker container:

Steps to Unlock Chromium and Relaunch

  1. Remove the Chromium Lock Files (SingletonLock)
    Chromium creates a SingletonLock file to ensure that only one instance of a profile is used at a time. You need to delete these lock files manually in the session directories.

Step-by-Step Instructions

After doing this, you should be able to relaunch Chromium without the lock issue.

If you need more help, feel free to reach out to me on LinkedIn.

Azathoth88 commented 1 month ago

@tomy1989 Thank you very much for your detailed answer and your help! It has helped me!

avoylenko commented 1 month ago

We could implement the logic of removing the lock file on session start, but i don't know how painful the issue is to do so.

Azathoth88 commented 1 month ago

How about an optional ENV?