Raised by @alisterscott
this Oauth error is that happens a lot in production

Anyone have an idea why it's happening, and how we can fix it?
Not sure if it's related, but I've seen an oAuth token warning in the WP.com REST API PHP error logs a lot recently (2 million cases per 12 hour periods), like:
OAuth2_Data::get_access_token_by_client_id_user_id_global_scope NO TOKEN
Are there any steps that you or @alisterscott might have taken to reproduce this error?
No, this happens intermittently when running our end-to-end signup automated tests against wordpress.com/start. There's no difference between test runs: sometimes it happens and sometimes it doesn't.
cc @drewblaisdell @scruffian for input
I see the oAuth PHP REST API warnings every day with every request 鈥斅爓hen sandboxing the WP.com public-api URL to my WP.com sandbox server.
Closing since no action in a few months. Feel free to re-open later if it's still happening.
@lancewillett are you able to consistently reproduce this? If so I'm happy to jump on screenhero and try to debug it...
Nope: but CC @alisterscott @hoverduck in case they've seen it in test results recently.
I feel like I saw it recently, but I just skimmed back through our failure screenshots on Slack and couldn't find it. So if it is still happening, it's not frequent.
Reopening - it's still not a frequent error, but it has been happening more recently. We'll try to narrow it down, or at least add more logging to the e2e tests to see when/why it happens.
By a rough count of the errors showing up in the Slack channels #e2eflowtesting-notif (Canary tests) and #e2e-full-suite-notif, this has happened in our tests ~18 times in the last month, since my last comment. So it's still not incredibly frequent compared to the number of times the tests are run overall, but it's not trivial.
Are there any server-side logs that indicate when this happens? If not, maybe adding some (if possible) is a good place to start for trying to narrow down the cause. Otherwise is there any data that we can try to capture in the e2e tests that would aid in troubleshooting? I've still never been able to reproduce it manually, unfortunately.
Another occurrence (twice) today

We haven't seen this for some time, closing now and we can reopen if we see this again
Most helpful comment
Reopening - it's still not a frequent error, but it has been happening more recently. We'll try to narrow it down, or at least add more logging to the e2e tests to see when/why it happens.