Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Invalid Ajax response upon update

Started by Muut Archive 11 years ago · 13 replies · 850 views
11 years ago

I have Grav v0.9.39 with admin panel v0.4.2 installed in a shared hosting environment. When I try to update from within the admin panel, an error message pops up reading 'Invalid Ajax response', followed by the message: Error while trying to download 'https://github.com/getgrav/grav/releases/download/0.9.40/grav-update-v0.9.40.zip'. The same applies if I try to update a single plugin or theme.

I am pretty sure the hosting should meet the requirements (PHP 5.6 etc.) and this is not related to missing permissions. Any hints?

11 years ago

Might be an issue with something else on the server such as Curl. Have you ever been able to do an update on Grav, perhaps via the CLI with bin/gpm ???

11 years ago

I don't have access to the terminal, but curl is definitely installed.

11 years ago

Thanks, update triggers two XHR requests.

It seems as if 'task:updategrav' doesn't return anything. The response is '{}'.

The second task 'admin' appears to compare versions:
{"status":"success","payload":{"resources":{"total":3,"plugins":{"admi n":{"available":"0.4.3","version":"0.4.2"},"login":{"available":"0.3.1","version":"0.3.0"}},"themes":{"antimatter":{"available":"1.7.3","version":"1.7.2"}}},"grav":{"isUpdatable":true,"assets":{"grav-update":{"name":"grav-update-v0.9.40.zip","type":"application\/octet-stream","size":2279518,"download":"https:\/\/github.com\/getgrav\/grav\/releases\/download\/0.9.40\/grav-update-v0.9.40.zip"},"grav":{"name":"grav-v0.9.40.zip","type":"application\/octet-stream","size":3501676,"download":"https:\/\/github.com\/getgrav\/grav\/releases\/download\/0.9.40\/grav-v0.9.40.zip"}},"version":"0.9.39","available":"0.9.40","date":"2015-08-31T16:22:57Z","isSymlink":false},"installed":7,"flushed":false}}

11 years ago

Just to be sure, is cURL listed in [yoursite]/admin/info ?

11 years ago

Yes, curl is listed.

curl
cURL support enabled
cURL Information 7.36.0

11 years ago

Really would be helpful to have access to the terminal. What hosting provider do you use? I've yet to come across one that has no access, sometimes you just need to request it.

11 years ago

It's a rather small provider from germany called serverprofis.de.
Basically the same error applies if I try to add a plugin or a theme (except for the Ajax error).
I can confirm however, that automatic updates in WordPress or OctoberCMS for instance work perfectly.

11 years ago

It's kinda of hard to know what the error is.. Do you have access to your PHP logs?

11 years ago

PHP error logging is enabled, error_reporting is set to 'E_ALL'. As the support told me, the logs should be saved in the root folder of the script that produces an error.
Although I am repeatedly not able to update anything from the admin panel, there definitely is no 'error_log'. Guess I'm out of luck this time...

11 years ago

You can either 1) change hosting to something more "empowering" (see on our Learn site for some references) 2) build (and maintain) the site on localhost and update the remote site via FTP or other sync methods. I personally maintain all my sites locally and update them via Git post-commit hooks: once I push to my Git repository, the server updates automatically the site files for me.

11 years ago

Could it be that the error is somehow related to a missing certificate or something like that? See http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

I created a very basic script that tries to download from https://github.com on the server.
The output of curl_error is:
error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

A normal http url works just fine.

11 years ago

Yah we have to use HTTPS because GitHub requires it for API requests.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1334 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2939 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago