Troubleshooting WebDriver connection issues
Using Selenium to automate Multilogin browsers but hitting connection issues? Here's how to fix WebDriver errors when automating with our API.
WebDriver is your automation buddy – it sends commands (via Selenium or Puppeteer) to your Multilogin browser profile. When the connection fails, your script can’t control the browser. If your browser profile doesn’t launch or WebDriver hangs, it’s likely a mismatch or config issue. Let's check them!
Step 1: double-check your API calls
-
Make sure you are using the
/v2/profile/start
endpoint -
The request need to include the
automation_type
: choose betweenselenium
,puppeteer
orplaywright
Ex.: https://launcher.mlx.yt:45001/api/v2/profile/f/:folder_id/p/:profile_id/start?automation_type=selenium&headless_mode=false
If this is not active, the WebDriver won't correct and the browser will launch in manual mode.
Step 2: wait for the WebSocket
- After starting the profile, it will automatically be connected to a port
- Your Selenium or Puppeteer script should remain connected to this port
- Always dynamically fetch the port from the Multilogin API – avoid hardcoding ports!
Step 3: check if the browser and WebDriver versions are matching
- Your browser and WebDriver versions must match. Example: If Multilogin is using Chromium 114, use ChromeDriver 114
-
You can find the browser version in the profile response under
browser.version
Step 4: use the right WebDriver
Chrome-based and Firefox-based browsers uses distinct WebDrivers. If you are automating with Python, that must reflect on your request.
- Add the import lines at the beginning of the script:
from selenium import webdriver
from selenium.webdriver.chromium.options import ChromiumOptions
from selenium.webdriver.firefox.options import Options
- Check for the correct configurations and libraries when using distinct browsers:
- Mimic:
- Use the example script located in Selenium automation example (Puppeteer version|Playwright version)
- StealthFox WebDriver:
- Open the example script from the previous step
- Locate the line
driver = webdriver.Remote(command_executor=f'{LOCALHOST}:{selenium_port}', options=ChromiumOptions())
- Replace
options=ChromiumOptions()
withoptions=Options()
- Mimic:
Step 5: check for network or security blockages
Firewalls or antivirus apps might block local ports, try:
- Disabling them briefly to test
- Whitelist the WebDriver connection and Multilogin, if needed.
- Test if the solution works
- Re-enable your security tools with Multilogin and WebDriver both whitelisted
Nothing helps?
- Double-check you are not trying to reuse a closed port
- Make sure the profile is not closed before your automation starts
- Check Multilogin logs for more clues
Want to explore more? Check our Multilogin API docs.