Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
10533 Näkymät

 Here I am using the selenium in odoo application and when I run that odoo application, selenium webdriver.Chrome() failed to create a session and the new browser window just appear and close.

The version of driver is : ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) and Chrome browser version is: Version 80.0.3987.132 (Official Build) (64-bit)



Odoo Server Error
Traceback (most recent call last):
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 619, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 309, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/home/dev/odoo13_home/odoo-13.0/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 664, in dispatch
    result = self._call_function(**self.params)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 345, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/service/model.py", line 93, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 338, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 909, in __call__
    return self.method(*args, **kw)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/http.py", line 510, in response_wrap
    response = f(*args, **kw)
  File "/home/dev/odoo13_home/odoo-13.0/addons/web/controllers/main.py", line 1323, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/addons/web/controllers/main.py", line 1311, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/api.py", line 395, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/odoo/api.py", line 382, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/dev/odoo13_home/odoo-13.0/custom_modules_13/testing/models/models.py", line 61, in send_whatsapp_message
    driver = webdriver.Chrome()
  File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/dev/odoo13_home/venv/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from tab crashed
  (Session info: chrome=80.0.3987.132)
Avatar
Hylkää

Hi, Do you Found any solution for this problem?

Tekijä
No, I do not have any solution for this problem. My project is still in pending.

On Thu, 4 Jun 2020 at 13:42, Abdullah <abdullahelyamani@gmail.com> wrote:

Hi, Do you Found any solution for this problem?

Sent by Odoo S.A. using Odoo.

@Abdullah Can you try my answer.

@Satya did you get any solution for this ? I had similar issue.

Paras vastaus

I too met with a similar issue in the latest chrome update(v83). It was working fine for v79 and lower.

After a bunch of tests, I discovered that copying(not moving or renaming) the contents of the odoo directory to a new directory and starting the odoo server from the new directory solves the issue (atleast) for me.

Can you please test the same and confirm?

You can take a latest copy of odoo from github https://github.com/odoo/odoo or nightly \https://nightly.odoo.com/ if needed.

Avatar
Hylkää

I have similar issue with odoo version 14 , Chrome / driver (v89).

It nothing related to odoo directory code... Its about to access google chrome with user.

Paras vastaus

Hi friends, the solve for this question is install Selenium Grid and PyVirtualDisplay (you can use docker for this) and try with Remote option: 

webdriver.Remote(URL_SERVER_SELENIUM, options);

Its works for me.

Best Regards.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
4
toukok. 24
11650
1
huhtik. 24
2542
0
marrask. 23
1433
1
syysk. 23
1512
2
elok. 23
3645