Skip to content
New issue

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

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

Already on GitHub? # to your account

[ISSUE] App crashes when trying to get video element (APP CANNOT BE USED) #48

Open
HaruNashii opened this issue Oct 25, 2024 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@HaruNashii
Copy link
Contributor

the app crashes when get into the line 80 of the file "src/cli/get_video_url.rs", line in question is : driver.wait().for_element(Locator::Css("video")).await?;

the error is called "WaitTimeOut", probably it happens because some change in the website.
for my understanding the "fantoccini" is not being able to locate the element "video" in to the "css" off the website

be warned that the Rust error log doesn't show that this specific line is given an error on that specific file, but you can prove it putting a println!("stops here?"); on the line 79 of that file to get a better understand where the app is crashing.

unfortunately i lack the knowledge to make a PR for this issue, sorry :(

-- off-topic
also a little fact that doesn't seem to affect the app functionality is that the url passed to the client "https://vizer.in" seems to be just a redirect to the original site "https://novizer.com/", but the app has no problem with it

@anotherlusitano
Copy link
Owner

Thanks for addressing the issue, I will see what I can do about it

@HaruNashii
Copy link
Contributor Author

thx, also if it helps you, i was using the "Geckodriver", i don't think that this is linked with the issue by any means, but i'm not entirely sure :/

@anotherlusitano
Copy link
Owner

I just want to give you an update on what I know about the error so far.

I found out that the error that you get when using geckodriver is that the app can't retrieve the url of the video because of the ads that are blocking it.
I've also discovered that, when using chromedriver, the video can't be played by either VLC or MPV due to a forbidden error it receives when accessing the video url. This error doesn't happen in the browser.

I will continue to investigate the forbidden error before fixing the geckodriver problem, but if you could test the forbidden error, that would be very helpful!

@HaruNashii
Copy link
Contributor Author

HaruNashii commented Oct 28, 2024

Strange, just now I tested Chromedriver on two different devices and both gave me the same error when selecting media, I tried several times and tried to kill Chromedriver several times but nothing fixed it :(

the app doesn't even pass the first page, when i click the anime/serie or movie that i want to watch the app crashes

#----------DEVICE 1--------------#
Google Chrome Version : 130.0.6723.69 (Installed Via Google Official)
ChromeDriver Version : 130.0.6723.69 (Installed Via Google Official)
Distro : Pop!_OS 22.04 LTS X86_64
Kernel Version : 6.9.3
RUST ERROR LOG :

thread 'main' panicked at /home/haru/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.0/src/session.rs:604:17:
unexpected webdriver error; webdriver could not be reached (hyper_util): client error (Connect)
#-----------DEVICE 2----------------#
Google Chrome Version : 130.0.6723.69 (Installed via AUR with the package named as "google-chrome"
ChromeDriver Version : 130.0.6723.58 (Installed via AUR with the package named as "chromedriver"
Distro : "WSL2 Running Arch Linux" also called as "Arch Linux on Windows 10 x86_64"
Kernel Version : 5.15.153.1-microsoft-standard-WSL2
RUST ERROR LOG :

thread 'main' panicked at /home/haru/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.0/src/session.rs:604:17:
unexpected webdriver error; webdriver could not be reached (hyper_util): client error (Connect)
#---------------------------#

the error occur in line 39 on the file "src/driver/start_driver.rs", the line in question is :
ClientBuilder::native().capabilities(caps).connect("http://localhost:9515").await.expect("failed to connect to WebDriver")

@HaruNashii
Copy link
Contributor Author

also i tried smth different in my "DEVICE 2" running "cargo update", building the app again and running, and i receive one different error doing the same action, the error is:

thread 'main' panicked at src/driver/start_driver.rs:43:14:
failed to connect to WebDriver: FailedC(hyper_util::client::legacy::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))

the error occur in the same line, it just gives a different error message, also i tried rebooting the device multiple times and killing the Chromedriver, and it doesn't helped

@anotherlusitano
Copy link
Owner

Strange, just now I tested Chromedriver on two different devices and both gave me the same error when selecting media, I tried several times and tried to kill Chromedriver several times but nothing fixed it :(

the app doesn't even pass the first page, when i click the anime/serie or movie that i want to watch the app crashes

#----------DEVICE 1--------------# Google Chrome Version : 130.0.6723.69 (Installed Via Google Official) ChromeDriver Version : 130.0.6723.69 (Installed Via Google Official) Distro : Pop!_OS 22.04 LTS X86_64 Kernel Version : 6.9.3 RUST ERROR LOG :

thread 'main' panicked at /home/haru/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.0/src/session.rs:604:17: unexpected webdriver error; webdriver could not be reached (hyper_util): client error (Connect) #-----------DEVICE 2----------------# Google Chrome Version : 130.0.6723.69 (Installed via AUR with the package named as "google-chrome" ChromeDriver Version : 130.0.6723.58 (Installed via AUR with the package named as "chromedriver" Distro : "WSL2 Running Arch Linux" also called as "Arch Linux on Windows 10 x86_64" Kernel Version : 5.15.153.1-microsoft-standard-WSL2 RUST ERROR LOG :

thread 'main' panicked at /home/haru/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.0/src/session.rs:604:17: unexpected webdriver error; webdriver could not be reached (hyper_util): client error (Connect) #---------------------------#

the error occur in line 39 on the file "src/driver/start_driver.rs", the line in question is : ClientBuilder::native().capabilities(caps).connect("http://localhost:9515").await.expect("failed.await.expect(%22failed) to connect to WebDriver")

That error occurs because chromedriver is starting on a different port than 9515. I will make a quick fix.

anotherlusitano referenced this issue Oct 28, 2024
We do this so that the driver doesn't start on a random port.
@anotherlusitano
Copy link
Owner

Done.

@anotherlusitano
Copy link
Owner

This issue will probably take a few weeks to resolve due to university stuff.
Sorry for the inconvenience.

@anotherlusitano anotherlusitano added the help wanted Extra attention is needed label Dec 15, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants