Jetpack: WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403

Created on 27 Mar 2018  路  31Comments  路  Source: Automattic/jetpack

I have been seeing this error on several sites/server configs in the past months:

WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403

It was also raised here and has been asked in _wordpress.org_ forums as well as _wordpress.com_ ones.
None of the answers fix the problem nor really fully address it.

Besides being logged into _wordpress.com_, is there a real solution to getting rid of this error in the console?

Notifications [Type] Bug [Type] Duplicate [Type] Happiness Request

Most helpful comment

Thanks for the report. This is currently being tracked internally, in 604-gh-notifications-client.

Until the issue is resolved, I would recommend one of the following work-arounds:

  • Log in to your WordPress.com account here.
  • If you use the Jetpack plugin on your site, go to this page and deactivate the Notifications feature:
    https://yoursite.com/wp-admin/admin.php?page=jetpack_modules

Closing as duplicate of 604-gh-notifications-client.

All 31 comments

Thanks for the report. This is currently being tracked internally, in 604-gh-notifications-client.

Until the issue is resolved, I would recommend one of the following work-arounds:

  • Log in to your WordPress.com account here.
  • If you use the Jetpack plugin on your site, go to this page and deactivate the Notifications feature:
    https://yoursite.com/wp-admin/admin.php?page=jetpack_modules

Closing as duplicate of 604-gh-notifications-client.

Just to add here that logging into WordPress.com doesn't fix the issue. I am logged in in Chrome and am still seeing the issue on my Jetpack-connected site.

@ChrisWiegman Could you send any header/response information from the browser console to us via https://jetpack.com/contact-support/ ? I haven't seen a case personally where logging into WordPress.com didn't resolve the issue.

Has this been solved? I am seeing the same error on a site I manage (delscookingtwist.com). Thanks.

@davidjbrossard Can you verify that you're logged into WordPress.com in that same browser? The error is expected when there is not an active WordPress.com session.

On a clean browser, having logged into wordpress.com first, I no longer see the error. Thanks.

The problem are still the same!!

[Error] WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Unexpected response code: 403

Get my page, or multiple sites full of them.

Is there any fix to this now ? A workaround login to wordpress.com doesn't work.

@unknys are you saying that logging into WordPress.com doesn't work or that you want a different solution?

Is there a functional issue you're seeing from these?

At this time, the 403 notice is expected when you're not logged into WordPress.com and while we're tracking this issue, we do not have a timeline for when we'll look at addressing it.

@krafrbj

That is exactly what i am saying. I also have done the following since everyone on support for wordpress.com/ord thinks its a jetpack problem.

But i have disabled the jetpack. And the problem still occur.

It seems it tries to connect to wordpress and wp.me.

So if jetpack is disabled and the same error comes up i doubt this has anything to do with jetpack. If you read the error messages. Really read them. And they are copied in here after jetpack was disabled.

Someone told me it was a http/1 problem and that it worked when they changed to using https/2.

There is also a error message on json connection, and wp.me widget which it tries to connect to like it tries to connect to api wordpress.

@unknys Could you contact us via this form and give us more details about your site there, so we can take a closer look at the issue with you?

Thank you!

Have you found a fix to this? I get the same error

@joshchretien Could you try the work-around here until this gets fixed?
https://github.com/Automattic/jetpack/issues/9170#issuecomment-376867824

I also got this error when visiting https://wordpress.com/stats/day:

WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403

It looks like this connection is blocked by wordpress.com backend.

And the solution https://github.com/Automattic/jetpack/issues/9170#issuecomment-376867824 here is also not working for me.

I have the same error, please notificate for any solution.

This issue keeps popping up with new Wordpress updates. I just updated to the latest 5.3.2 and starting getting this error yet again. Am logged in to Wordpress.com on the same browser but error still there:

WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403
v @ ?v=2.0:6
T @ ?v=2.0:6
o @ ?v=2.0:6

The resource referred to is https://public-api.wordpress.com/wp-admin/rest-proxy/?v=2.0 .
If I inspect the network requests I can see the request headers:

Request URL: wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data
Provisional headers are shown
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,it;q=0.8
Cache-Control: no-cache
Connection: Upgrade
Host: public-api.wordpress.com
Origin: https://public-api.wordpress.com
Pragma: no-cache
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Key: YUfdwsONaJcvTkLvsj9+GA==
Sec-WebSocket-Version: 13
Upgrade: websocket
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

I might also add that I have tried disabling Jetpack and re-enabling again, but the error doesn't go away. If I remember correctly when the error popped up a couple years ago I had to completely wipe Jetpack from my site and the do fresh re-install, and only then did this error go away. It would be a real bummer to have to do this every time there is wordpress update...

I have also noticed that this seems to be creating many many transients, I have about 150 transients that look like this:

1191269 | jpp_li_58836dc78c4a30caca9a3c65dbfaa02f | array | 9 mins | Edit聽\|聽Delete
1191264 | jpp_li_a4cadb090faddeb2ad8f930d1d90d1c8 | array | 50 mins | Edit聽\|聽Delete
1191262 | jpp_li_0626efe59c5a690b1413aea7feaa36b2 | array | 37 mins | Edit聽\|聽Delete
1191260 | jpp_li_08d9f9a97964cdd44008584519e8fddd | array | Expired | Edit聽\|聽Delete
1191250 | jetpack_is_single_user | 2 | 12 hours | Edit聽\|聽Delete
1191247 | jpp_li_436bfbc44891d9adb48033fc701d1c8a | array | 31 mins | Edit聽\|聽Delete
1191245 | jpp_li_a8d216b3ae57f3cbd36c3ff8b62af318 | array | 9 mins | Edit聽\|聽Delete
1191243 | jpp_li_5104e8ba91068c4e841fb996ee313f0c | array | 37 mins | Edit聽\|聽Delete
1191238 | jpp_li_5d8fb254bd6395e589b2e7ae92952c04 | array | 28 mins | Edit聽\|聽Delete
1191233 | jpp_li_39b839b2dc0772c3f714c96642cb4d71 | array | 25 mins | Edit聽\|聽Delete
1191228 | jpp_li_e39d8e9a59264707197312222c09e1b8 | array | 24 mins | Edit聽\|聽Delete
1191226 | jpp_li_51e18d45ec1f584f55271e0c6baf0bf7 | array | 16 mins | Edit聽\|聽Delete
1191221 | jpp_li_cebe179fa9e3777e9361e3c406bd54c2 | array | 18 mins | Edit聽\|聽Delete
1191216 | jpp_li_c0eb606293a346ea6fd0c29d3868d010 | array | 4 mins | Edit聽\|聽Delete
1191214 | jpp_li_163588b365211a690aad6136ee30884c | array | 8 mins | Edit聽\|聽Delete
1191209 | jpp_li_7c7cd87ef56820acadb16aad2bf9b207 | array | 2 mins | Edit聽\|聽Delete
1191207 | jpp_li_faf492abc5d40ecb8280756f4c5e32e9 | array | 6 mins | Edit聽\|聽Delete
1191202 | wpcom_social_media_icons_widget::is_active | 0 | 5 mins | Edit聽\|聽Delete
1191200 | jetpack_idc_allowed | 1 | 5 mins | Edit聽\|聽Delete
1191198 | jpp_li_7bf2af1be7269d037fd5623a8372f851 | array | Expired | Edit聽\|聽Delete
1191196 | jetpack_sync_constants_await | 1585263842.7331 | 3 mins | Edit聽\|聽Delete
1191194 | jpp_li_b75ad620f0014c454a8aaf9bdacc9cc4 | array | Expired | Edit聽\|聽Delete
1191186 | jpp_li_aad9a1161700e8b40f737f0dc01b5936 | array | Expired | Edit聽\|聽Delete
1191181 | jpp_li_831dbbc4a60c7560d3f24bc06a928645 | array | Expired | Edit聽\|聽Delete
1191176 | jpp_li_32eb8e48288fea55a0cca4b6b34c8547 | array | Expired | Edit聽\|聽Delete
1191174 | jpp_li_de5b180db20dc892ab220e98ebc94db1 | array | Expired | Edit聽\|聽Delete
1191169 | jpp_li_ef1236f650ff404027cae34a33d7a41c | array | Expired | Edit聽\|聽Delete

If I remember correctly when the error popped up a couple years ago I had to completely wipe Jetpack from my site and the do fresh re-install, and only then did this error go away.

That most likely won't help, as the error happens on WordPress.com. You can rest assured though, this won't impact any of the Jetpack features on your site, it only happens within the Notifications panel that is added to your site's admin bar and does not impact any other features.

I have also noticed that this seems to be creating many many transients, I have about 150 transients that look like this

Those transients are created by the Protect feature, so they're unrelated to the error you're seeing. They should get deleted by WordPress fairly quickly though, as they have a short expiration date. If expired transients are not being deleted from your site, I would recommend looking into any plugins that may change the behaviour of transients. It could be a caching plugin or a database optimization plugin. If transients are deleted properly, you shouldn't run into any issues.

I hope this clarifies things a bit.

I can confirm that disabling the notifications module does prevent the error from showing. There doesn't seem to be any way of getting there through the admin interface, but the direct link that you gave "/wp-admin/admin.php?page=jetpack_modules" does work

Hi,
I also have this error, over 30 notifications in my google console, all the same.

WebSocket connection to 'wss://public-api.wordpress.com/pinghub/wpcom/me/newest-note-data' failed: Error during WebSocket handshake: Unexpected response code: 403 ?v=2.0:6

There doesn't seem to be any way of getting there through the admin interface

@JohnRDOrazio You can get to that page by clicking on "Modules" in the footer of the Jetpack dashboard.

Another report of this in 2971386-zen - advising they disable notifications

Generally, this is still when someone is not logged into WordPress.com. First response for someone asking about it is checking if they're logged in.

@kraftbj we've got a case here where someone is logged in but still gets the error. Possibly due to Safari's new cookie rules?
https://wordpress.org/support/topic/403-forbiden-public-api-wordpress-com-pinghub-wpcom-me-newest-note-data-2/

@supernovia That's definitely possible, especially on Safari.

hello any solution for this?

@eliasasaid1 We do not have a solution yet, but it's worth noting that this bug should not impact your experience, it should not break anything on your site.

Hi.
I had exactly the same error on a medical hours booking website. It looped me and generated duplicate appointments, unpaid appointments did not remove from the calendar, everything was a disaster.
Disable the plugins:

  • JetPack (I don't use it)
  • Autoptimize (Cache Plugin)

If they're not using auto-optimization, try disabling the caching plugin for the site you're using.

I hope it serves you.

Bye.

Same error, when it will be fixed?? Thanks guys

3517667-zen - advised that they disable notifications.

This is closed as dupe of 604-gh-notifications-client. How do we track the progress of 604-gh-notifications-client?

How do we track the progress of 604-gh-notifications-client?

This is tracked internally, but we'll update this issue when we make progress on that problem.

Was this page helpful?
0 / 5 - 0 ratings