Situation: When publishing WordPress, you may receive this popup: Publish failed. The response is not a valid JSON response.
Resolution 1: Upgrade WordPress to latest version.
Resolution 2: Add classic-editor plugin.
Resolution 3: Reset Permalinks. Note: if the Permalinks are set different from before, you may have problem to run the post.