Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If user has no Chrome installed #21

Open
rdavydov opened this issue Nov 1, 2022 · 7 comments
Open

If user has no Chrome installed #21

rdavydov opened this issue Nov 1, 2022 · 7 comments
Assignees
Labels
🐜 bug Something isn't working 📘 documentation Improvements or additions to documentation 🧱 enhancement New feature or request ➕ todo

Comments

@rdavydov
Copy link
Owner

rdavydov commented Nov 1, 2022

So, i wanted to run it on my windows machine (tested on my personal Win10 and on a clean install of Win11). (Friendly reminder, it requires vc_redist (x64), otherwise it crashes with some error about failed dll load of _brotli.)
Anyways, both machines crashed while opening the browser (last thing in the log: DEBUG - uc - [__init__]: did not find a bad exit_type flag). Well, that IS because i have Firefox on my main pc / Edge on the clean one. After installing Chrome, it seems to be working... would be nice to write somewhere it is mandatory, not everyone runs chrome. Also, if the password is not set in file.py, it will not be filled in the browser after opening.
Cookies file created, i will report later if everything is alright. But i don't expect issues as others have already reported it's working just fine.

Lastly, huge thanks for that #, executable_path= in TwitchLogin.py file, as I intend to download a portable version of chrome(ium? if possible) without cluttering my system with another browser.

Originally posted by @XaaRii in #15 (comment)

@rdavydov
Copy link
Owner Author

rdavydov commented Nov 1, 2022

Add info about:

  1. Chrome
  2. vc_redist x64
  3. executable_path

@rdavydov rdavydov added 🐜 bug Something isn't working 📘 documentation Improvements or additions to documentation 🧱 enhancement New feature or request labels Nov 1, 2022
@rdavydov
Copy link
Owner Author

rdavydov commented Nov 1, 2022

Also, need to test whether it will work with geckodriver instead of undetected_chromedriver.

@rdavydov
Copy link
Owner Author

rdavydov commented Nov 1, 2022

TODO:

  • add executable_path as a setting to run.py
  • wrap Selenium actions with try..except

@rdavydov rdavydov self-assigned this Nov 1, 2022
@XaaRii
Copy link

XaaRii commented Nov 15, 2022

Sorry to bother again, but i am trying to fill in the executable_path in TwitchLogin.py
This is probably a stupid question, but whatever i do, i just can't make it work. I tried both executable_path="/absolute/and/relative/paths/chrome.exe"(with single and double quotes), even tried some sorts of filepath= os.path.join('path','to','file'), but that also didn't help.

The error is: TypeError: expected str, bytes or os.PathLike object, not NoneType and origins from Pythonfolder\lib\os.py, line 822 - filename = fspath(filename) # Does type-checking of filename``.
Am I just overlooking something? I just don't understand how literal string is considered NoneType...
Running clean windows 11, python 3.10.5 x64, miner version 1.4.0

@rdavydov
Copy link
Owner Author

@XaaRii Maybe it is related to slashes? Windows uses backslash \ instead of slash /. And you may need to escape backlash with another backslash, like \\.

I've tried experimenting with executable_path, but UC seems to be completely ignoring it. It launches Chrome even with executable_path="C:\\foo\\bar.exe" (no such file). 🤔

@XaaRii
Copy link

XaaRii commented Nov 15, 2022

forgot to say, i tried both double backslash and normal slash as well. This really seems like an issue on UC's side, just tested putting the chrome folder (with executable) to their default installation location and it was indeed used (so it's probably a hardcoded path)

If you're interested in traceback when no chrome is found, here you go. But I understand it's probably no use for you...
https://pastebin.com/zUqWy216

@rdavydov
Copy link
Owner Author

Now there is no need for this.

I'll keep this open for a while in case ultrafunkamsterdam/undetected-chromedriver#897 will get any fixes.

It is always useful to have a backup option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working 📘 documentation Improvements or additions to documentation 🧱 enhancement New feature or request ➕ todo
Projects
None yet
Development

No branches or pull requests

2 participants