Closed Bug 1649508 Opened 6 years ago Closed 6 years ago

thread 'webdriver dispatcher' panicked at 'Error parsing version regexp for Firefox binary

Categories

(Testing :: geckodriver, defect, P3)

78 Branch
defect

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: atler, Assigned: jgraham)

References

()

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.0 Chrome/80.0.3987.163 Safari/537.36

Steps to reproduce:

Build geckodriver from firefox sources and run selenium test.

Actual results:

geckodriver panics with (obtained from strace for quick result):

panicked at 'Error parsing version regexp: Syntax(

regex parse error:
    \d+\.\d+(?:[a-z]\d+)?
    ^^
error: Unicode-aware Perl class not found (make sure the unicode-perl feature is enabled)

)', testing/geckodriver/src/capabilities.rs:82

Expected results:

geckodriver should run fine.

I realize it's not the best bug report, but I'm completely clueless about rust stuff:

  • is my rust installation wrong? (tried with both 1.42.1 and 1.44.1)
  • do I need some additional crate?
  • do I miss some other option/dependency?
  • perhaps it's some build configuration issue?

Hi Jan!
Please could you add a test case in order to be able to reproduce this issue?
Also, you can try to reproduce it on latest Nightly and tell us your input. You can download it here: https://nightly.mozilla.org/

Flags: needinfo?(atler)

My minimal test case:

$ geckodriver -b /usr/bin/firefox  --log trace
$ echo -e '{\n"capabilities": {\n"alwaysMatch": {\n"browserVersion": "77.0"\n}\n}\n}' |curl -d '@-' http://localhost:4444/session

geckodriver process ends with:

1594239228395       geckodriver     DEBUG   Listening on 127.0.0.1:4444
1594239231839       webdriver::server       DEBUG   -> POST /session {"capabilities": {"alwaysMatch": {"browserVersion": "77.0"}}}
1594239231839       geckodriver::capabilities       DEBUG   Trying to read firefox version from ini files
1594239231839       geckodriver::capabilities       DEBUG   Trying to read firefox version from binary
thread 'webdriver dispatcher' panicked at 'Error parsing version regexp: Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
    \d+\.\d+(?:[a-z]\d+)?
    ^^
error: Unicode-aware Perl class not found (make sure the unicode-perl feature is enabled)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', testing/geckodriver/src/capabilities.rs:82:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Just in case this patch fixed it for me by avoiding perl class in regexp:

https://git.pld-linux.org/?p=packages/firefox.git;a=blob;f=geckodriver-regex.patch;h=0b92e1dfe274311fd0b37a0d0d9e681a2daaf329;hb=f1e03bebbe8934eef0c4ced3515c380b6df7f1a5

I probably could test it on nightly but I don't think geckodriver is built by Mozilla or is it? If yes please provide download link.

Flags: needinfo?(atler)

This will be fixed with the next 0.27.0 release. The underlying problem is that the regex crate removed support for \d and others.

Blocks: 1584911
Status: UNCONFIRMED → NEW
Component: Untriaged → geckodriver
Ever confirmed: true
Product: Firefox → Testing
Summary: geckodriver built from firefox sources panics since 77.0 → thread 'webdriver dispatcher' panicked at 'Error parsing version regexp for Firefox binary

The severity field is not set for this bug.
:whimboo, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(hskupin)

Can you please re-test with the 0.27 release of geckodriver? This shouldn't be a problem anytime longer. Thanks.

Severity: -- → S3
Flags: needinfo?(hskupin) → needinfo?(atler)
Priority: -- → P3

Note that geckodriver 0.26 was not affected. The ticket was specifically raised for geckodriver built manually from firefox sources, therefore can you please indicate in which firefox release it is expected to be fixed?

Looks like fix for this issue was committed with changes for different issue and judging by its content it won't be available till Firefox 81:

https://hg.mozilla.org/mozilla-central/rev/2295f37753ec5216f61d897dc034fb02b6821976

This change is part of geckodriver 0.27 which has been released on July 29th. So I will mark it as fixed by bug 1648964. Thanks for checking!

Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(atler)
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Just to confirm: version matching is fixed in Firefox 80, however geckodriver remains broken due to https://bugzilla.mozilla.org/show_bug.cgi?id=1658870

(In reply to Jan Palus from comment #9)

Just to confirm: version matching is fixed in Firefox 80, however geckodriver remains broken due to https://bugzilla.mozilla.org/show_bug.cgi?id=1658870

Sadly it was too late for getting it fixed for 80. So as workaround you can use Firefox 81 beta for now if you are affected by that.

You need to log in before you can comment on or make changes to this bug.