I'm using NoDriver Python with a chrome profile and I'm running into an issue where the browser some times enters into a corrupted state and NoDriver can't control it.

For example if I run the script and the browser launches successfully with the profile and everything is working, then I do Control+C to kill the program, then after this if I run the script again the browser launches with the profile, but the browser gets into this bad state. I can manually interact with the browser, but if I click on the top search bar then the browser crashes.

To fix this, I have to manually open chrome and launch the profile and then close it. After doing this if I run the script again then everything works.

I'm guessing theres some sort of Lock/Singleton in the Profile directory thats not being de-initialized properly when force closing the browser, and then this is messing up subsequent runs. I've spent 3 hours (with Claude 4.6) trying a bunch of different approaches to sanitize the profile/browser before launching, but nothing has worked. I'd appreciate some help.

I'm on MacOS.

Ahmed Zaidan's user avatar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.