Hard to tell exactly without knowing which piece of JSON-data it refers to, but I would expect that there is an unsupported character at the start of this piece of JSON. Like a non-unicode character which the system does not handle very well.
I’m not 100% sure, but everything seems fine so far, regarding the requirements on my remote server. I’ll dive deeper into this, as soon as I have a bit more time.
Thanks for your time and many many thanks for the brilliant CMS!
I had exactly the same error. In my case it was due to a bug in a plugin. This bug led to some text output during initialization of the plugin. This output was written to the html source code before the tag. It did not appear on the final webpage and it did not led to any misbehavior of the webpage. The only unusual behavior I could observe was the “fetch failure” error message, which appeared in the admin panel only. So maybe you should check in your browser, if your html source code starts with anything else but when the error message appears.
I just experienced the same issue once I updated to Grav 1.1.2 and related plugin updates for my long-running Grav site hibbittsdesign.org. Just on my live server, the same site running on MAMP seems fine.
The setting of check for updates to false also masks the issue for me in the short-term. Any further ideas?
I think it’s been established that there’s a plugin outputting data early. I’m not sure which plugin it is however. Did you check your HTML source and see if there was anything output before the HTML doctype as @karochris describes.
@paulhibbits, if you can PM me a zip of your site where it happens, I can try to replicate it locally and debug by turning off plugins until the error goes away.
I’ve been able to have this issue fixed with my super-awesome hosting company (https://reclaimhosting.com/) after they looked into the underlying causes of the server 500 errors being generated when GPM getUpdates() was called.
Here is the exact reply I got back from their support person, in case it might contain clues that may be helpful to others:
“It looks like this was being caused by CloudLinux, the resource allocation kernel we use (same software that allows the alternative PHP versions and a few other things in our shared hosting environment). The Apache log was reporting that it couldn’t allocate any memory to the process. I just adjusted some settings across all accounts for memory limits and I’m not seeing the error anymore. Let me know if it’s still happening in any of your installs, but seems like it wasn’t necessary related to the upgrade but server related.”
POST https://www.iainsgillis.com/admin/notifications.json/task:getNotifications 500 ()
o @ admin.min.js?92aed16245:4
value @ admin.min.js?92aed16245:4
(anonymous function) @ admin.min.js?92aed16245:4
t @ vendor.min.js?92aed16245:1
(anonymous function) @ admin.min.js?92aed16245:4
t @ vendor.min.js?92aed16245:1
(anonymous function) @ admin.min.js?92aed16245:1
(anonymous function) @ admin.min.js?92aed16245:1
t @ vendor.min.js?92aed16245:1
window.webpackJsonpGrav @ vendor.min.js?92aed16245:1
(anonymous function) @ admin.min.js?92aed16245:1
Unexpected token < in JSON at position 0 at SyntaxError: Unexpected token < in JSON at position 0
s @ admin.min.js?92aed16245:4
POST https://www.iainsgillis.com/admin/ajax.json/task:getnewsfeed 500 ()
o @ admin.min.js?92aed16245:4
value @ admin.min.js?92aed16245:4
value @ admin.min.js?92aed16245:4
(anonymous function) @ admin.min.js?92aed16245:4
j @ jquery-2.1.4.min.js?92aed16245:2
fireWith @ jquery-2.1.4.min.js?92aed16245:2
ready @ jquery-2.1.4.min.js?92aed16245:2
I @ jquery-2.1.4.min.js?92aed16245:2
Unexpected token < in JSON at position 0 at SyntaxError: Unexpected token < in JSON at position 0
s @ admin.min.js?92aed16245:4
These errors occur on any save/refresh/navigation within the admin panel.
There’s an additional instance of the same error when clearing the cache from within the admin panel:
GET https://www.iainsgillis.com/admin/cache.json/task:clearCache/admin-nonce:89a9b7f7b63b53d3ba786748d5c5fe25 500 ()
o @ admin.min.js?71de152ee2:4
value @ admin.min.js?71de152ee2:4
(anonymous function) @ admin.min.js?71de152ee2:4
dispatch @ jquery-2.1.4.min.js?71de152ee2:3
r.handle @ jquery-2.1.4.min.js?71de152ee2:3
I’ve checked the source of the render pages: nothing is being output before the initial <!DOCTYPE html>. Also: PHP memory limit is set to 128M.
Somehow related, perhaps: trying to update a plugin from the admin panel also hangs, with the server returning a 404 error for /admin/plugins.json/task:getPackagesDependencies. Similarly, the server returns a 500 error for /admin/backup.json/task:backup/admin-nonce:89a9b7f7b63b53d3ba786748d5 c5fe25.
Could all of these be related to the proxy setup? No problems whatsoever when doing any of the updates, backups, or cache-clearing from the CLI.
@rhukster Forest for the trees on my part. Thanks for setting me straight! First glance: rewrite or internal redirection cycle on – must have messed up something in the proxy configuration. I’ll dig into that properly tomorrow.