Search code examples
python-3.xseleniumopera

Exiting GPU process be cause some drivers can't recover


I am having error when using selenium in opera. I was filling form when filling suddenly it crashes showing error like this

[4156:4716:0427/100837.120:ERROR:page_load_metrics_update_dispatcher.cc(165)] Invalid first_paint 9.316 s for first_image_paint 9.298 s       
[4156:4716:0427/100838.277:ERROR:page_load_metrics_update_dispatcher.cc(165)] Invalid first_paint 9.316 s for first_image_paint 9.298 s       
[0427/100838.647:ERROR:gl_surface_egl.cc(692)] EGL Driver message (Critical) eglPostSubBufferNV: Context lost.                                
[0427/100838.649:ERROR:gles2_cmd_decoder_passthrough.cc(2874)] Context 
lost because PostSubBuffer failed.                                     
[0427/100838.650:ERROR:gpu_service_impl.cc(986)] Exiting GPU process be
cause some drivers can't recover from errors. GPU process will restart 
shortly.    

my code is below,

    driver = webdriver.Opera(desired_capabilities=webdriver.DesiredCapabilities.OPERA, executable_path='operadriver.exe')
    driver.get(keys['doc_url'])
    driver.find_element_by_xpath('//*[@id="mG61Hd"]/div/div/div[2]/div[1]/div[2]/div/div[1]/div/div[1]/input').send_keys(k['email'])
    driver.find_element_by_xpath('//*[@id="mG61Hd"]/div/div/div[2]/div[2]/div/div[2]/div/div[1]/div/div[1]/input').send_keys(k['first_name'])
    driver.find_element_by_xpath('//*[@id="mG61Hd"]/div/div/div[2]/div[4]/div/div[2]/div/div[1]/div/div[1]/input').send_keys(k['last_name'])

Im using CPU only having specs Intel i3 2gb ram. Help!!!


Solution

  • Try adding --disable-gpu to capabilities