You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lychee shows network error: forbidden for valid links #733
Nope, no update. I don't think I can help much here. 🙁 It works over here, so it's definitely a problem with the server preventing certain clients from getting access. It's not something we can fix in lychee.
root@22c7cf489de3:/geturl-test# cargo run --no-default-features --features curl -- 'https://catboost.ai'
Downloaded curl v0.4.44
Downloaded libz-sys v1.1.8
Downloaded curl-sys v0.4.56+curl-7.83.1
Downloaded 3 crates (5.5 MB) in 2.91s (largest was `curl-sys` at 3.0 MB)
Compiling curl v0.4.44
Compiling libz-sys v1.1.8
Compiling curl-sys v0.4.56+curl-7.83.1
Compiling socket2 v0.4.7
Compiling tectonic_geturl v0.0.0-dev.0 (/geturl-test)
error[E0599]: no method named `status_code` found forstruct `std::io::Cursor`in the current scope
--> src/bin/geturl.rs:21:40
|
21 |let status_code = response.status_code();
| ^^^^^^^^^^^ method not found in`std::io::Cursor<Vec<u8>>`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `tectonic_geturl` due to previous error
root@22c7cf489de3:/geturl-test#
Okay thanks. The second one should not have failed. It's an error on my end. However I do expect it to fail just like the first test with request.
At least the results have always been consistent between them on my end.
For the last one, which is the most promising one. You need to install boringssl for that first.
No updates, but if I find the time I will create a pull request to integrate reqwest impersonate as a fallback backend. It will be an optional library feature, but it will be enabled by default in the binary.
It's a great match because I want to refactor the client code anyway soon.
Thanks for the reminder.
Bad news. I wanted to integrate this, but I don't think it's possible right now. reqwest-impersonate patches some dependencies (e.g. hyper) and therefore cannot be published on crates.io. If we integrate it into lychee, that means we couldn't publish the library on crates.io either even if we put reqwest-impersonate behind a feature flag, which is disabled by default.
See rust-lang/cargo#6738.
Is there a possibility that I don't see right now?
As much as I would like this to be part of lychee, I don't think there is an easy solution right now.
Unless the upstream crate can get published on crates.io we don't stand a chance at integrating it.
I've created an upstream issue at 4JX/reqwest-impersonate#2.
Seems like there isn't much upstream traction, and it's not something we can fix on our side, so I'm gonna go ahead and close this. If the upstream issue gets fixed, we can reopen and integrate reqwest-impersonate.
Apologies if this is not the outcome y'all were hoping for, but I think we need to find another way.
Activity
mre commentedon Aug 14, 2022
Hum, looks like it's an issue on your end. 🤔 At least it works over here:
Can you try from a different network? Or maybe reconnect to your wifi? Maybe it also was just a temporary hickup?
Rizwan-Hasan commentedon Aug 14, 2022
Hi @mre ,
It originally happened on github action. Same happened after I tried it on my local pc. Ran it several time on github action too and still the same.
Here's the recent github action log https://github.com/Rizwan-Hasan/clearml-docs/runs/7825833483
And this is 3 days earlier https://github.com/Rizwan-Hasan/clearml-docs/runs/7787255012
We need it to work on GitHub Action.
mre commentedon Aug 14, 2022
Oh I see. No clue what's going on there yet.
Rizwan-Hasan commentedon Aug 14, 2022
Any idea how to make it work?
Rizwan-Hasan commentedon Aug 14, 2022
I just tried it on another cloud server and same error.
mre commentedon Aug 14, 2022
What's strange is that it works for me. So it must be something that's wrong with the client-side.
Some thoughts:
I'm afraid there ain't much I can do on my end other than asking questions. 😅
Rizwan-Hasan commentedon Aug 14, 2022
On your thoughts,
Rizwan-Hasan commentedon Aug 14, 2022
I've created a new git repository to make a mock test. And the result is negative.
Repository: https://github.com/Rizwan-Hasan/test-lychee-links
Logs: https://github.com/Rizwan-Hasan/test-lychee-links/runs/7826437363
Rizwan-Hasan commentedon Aug 15, 2022
Hi @mre ,
Any update?
mre commentedon Aug 16, 2022
Nope, no update. I don't think I can help much here. 🙁 It works over here, so it's definitely a problem with the server preventing certain clients from getting access. It's not something we can fix in lychee.
Rizwan-Hasan commentedon Aug 16, 2022
Understood. But it's not working on my local PC and Linode server also. I'm confused. So, three places in a row it's not working.
mre commentedon Aug 16, 2022
Yeah that's definitely weird. If anyone can help out narrow this down, please run the following command on your machine and report back the result.
Rizwan-Hasan commentedon Aug 16, 2022
With lychee it's not working
On the other hand working with curl
mre commentedon Aug 16, 2022
Does this work for you?
13 remaining items
Rizwan-Hasan commentedon Oct 28, 2022
@mre Hi, of course.
I pulled a docker image
docker pull rust, pulled the repository geturl-test then ran as the readme guided. Here're the logmre commentedon Oct 28, 2022
Okay thanks. The second one should not have failed. It's an error on my end. However I do expect it to fail just like the first test with request.
At least the results have always been consistent between them on my end.
For the last one, which is the most promising one. You need to install boringssl for that first.
mre commentedon Oct 28, 2022
...and for boringssl you need to install
cmakefirst. https://cmake.org/install/Rizwan-Hasan commentedon Oct 28, 2022
I had to install
cmakeandclangboth to work. Here's the logmre commentedon Oct 28, 2022
Dang. It works. 😞
That means if we integrate that backend into lychee it would solve your issue.
Two questions (@lebensterben)
lebensterben commentedon Oct 30, 2022
@mre
I don't know the answer for the second question.
For the first one, I suggest to test it on other related issue where browsers are able to open a URL but curl and lychee are not.
mre commentedon Nov 5, 2022
Good idea. Did some tests but haven't found other use-cases yet where this fixes the problem. I'll keep this on hold until then.
mre commentedon Nov 11, 2022
Similar case that got resolved with browser impersonation:
#819
Thinking about adding reqwest-impersonate as a fallback to handle such cases.
Rizwan-Hasan commentedon Jan 11, 2023
Hi @mre,
Is there any update regarding the issue❔
We're still facing it. 😥
mre commentedon Jan 11, 2023
No updates, but if I find the time I will create a pull request to integrate reqwest impersonate as a fallback backend. It will be an optional library feature, but it will be enabled by default in the binary.
It's a great match because I want to refactor the client code anyway soon.
Thanks for the reminder.
Rizwan-Hasan commentedon Jan 11, 2023
That's great. Looking forward to the release then. 🙂
mre commentedon Mar 3, 2023
Bad news. I wanted to integrate this, but I don't think it's possible right now.
reqwest-impersonatepatches some dependencies (e.g. hyper) and therefore cannot be published on crates.io. If we integrate it into lychee, that means we couldn't publish the library on crates.io either even if we putreqwest-impersonatebehind a feature flag, which is disabled by default.See rust-lang/cargo#6738.
Is there a possibility that I don't see right now?
mre commentedon Mar 16, 2023
As much as I would like this to be part of lychee, I don't think there is an easy solution right now.
Unless the upstream crate can get published on crates.io we don't stand a chance at integrating it.
I've created an upstream issue at 4JX/reqwest-impersonate#2.
mre commentedon Apr 18, 2023
Seems like there isn't much upstream traction, and it's not something we can fix on our side, so I'm gonna go ahead and close this. If the upstream issue gets fixed, we can reopen and integrate
reqwest-impersonate.Apologies if this is not the outcome y'all were hoping for, but I think we need to find another way.