title: selenium on heroku timeout exception
body: <p>I'm trying to scrape images from Ecosia search
  it's working fine when I run in locally with an error
  that is in this link
  <a href="https://stackoverflow.com/questions/64927909/failed-to-read-descriptor-from-node-connection-a-device-attached-to-the-system">Failed to read descriptor from node connection: A device attached to the system is not functioning error using ChromeDriver Selenium on Windows OS</a></p>
  <p>but when I deploy it to Heroku it shows me a timeout exception</p>
  <pre><code>from selenium import webdriver
  import os
  
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  from selenium.common.exceptions import TimeoutException
  
  chrome_options = webdriver.ChromeOptions()
  chrome_options.binary_location = os.environ.get(&quot;GOOGLE_CHROME_BIN&quot;)
  chrome_options.add_argument(&quot;--headless&quot;)
  chrome_options.add_argument(&quot;--disable-dev-shm-usage&quot;)
  chrome_options.add_argument(&quot;--no-sandbox&quot;)
  chrome_options.add_argument(&quot;window-size=1400,800&quot;)
  driver = webdriver.Chrome(executable_path=os.environ.get(&quot;CHROMEDRIVER_PATH&quot;), chrome_options=chrome_options)
  
  delay = 50
  driver.get('https://www.ecosia.org/images?q=asfasf')
  print('success')
  size = driver.get_window_size()
  print(&quot;Window size: width = {}px, height = {}px&quot;.format(size[&quot;width&quot;], size[&quot;height&quot;]))
  
  try:
      myElem = WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.ID, '__nuxt')))
      print(&quot;Page is ready!&quot;)
  except TimeoutException as e:
      print(e)
      print(&quot;Loading took too much time!&quot;)
  finally:
      images =driver.find_elements_by_tag_name('img')
      for img in images:
          src =img.get_attribute(&quot;src&quot;)
          print(src)
  </code></pre>
  <p>I tried changing the target website to google and it runs fine
  but it gives the same error when I try to change the id that the program is waiting to load</p>
  <p>and it doesn't print all the image sources so it doesn't load the full page even with google link</p>
  <pre><code>from selenium import webdriver
  import os
  import time
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.by import By
  from selenium.common.exceptions import TimeoutException
  
  chrome_options = webdriver.ChromeOptions()
  chrome_options.binary_location = os.environ.get(&quot;GOOGLE_CHROME_BIN&quot;)
  chrome_options.add_argument(&quot;--headless&quot;)
  chrome_options.add_argument(&quot;--disable-dev-shm-usage&quot;)
  chrome_options.add_argument(&quot;--no-sandbox&quot;)
  chrome_options.add_argument(&quot;window-size=1400,800&quot;)
  driver = webdriver.Chrome(executable_path=os.environ.get(&quot;CHROMEDRIVER_PATH&quot;), chrome_options=chrome_options)
  
  delay =50
  final_word = 'hey'
  driver.get('https://www.google.com/search?q=what&amp;tbm=isch&amp;ved=2ahUKEwjV6Jbil8bxAhWGFisKHU-sAaMQ2-cCegQIABAA&amp;oq=what&amp;gs_lcp=CgNpbWcQAzIFCAAQsQMyBQgAELEDMggIABCxAxCDATIFCAAQsQMyBQgAELEDMgUIABCxAzIFCAAQsQMyBQgAELEDMgUIABCxAzIFCAAQsQNQmhdY_hpg2xtoAHAAeACAAYEBiAHYApIBAzAuM5gBAKABAaoBC2d3cy13aXotaW1nwAEB&amp;sclient=img&amp;ei=5PffYNXmC4atrAHP2IaYCg&amp;bih=625&amp;biw=1366&amp;safe=images')
  print('success')
  size = driver.get_window_size()
  print(&quot;Window size: width = {}px, height = {}px&quot;.format(size[&quot;width&quot;], size[&quot;height&quot;]))
  
  try:
      myElem = WebDriverWait(driver, delay).until(EC.presence_of_element_located((By.CLASS_NAME, 'c7cjWc')))
      print(&quot;Page is ready!&quot;)
  except TimeoutException as e:
      print(e)
      print(&quot;Loading took too much time!&quot;)
  finally:
      a=driver.page_source
      print(a)
      images =driver.find_elements_by_tag_name('img')
      for img in images:
          src =img.get_attribute(&quot;src&quot;)
          print(src)
  </code></pre>
  <p>and then I tried another website called ocean hero and it gave me the same error</p>
  <p><a href="https://i.stack.imgur.com/0Dtha.png" rel="nofollow noreferrer">picture of Heroku logs</a></p>