Closed pauljacobson closed 4 years ago
19845402-hc
If this is only happening to 1 or 2 sites, we should log to the Happiness Feedback P2 or Atomic Requests P2 to troubleshoot things like some of the post or page content flagging a security warning.
The Gutenberg core fix would like likely be a more friendly error message.
Tracking added by @noahtallen in https://github.com/Automattic/wp-calypso/pull/40035
Just commenting that we had another report in 2912227-zen. I did mention it in the P2 post where it's being tracked, but figured it was worth noting here too. The site in question doesn't have a lot of plugins, only our own and one social media icons plugin.
I've been able to recreate this somewhat consistently: it tends to happen when you have the editor open in multiple tabs/windows on your browser. I discovered it while batch-editing a bunch of posts on a personal site and it came up in two other cases here:
In all cases, closing all additional tabs/windows and refreshing the page of the one tab you are editing in will fix it. Hope this helps!
Let's get this one on the radar of the newly formed Gutenberg Platform Squad. cc @sirreal
linking this too with more debug info: p9F6qB-4PJ-p2
I have been exploring trying to reproduce this error. So far it seems to be specific to "Business" and "eCommerce" plans that have undergone the 'Automated Transfer' (AT) process. Jetpack'd atomic ephemeral sites and others do not seem to have the issue. 🤔
I can consistently reproduce the issue on those sites following these steps:
I am also able to reproduce this with only 1 instance of the editor open, however a bit less consistently:
I believe this may be stemming from the same root cause.
Thanks @Addison-Stavlo that's super helpful, I can replicate those first steps now. I'll do some more digging!
Have a user experiencing this issue today: 22862652-hc. Did a browser refresh and the issue was gone.
+--------------------+----------+-----------+---------+ | name | status | update | version | +--------------------+----------+-----------+---------+ | akismet | active | none | 4.1.6 | | amp | active | none | 1.5.5 | | classic-editor | inactive | none | 1.5 | | coblocks | active | none | 2.1.0 | | full-site-editing | active | none | 1.14 | | gutenberg | active | available | 8.3.0 | | jetpack | active | none | 8.7.1 | | layout-grid | active | none | 1.2.4 | | page-optimize | active | none | 0.5.0 | | pretty-link | active | none | 3.1.1 | | wpcomsh-loader | must-use | none | | | advanced-cache.php | dropin | none | | | object-cache.php | dropin | none | | +--------------------+----------+-----------+---------+
We didn't do a plugin conflict test during the chat (as I recommended the copy/paste workaround, but noting this case here
Another one in #23143308-hc. Plugins (same error with Gutenberg activated):
+--------------------+----------+-----------+---------+ | name | status | update | version | +--------------------+----------+-----------+---------+ | akismet | active | none | 4.1.6 | | amp | active | none | 1.5.5 | | classic-editor | inactive | none | 1.5 | | coblocks | active | none | 2.1.0 | | full-site-editing | active | none | 1.14 | | gutenberg | inactive | available | 8.3.0 | | jetpack | active | none | 8.8 | | layout-grid | active | none | 1.2.4 | | page-optimize | active | none | 0.5.0 | | wordpress-seo | active | none | 14.6.1 | | wpcomsh-loader | must-use | none | | | advanced-cache.php | dropin | none | | | object-cache.php | dropin | none | | +--------------------+----------+-----------+---------+
PHP-Errors [03-Aug-2020 20:30:35 UTC] PHP Warning: json_decode() expects parameter 1 to be string, array given in /wordpress/plugins/wpcomsh/2.4.128/wpcomsh.php on line 1067
User said it only showed up in Safari, and no amount of browser diagnostics could remove it. Everything works fine in Chrome.
Copied page code to another post to save their page content. After coming out of the original post the editor worked fine again.
This user has had the issue before and ticks the "too many copies of the same page" and "leaving open too long" boxes.
Some things I've noticed so far: Yea, this is hard to debug without being able to reproduce it on ephemeral sites, simple sites, or simulating the api call that's being made 🤔 but Addie's repro instructions work consistently👍.
When the "editing toolkit" is disabled, the page autosaves successfully
That's definitely an interesting find :thinking:
on second thought, it looks like that was a red herring, I'm not sure why I stopped being able to reproduce the bug when I deactivated the plugin.... but then I re-activated it and still couldn't reproduce the bug... the joys of this kind of debugging, hmmm I almost wonder if I've found a support workaround that I don't understand yet 😂
ahh weird!
Another report here: 23659379-hc
As a workaround, the user was able to create a new post from the wp-admin dashboard
on second thought, it looks like that was a red herring, I'm not sure why I stopped being able to reproduce the bug when I deactivated the plugin.... but then I re-activated it and still couldn't reproduce the bug... the joys of this kind of debugging
I know this pain all too well and sympathize with the frustration. 😭 🙃
hmm I got very stuck on this and was no longer able to reproduce it on my test site or my other test site or even a new atomic site 🤔 did this issue just fix itself with a gutenberg update or something?
Also, I've been thinking about this at a higher level. When a user is in this situation with two editors open, they are actually already set up for failure. Whether that is lost updates or potential unhandled cases like this, I think that a better approach would be to attempt to discourage users from using two editors at the same time pbxlJb-ms-p2
also, this is the P2 thread where this was originally reported for more context/cases p9F6qB-4PJ-p2. I tried again to reproduce this and still can't get it to manifest itself any more
Noting we see this with some frequency in the forums (not often tagged consistently but there's this). I'm not sure about the JSON thing. What we see is that the auto save has failed and kinda hung up. People see a similar issue with saving drafts.
I experienced it once myself after stepping away for a bit. Had to copy my work and hard refresh, then paste again before I could save.
I experienced it once myself after stepping away for a bit.
Oh, that's a nice observation. Do we get this response if the nonce is expired or otherwise invalid?
Hi @roo2! I assigned myself to this issue if that's OK. Please LMK if you're working on it.
Hi @roo2! I assigned myself to this issue if that's OK. Please LMK if you're working on it. @alshakero
No, I really gave up on reproducing this and was looking to move forward changing how we handle two editors open at the same time instead. I hope you can make some progress on it! pbxlJb-ms-p2
I have been exploring trying to reproduce this error. So far it seems to be specific to "Business" and "eCommerce" plans that have undergone the 'Automated Transfer' (AT) process. Jetpack'd atomic ephemeral sites and others do not seem to have the issue. thinking
I can consistently reproduce the issue on those sites following these steps:
* Open a post in WP Admin & make small edit. Don’t save; leave tab open. * Switch to Calypso and open same post. Make edits and update post. * Switch back to WP Admin tab. JSON message has already appeared, presumably because auto save failed after the post was updated in Calypso. (may need to wait a minute, or even try hitting the 'Update' button) * The 403 error is observable both with auto-saves and trying to update manually from there:
I am also able to reproduce this with only 1 instance of the editor open, however a bit less consistently:
* Navigate to wp-admin in either the pages or posts management page. Do not load the editor. * In a separate tab: open calypso, navigate to your site, and open the editor for a page or post. * Tab back to wp-admin, checkbox a post, select the bulk action to 'trash' and 'apply' * Notice you are redirected to a 403 Screen.
I believe this may be stemming from the same root cause.
Thanks a lot for investigating how to reproduce this issue, Addison! And thanks Omar for the fix! ❤️
I just tried with Gutenberg 9.0 on Atomic and could reproduce it. I then tried with 9.1.1 and the issue didn't happen, then repeated the whole process, same results.
I'll close this issue, but feel free to re-open it if we find out this is still an issue.
Wonderful! I want to mention that the error The response is not a valid JSON response
can occur for several reasons. It looks like we've fixed the most common one which caused customers to report it on WordPress.com. But I want to mention that it is possible that we may see some intermittent reports of the issue which have different causes.
I had a user in the chat with this issue. Ref: 26847932-hc
The message could be replicated on all the pages on update. Good news is that it does not really stop the update but the notice keep appearing. Here is a link to the video to help test it: https://d.pr/v/eZb6Xt
Steps I tried to fix the behavior:
None of the above helped.
We had a discussion on this issue in the slack here: p1610098879495100-slack-C03TY6J1A
@noahtallen I am not re-opening the issue while adding this comment but tagging you so that you can take a look and take the necessary steps.
Feel free to let me know if I can help.
I've had a user in chat with this issue today too: 26801089-hc
The 'Update failed. The response is not a valid JSON response' message was replicated on all of their existing posts and pages, whenever they tried to use the editor or make any changes.
I suggested:
Thanks!
Another issue reported in 26446143-hc
It is unclear what is the root cause (previous workaround above did not help)
However, a quick plugin dance by deactivating all plugins, and reactivating them again addressed the issue.
Another customer reported this in 33120735-hc
Another customer reported this in 34780051-hc. I know this is closed but for logging sake am adding it here.
I was able to reproduce by adding the Blog Posts Block (on multiple posts), and trying to Update said post.
Workaround: used the Query Loop Block and recreated a Blog Posts loop manually.
The user on this ticket is also having this issue (4877980-zd-woothemes and 34780051-hc) and came back to us to share the issue persists. They added "even when the blog was published, nothing would display, same as when it wasn’t published. If I tried to update it, it would throw a JSON error and not publish or update anything."
They have had this issue for a while, The Blog page is now in the trash, so I asked the user if we could try to restore it.
Another case in 34570476-hc
Support References
This comment is automatically generated. Please do not edit it.
Another instance in 6667487-zen but that could also be due to the user's custom plugin - they're trying to insert a shortcode and that seems to be when the error comes up.
Users on a WordPress.com Business plan have reported encountering the following error when attempting to publish posts and pages through Calypso:
As the original Happiness Engineer who reported the issue explained:
This issue seems to occur when a user starts working on a post or page, and then steps away for a period of time. The issue doesn't seem to be readily reproducible, so it's tricky to troubleshoot.
This issue has been reported here too: Updating failed. Error message: The response is not a valid JSON response - Centos 7 · Issue #18783 · WordPress/gutenberg.
This issue is for added visibility, as suggested here: p1585558290023800-slack-C02FMH4G8 (the link to the expanded, internal report is in that discussion thread).
Context / Source
Multiple user reports over the course of several months.