Grav-plugin-admin: Error while trying to download (code:0):

Created on 28 Feb 2019  ·  24Comments  ·  Source: getgrav/grav-plugin-admin

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

question

Most helpful comment

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..

All 24 comments

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

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

i'm using shared hosting

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

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?

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..

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.

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.

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..

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. :)

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.

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.

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.

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.

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,

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

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.

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.

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

Shared MediaTemple Grid hosting..

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

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}')

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coolemur picture coolemur  ·  3Comments

ritchiedalto picture ritchiedalto  ·  6Comments

artofthesmart picture artofthesmart  ·  4Comments

dimayakovlev picture dimayakovlev  ·  5Comments

darkroastcreative picture darkroastcreative  ·  4Comments