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

Suddenly getting an error with Google Drive images #145

Closed
raRaRa opened this issue Jul 30, 2018 · 9 comments
Closed

Suddenly getting an error with Google Drive images #145

raRaRa opened this issue Jul 30, 2018 · 9 comments
Assignees
Labels
bug Something isn't working completed Feature or request has been completed
Milestone

Comments

@raRaRa
Copy link

raRaRa commented Jul 30, 2018

Hi,

I've been using images.weserv.nl to serve images from my Google Drive folder, which has been working great for about a year now, but now I suddenly get this error:
Error 404: Server couldn't parse the ?url= that you were looking for, error it got: The requested URL returned error: 403

Example image from my Google Drive folder:
https://drive.google.com/uc?id=1PSjfciCTXp4Bqajr9EcXWxMHuWz6P2hC&export=view

and here's the one I'm using with images.weserv.nl:
https://images.weserv.nl/?url=ssl:drive.google.com%2Fuc%3Fid%3D1PSjfciCTXp4Bqajr9EcXWxMHuWz6P2hC%26export%3Dview

Any help would be much appreciated. Thanks!

@raRaRa raRaRa changed the title Suddenly getting an issue with Google Drive images Suddenly getting an error with Google Drive images Jul 30, 2018
@raRaRa
Copy link
Author

raRaRa commented Jul 30, 2018

Seems to be related to #141 since it still works with API 3:
https://images.weserv.nl/?url=drive.google.com%2Fuc%3Fid%3D1PSjfciCTXp4Bqajr9EcXWxMHuWz6P2hC%26export%3Dview&api=3

@andrieslouw @kleisauke

Thanks.

@andrieslouw andrieslouw added bug Something isn't working triage This issue is being investigated labels Jul 31, 2018
@andrieslouw andrieslouw added this to the v4.0.0 milestone Jul 31, 2018
@andrieslouw
Copy link
Member

Thanks for the report, and narrowing it down to API 4, we're looking into this issue!

@raRaRa
Copy link
Author

raRaRa commented Jul 31, 2018

Thanks for the quick response, much appreciated.

Any idea what could be causing this error for Google Drive links, is it related to the redirect or the link itself?

I'm wondering if I should fallback to API v3 until this has been fixed, is it safe to use v3?

Thanks!

@andrieslouw
Copy link
Member

The problem has been found in our urlencoding, which is not exactly according to rfc3986#section-2.2 nor rfc1738#section-2.2. Fixes are being written, but there are lot's of edge cases.

It looks like Google really likes to use the characters $-_.+!*'(), in the URL's they redirect to.

API 3 will still work for a while, but may end up to be redirected to API 4 in the future. It should not break anything though. I think the fix for API 4 will be in production today.

@raRaRa
Copy link
Author

raRaRa commented Jul 31, 2018

Thanks for the update!

@andrieslouw
Copy link
Member

Fix written, and being tested in our staging-environment. If we pass all the special cases, it will be pushed to this repo and to production 😄

@andrieslouw andrieslouw added completed Feature or request has been completed and removed triage This issue is being investigated labels Jul 31, 2018
@andrieslouw
Copy link
Member

Fixed!

@raRaRa
Copy link
Author

raRaRa commented Jul 31, 2018

Where do I send PayPal donations to? :)

@andrieslouw
Copy link
Member

https://github.com/weserv/images/wiki :

Since 2011 images.weserv.nl is privately funded, and used as a testbed for new techniques in resizing, recognition and processing. Operating costs of the image proxy are very low. To prevent conflicts of interest, we never accepted payments or donations in any form. (...)

But please subscribe to https://github.com/jcupitt/libvips/issues/592, I think it would be fair if donations go to libvips, as it does most of the heavy-lifting nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed Feature or request has been completed
Development

No branches or pull requests

3 participants