Closed workflowsguy closed 2 months ago
@workflowsguy, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Hi, @workflowsguy. Please follow the issue template, we need more information to reproduce the issue.
Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.
Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.
Reply to this issue when all information is provided, thank you.
We need more information about this issue in order to troubleshoot.
Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our Troubleshooting documentation.
Hmm, it doesn't want to execute selenium-manager. What do you get when you run:
/Users/guy/Library/Python/3.11/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager --browser firefox --output json
service = webdriver.ChromeService(executable_path='/opt/local/bin/geckodriver')
You want GeckoDriverService
not Chrome
Hmm, it doesn't want to execute selenium-manager. What do you get when you run:
/Users/guy/Library/Python/3.11/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager --browser firefox --output json
This is the output
{
"logs": [
{
"level": "WARN",
"timestamp": 1716269692,
"message": "The geckodriver version (0.30.0) detected in PATH at /opt/local/bin/geckodriver might not be compatible with the detected firefox version (115.11.0); currently, geckodriver 0.34.0 is recommended for firefox 115.*, so it is advised to delete the driver in PATH and retry"
},
{
"level": "INFO",
"timestamp": 1716269692,
"message": "Driver path: /opt/local/bin/geckodriver"
},
{
"level": "INFO",
"timestamp": 1716269692,
"message": "Browser path: /Applications/Firefox.app/Contents/MacOS/firefox"
}
],
"result": {
"code": 0,
"message": "/opt/local/bin/geckodriver",
"driver_path": "/opt/local/bin/geckodriver",
"browser_path": "/Applications/Firefox.app/Contents/MacOS/firefox"
}
}
service = webdriver.ChromeService(executable_path='/opt/local/bin/geckodriver')
You want
GeckoDriverService
not Chrome
This was not clear to me from the documentation...
https://www.selenium.dev/documentation/webdriver/browsers/firefox/#service
Yes, but I did not land on that page, but on another one with a code example that just used chromedriver
...
Hmm, weird that it didn't want to execute selenium manager the first time, but it worked manually.
For the sake of determining if there is a bug in our code that we need to fix, was the original error repeatable?
Does it work for you to delete the outdated driver at that location (instead of specifying the location in the service class)?
Hmm, weird that it didn't want to execute selenium manager the first time, but it worked manually.
For the sake of determining if there is a bug in our code that we need to fix, was the original error repeatable?
Does it work for you to delete the outdated driver at that location (instead of specifying the location in the service class)?
Sorry, the actual output for /Users/guy/Library/Python/3.11/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager --browser firefox --output json
on Selenium 4.21 is actually
dyld: cannot load 'selenium-manager' (load command 0x80000034 is unknown)
[1] 59560 abort --browser firefox --output json
Having to keep switching between 4.20 and 4.21 makes this really difficult for me...
@diemol / @bonigarcia is there anything we changed in 4.21 for how we are deploying selenium-manager in Python?
Nothing changed in the Rust side in release 4.21: https://github.com/SeleniumHQ/selenium/blob/trunk/rust/CHANGELOG.md#0421
I don't know if something changed in Python related to this.
No changes in Python, these were the commits
Maybe something went bad in the specific install? Can you try using the nightly release? (@diemol can you link to the instructions on how to use nightly packages, I can't find them...)
Maybe something went bad in the specific install? Can you try using the nightly release? (@diemol can you link to the instructions on how to use nightly packages, I can't find them...)
I am not intricately familiar with the build process for Python packages, but I have switched between 4.20 and 4.21 several times now in the last days (using pip install -U
), and the result is the same every time: 4.20 works, 4.21 fails.
I have capacity to test the nightly release on the weekend, but before I do this:
If nothing in the code has changed, does the same hold true for the tools in the build chain? I ask this because last week, two python packages that rely on external C/C++ libraries released new versions where one on this machine caused an "illegal hardware instruction" crash, the other a "segmentation violation" crash.
I have only heard back from one of the package authors, who suspected that this is caused by a change/bug in Apple's tool chain. He released a new version created with different compile options that no longer crashes. Details are here
Selenium Manager is a Rust binary, so I don't discard a dependency update that can have side effects.
However, do you get the same errors when you try on a colleague's machine? Maybe we can isolate the issue that way.
The thing to keep in mind here is that you are the only one reporting this issue even a week after release, so whatever the cause, it likely involves something specific about your system.
Oh, dynamic linking... It might be related to the machine where selenium-manager binaries were produced. Can we see what exactly machines (OS, Arch) were used to build binaries?
@workflowsguy can you please share output of the following command? (hopefully it works on MacOS)
ldd /path/to/selenium-manager
@bonigarcia, MACOSX_DEPLOYMENT_TARGET
env variable might help. Please explore it.
Seems this env var should help to support older MacOS versions (<13), similar case - https://github.com/rust-lang/rustup/pull/3710
@workflowsguy can you please share output of the following command? (hopefully it works on MacOS)
ldd /path/to/selenium-manager
There is no ldd
command in macOS; the best alternative according to various internet sources is otool
otool -L /Users/guy/Library/Python/3.12/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager
gives
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1296.0.1)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 61040.1.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2048.1.255)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)
otool -l /Users/guy/Library/Python/3.12/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager
gives
/Users/guy/Library/Python/3.12/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedfacf 16777223 3 0x00 2 21 2280 0x00a00085
Load command 0
cmd LC_SEGMENT_64
cmdsize 72
segname __PAGEZERO
vmaddr 0x0000000000000000
vmsize 0x0000000100000000
fileoff 0
filesize 0
maxprot 0x00000000
initprot 0x00000000
nsects 0
flags 0x0
Load command 1
cmd LC_SEGMENT_64
cmdsize 632
segname __TEXT
vmaddr 0x0000000100000000
vmsize 0x00000000003dc000
fileoff 0
filesize 4046848
maxprot 0x00000005
initprot 0x00000005
nsects 7
flags 0x0
Section
sectname __text
segname __TEXT
addr 0x0000000100000f40
size 0x00000000002e6d10
offset 3904
align 2^6 (64)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __stubs
segname __TEXT
addr 0x00000001002e7c50
size 0x00000000000003a2
offset 3046480
align 2^0 (1)
reloff 0
nreloc 0
flags 0x80000408
reserved1 0 (index into indirect symbol table)
reserved2 6 (size of stubs)
Section
sectname __const
segname __TEXT
addr 0x00000001002e8000
size 0x00000000000e8020
offset 3047424
align 2^12 (4096)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __gcc_except_tab
segname __TEXT
addr 0x00000001003d0020
size 0x000000000000199c
offset 3997728
align 2^2 (4)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __cstring
segname __TEXT
addr 0x00000001003d19bc
size 0x00000000000015db
offset 4004284
align 2^0 (1)
reloff 0
nreloc 0
flags 0x00000002
reserved1 0
reserved2 0
Section
sectname __unwind_info
segname __TEXT
addr 0x00000001003d2f98
size 0x0000000000006620
offset 4009880
align 2^2 (4)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __eh_frame
segname __TEXT
addr 0x00000001003d95b8
size 0x0000000000001eb8
offset 4036024
align 2^3 (8)
reloff 0
nreloc 0
flags 0x6800000b
reserved1 0
reserved2 0
Load command 2
cmd LC_SEGMENT_64
cmdsize 232
segname __DATA_CONST
vmaddr 0x00000001003dc000
vmsize 0x0000000000050000
fileoff 4046848
filesize 327680
maxprot 0x00000003
initprot 0x00000003
nsects 2
flags 0x10
Section
sectname __got
segname __DATA_CONST
addr 0x00000001003dc000
size 0x00000000000004e8
offset 4046848
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000006
reserved1 155 (index into indirect symbol table)
reserved2 0
Section
sectname __const
segname __DATA_CONST
addr 0x00000001003dc500
size 0x000000000004da25
offset 4048128
align 2^6 (64)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Load command 3
cmd LC_SEGMENT_64
cmdsize 552
segname __DATA
vmaddr 0x000000010042c000
vmsize 0x0000000000004000
fileoff 4374528
filesize 16384
maxprot 0x00000003
initprot 0x00000003
nsects 6
flags 0x0
Section
sectname __data
segname __DATA
addr 0x000000010042c000
size 0x0000000000001060
offset 4374528
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __thread_vars
segname __DATA
addr 0x000000010042d060
size 0x00000000000001f8
offset 4378720
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000013
reserved1 0
reserved2 0
Section
sectname __thread_data
segname __DATA
addr 0x000000010042d258
size 0x0000000000000070
offset 4379224
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000011
reserved1 0
reserved2 0
Section
sectname __thread_bss
segname __DATA
addr 0x000000010042d2c8
size 0x0000000000000140
offset 4379336
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000012
reserved1 0
reserved2 0
Section
sectname __bss
segname __DATA
addr 0x000000010042d408
size 0x0000000000000162
offset 0
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000001
reserved1 0
reserved2 0
Section
sectname __common
segname __DATA
addr 0x000000010042d570
size 0x0000000000000010
offset 0
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000001
reserved1 0
reserved2 0
Load command 4
cmd LC_SEGMENT_64
cmdsize 72
segname __LINKEDIT
vmaddr 0x0000000100430000
vmsize 0x0000000000005cb0
fileoff 4390912
filesize 23728
maxprot 0x00000001
initprot 0x00000001
nsects 0
flags 0x0
Load command 5
cmd ?(0x80000034)
cmdsize 16
Load command 6
cmd ?(0x80000033)
cmdsize 16
Load command 7
cmd LC_SYMTAB
cmdsize 24
symoff 4408552
nsyms 159
stroff 4412344
strsize 2296
Load command 8
cmd LC_DYSYMTAB
cmdsize 80
ilocalsym 0
nlocalsym 1
iextdefsym 1
nextdefsym 1
iundefsym 2
nundefsym 157
tocoff 0
ntoc 0
modtaboff 0
nmodtab 0
extrefsymoff 0
nextrefsyms 0
indirectsymoff 4411096
nindirectsyms 312
extreloff 0
nextrel 0
locreloff 0
nlocrel 0
Load command 9
cmd LC_LOAD_DYLINKER
cmdsize 32
name /usr/lib/dyld (offset 12)
Load command 10
cmd LC_UUID
cmdsize 24
uuid B9D4546B-3F6E-377A-A2D5-C0067C113A9C
Load command 11
cmd LC_BUILD_VERSION
cmdsize 32
platform macos
sdk 14.0
minos 13.0
ntools 1
tool ld
version 1015.7
Load command 12
cmd LC_SOURCE_VERSION
cmdsize 16
version 0.0
Load command 13
cmd LC_MAIN
cmdsize 24
entryoff 57808
stacksize 0
Load command 14
cmd LC_LOAD_DYLIB
cmdsize 112
name /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 1296.0.1
compatibility version 1.0.0
Load command 15
cmd LC_LOAD_DYLIB
cmdsize 96
name /System/Library/Frameworks/Security.framework/Versions/A/Security (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 61040.1.3
compatibility version 1.0.0
Load command 16
cmd LC_LOAD_DYLIB
cmdsize 104
name /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 2048.1.255
compatibility version 150.0.0
Load command 17
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libiconv.2.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 7.0.0
compatibility version 7.0.0
Load command 18
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libSystem.B.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 1336.0.0
compatibility version 1.0.0
Load command 19
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 4395912
datasize 12640
Load command 20
cmd LC_DATA_IN_CODE
cmdsize 16
dataoff 4408552
datasize 0
What caught my attention in this output are the lines
Load command 11
cmd LC_BUILD_VERSION
cmdsize 32
platform macos
sdk 14.0
minos 13.0
ntools 1
tool ld
version 1015.7
When running /Users/guy/Library/Python/3.12/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager
in the terminal, the following crash report is logged by macOS
Process: selenium-manager [42988]
Path: /Users/USER/Library/Python/3.12/lib/python/site-packages/selenium/webdriver/common/macos/selenium-manager
Identifier: selenium-manager
Version: ???
Code Type: X86-64 (Native)
Parent Process: zsh [42608]
Responsible: selenium-manager [42988]
User ID: 501
Date/Time: 2024-05-25 20:03:38.830 +0200
OS Version: Mac OS X 10.13.6 (17G14042)
Report Version: 12
Anonymous UUID: A41421B4-F1A6-23F0-F507-8C741C7D2643
Sleep/Wake UUID: D3629483-3D0C-499B-95AF-1197EAA824C6
Time Awake Since Boot: 43000 seconds
Time Since Wake: 6800 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x9] <unknown>
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
cannot load 'selenium-manager' (load command 0x80000034 is unknown)
Binary Images:
0x1029b2000 - 0x102d8d46f + (0) <B9D4546B-3F6E-377A-A2D5-C0067C113A9C>
0x109d99000 - 0x109de3adf + (551.5) <CB9BFB56-4511-36F1-A546-891FF770C01C>
An internet search for Dyld Error Message load command 0x80000034 is unknown
returns, among others, this and this
However, do you get the same errors when you try on a colleague's machine? Maybe we can isolate the issue that way.
Running Selenium Manager on a machine with macOS 11.7.10 works as expected.
Really do you need Python 3.12? Maybe if you use Python 3.10 it work.
Also, upgraded your Firefox Version? above i seen that: "message": "The geckodriver version (0.30.0) detected in PATH at /opt/local/bin/geckodriver might not be compatible with the detected firefox version (115.11.0); currently, geckodriver 0.34.0 is recommended for firefox 115.*, so it is advised to delete the driver in PATH and retry"
I have prepared different selenium-manager binaries for macOS using different setups. @workflowsguy Can you please have a try with them?
[1] selenium-manager-macos : Compiled using Rust 1.77.2.
[2] selenium-manager-macos : Compiled using Rust 1.77.2 and MACOSX_DEPLOYMENT_TARGET=10.12
env.
Please download the previous binaries, execute them in the command line, and share the results here. Thanks.
[1] selenium-manager-macos : Compiled using Rust 1.77.2.
This gives the same error as I originally reported
[2] selenium-manager-macos : Compiled using Rust 1.77.2 and
MACOSX_DEPLOYMENT_TARGET=10.12
env.
This works!
Mac 10.13 went out of support 3 years ago. I think we're ok only supporting officially supported OS versions like we do for everything else.
From my point of view... if we can support as minimum version of something without big effort then just do it. When we feel that supporting old stuff takes more and more, then we can just announce "sorry, we stopped to support it because of even your vendor stopped supporting it".
Particularly for this issue - one line of code change makes users happy. Why not.
The error happened because it uses newer load command APIs which presumably include performance/feature improvements. Setting an older target prevents using any newer APIs which may be limiting.
Are we sure everything actually works in 10.12? Do we need to have tests to verify it?
The concerns are extra maintenance burden and lack of latest features.
I am closing this because we have yet to get more information.
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
What happened?
After upgrading Selenium from 4.20 to 4.21, the existing geckodriver is no longer found. In the console, I can see that the binary is in
/opt/local/bin/geckodriver
However, my script that has worked until yesterday with Selenium 4.20, now outputs
NoSuchDriverException: Message: Unable to obtain driver for firefox; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
Adding the line
service = webdriver.ChromeService(executable_path='/opt/local/bin/geckodriver')
to my code has no effect.How can we reproduce the issue?
Relevant log output
Operating System
macOS 10.13.6
Selenium version
Python 4.21
What are the browser(s) and version(s) where you see this issue?
Firefox 115.11.0(esr)
What are the browser driver(s) and version(s) where you see this issue?
geckodriver 0.30.0
Are you using Selenium Grid?
No response