title: Python Selenium - WebDriverException: browsingContextFn() .currentWindowGlobal is null
body: <p>I wrote an Instagram bot with Python and Selenium, which works just fine. Most of the time.</p>
  <p>Sometimes, in save data when it should click &quot;don't save,&quot; its randomly throws this error:</p>
  <pre><code>WebDriverException: browsingContextFn() .currentWindowGlobal is null
  </code></pre>
  <p>When I restart the program, it just works fine.</p>
  <p>My question is: what does this error mean and how can I fix it? I tried to search this but found nothing.</p>
  <p>I can post my code if really needed but I'm not that good at coding and it's a little messy.</p>