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

Error while trying to download (code:0): #1626

Closed
gvdkooij opened this issue Feb 28, 2019 · 24 comments
Closed

Error while trying to download (code:0): #1626

gvdkooij opened this issue Feb 28, 2019 · 24 comments
Labels

Comments

@gvdkooij
Copy link

@gvdkooij gvdkooij commented Feb 28, 2019

When I try to upgrade Admin Panel (in the Admin Panel), from v1.8.17 to v1.8.19 I get the following error:

Error while trying to download (code:0):
https://getgrav.org/download/plugins/admin/1.8.19 Message: URL using bad/illegal format or missing URL

With SSH and GPM command it works fine.

40616

@rhukster
Copy link
Member

@rhukster rhukster commented Mar 10, 2019

Can you try switching from Curl to Fopen in the system config or vice versa?

@ninjaring
Copy link

@ninjaring ninjaring commented Mar 20, 2019

same case here. plus, i can't download any plugin

@ninjaring
Copy link

@ninjaring ninjaring commented Mar 20, 2019

i'm using shared hosting

@w00fz
Copy link
Member

@w00fz w00fz commented Mar 20, 2019

Can you check your php is the same for both cli and web server?

@w00fz
Copy link
Member

@w00fz w00fz commented Mar 20, 2019

Also can you let us know if this is the first time you are trying an update or if the issue just started showing up but you previously had successful updates?

@buitermark
Copy link

@buitermark buitermark commented Apr 10, 2019

I stubled upon this same problem also.
I think i now know a bit more about it.. Using it on a shared hosting also.

When i go into Configuration, and under System go to Advanced change External Fetch Method to "fopen" AND Remote Verify Peer (SSL) to "No" (although running with an cert from LetsEncrypt)
i'am suddenly able to download and install the updates again..

Maybe this works for others also..

@PixelPW
Copy link

@PixelPW PixelPW commented Apr 15, 2019

When i go into Configuration, and under System go to Advanced change External Fetch Method to "fopen" AND Remote Verify Peer (SSL) to "No" (although running with an cert from LetsEncrypt)
i'am suddenly able to download and install the updates again..

I had the same problem. This worked for me.

@mahagr
Copy link
Member

@mahagr mahagr commented Apr 16, 2019

You have likely too old version of SSL root certificates in your server. Those can usually be updated by upgrading the server software.

PS. this is different from your own server SSL certificate.

@buitermark
Copy link

@buitermark buitermark commented Apr 16, 2019

You have likely too old version of SSL root certificates in your server. Those can usually be updated by upgrading the server software.

PS. this is different from your own server SSL certificate.

The problem mentioned here is about Shared Hosting so, the only way of upgrading the SSL root certificate is asking the shared hosting provider, or move to another povider....
A user can't do anything else about the root cert of a shared host..

@mahagr
Copy link
Member

@mahagr mahagr commented Apr 16, 2019

What you just said raises a red flag for me. I would contact the hosting about the issue and if there's no response, move to somewhere else. There is no point of staying in a host which does not keep the servers up to date. :)

@ekenberg
Copy link

@ekenberg ekenberg commented May 23, 2019

Is there a way to recreate this error using curl from the commandline (ssh) on the server? This would help a lot when dealing with hosting providers to show the error and make it easier for them to verify that a root certificate upgrade really solves the problem.

@mahagr
Copy link
Member

@mahagr mahagr commented May 24, 2019

Yes, just get the data from your browser and convert it to be compatible to CURL -- I am pretty sure there are also tools for that. The only caveat is that you need to be logged in + have the nonce token, which means that the request needs to be changed slightly.

Though that said, It should not be hard to just give admin user and go through the steps to reproduce the issue. It'll likely take less time from everyone.

@ekenberg
Copy link

@ekenberg ekenberg commented May 24, 2019

Thank you @mahagr, but I think there's a misunderstanding. You talk about using curl to access grav admin pages to recreate the problem? I mean something else:

Since changing from curl to fopen in grav system config solves it, there should be a curl call from grav going wrong internally? It's that call I want to extract and recreate on the commandline.

@mahagr
Copy link
Member

@mahagr mahagr commented May 26, 2019

Oh, I got it this time -- using curl makes it fail and fopen solves the issue.

Basically, people are saying that changing setting Remote Verify Peer (SSL) to No fixes the issue, which means that the SSL certificates installed to the server are old.

@mahagr mahagr closed this as completed Jan 29, 2020
@IfThenElvis
Copy link

@IfThenElvis IfThenElvis commented Feb 9, 2020

I am on shared hosting and the issue was a blocked outgoing connection to an IP that I could whitelist in my webhost's control panel,

@ulittle
Copy link

@ulittle ulittle commented Mar 7, 2020

I stubled upon this same problem also.
I think i now know a bit more about it.. Using it on a shared hosting also.

When i go into Configuration, and under System go to Advanced change External Fetch Method to "fopen" AND Remote Verify Peer (SSL) to "No" (although running with an cert from LetsEncrypt)
i'am suddenly able to download and install the updates again..

Maybe this works for others also.

I updated to version 1.6.22 using the above steps - thank you.
Note: External Fetch Method on my version is Remote Fetch Method
Remote Fetch Method

@ulab
Copy link

@ulab ulab commented Mar 19, 2020

I am running into this issue myself (shared hosting, but I am the admin. Debian 9.12, packages are up to date).

Changing the Fetch Method to fopen and Remote Verify Peer to No doesn't help. I still get an Invalid AJAX response.

I can manually follow the redirects with curl -v and download the file in the end. So I thought I change the Fetch Method to cURL, same issue.

@ddoquang
Copy link

@ddoquang ddoquang commented May 4, 2020

I ran into this issue on a self-hosted CentOS 8 server. SELinux was blocking network connections for the httpd process.

Connect to the server by ssh and run the following (you need to be admin):
sudo sestatus -b |grep httpd_can_network_connect
Default is "off".

Set it to "on"
sudo setsebool -P httpd_can_network_connect 1

Once that is done the issue should be resolved.

@ezchile
Copy link

@ezchile ezchile commented Jun 16, 2020

Same issue here. Changed system to fopen and 'Remote Verify Peer (SSL)' to no.. No change, still errors out.

Shared MediaTemple Grid hosting..

@mahagr
Copy link
Member

@mahagr mahagr commented Jul 7, 2020

Grav 1.7 has improvements (using a Symfony library) on downloading updates. Can you try (in a test site) if they fix the issue?

@ezchile
Copy link

@ezchile ezchile commented Jul 7, 2020

Grav 1.7 has improvements (using a Symfony library) on downloading updates. Can you try (in a test site) if they fix the issue?

It's fixed downloading updates, though still shows 'fetch failed' for things like 'Purge Old Cache' ('Fetch Failed:
Purged 1 old cache folders...{"status":"success","message":null}')

@mahagr
Copy link
Member

@mahagr mahagr commented Jul 21, 2020

@ezchile Can you please create a new issue about this?

@ezchile
Copy link

@ezchile ezchile commented Jul 21, 2020

@mahagr Sure. I just have: #1935

@mahagr
Copy link
Member

@mahagr mahagr commented Jul 21, 2020

Thanks, it's easier to follow an open issue. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests