twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
73 stars 6 forks source link

Intermittent Error 400 (Invalid Cursor) from Helix Streams API #91

Open xokocodo opened 4 years ago

xokocodo commented 4 years ago

Brief description Around 12:30 PT on 2020-04-17 I began seeing errors with pagination on the Helix Streams endpoint. Here is the response: Body: {"error":"Bad Request","status":400,"message":"invalid cursor"}

Here is an example chain of pagination before hitting the error:

https://api.twitch.tv/helix/streams?first=100&type=all
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqbzVOakl5Tmk0MU5Ua3hNemszT1RreU1pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjkgZXlKeklqbzFNek0zTGpRNE1qSTFOakEwTWprME5pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjk
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqbzFNekkxTGpnNE1EVTNOelV4TXpJeU1Td2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjkgZXlKeklqb3lOemd6TGpneE5EYzVNVFkwTkRRM056TXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3lOelk1TGpjMU5UVTVPVGt4TVRjek16VXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam94T0RRMkxqWXlNVEU0TlRFMU1EWTNNRGNzSW1RaU9tWmhiSE5sTENKMElqcDBjblZsZlE9PQ
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hPRE00TGpReE9UVTVORGswTnpneE1qRXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam94TXpRMUxqSTJPRFV3TmpZMk5UZ3pPVFlzSW1RaU9tWmhiSE5sTENKMElqcDBjblZsZlE9PQ
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hNelF6TGpZM01qY3pPRE15T0RVc0ltUWlPbVpoYkhObExDSjBJanAwY25WbGZRPT0gZXlKeklqb3hNREUzTGpBM016a3lNell5T1RVMU5pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjk
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hNREUwTGpjNE1qVTFORGt4TXpRNU5EUXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam8zTnprdU9EWTROak0xTkRVek5UUTVMQ0prSWpwbVlXeHpaU3dpZENJNmRISjFaWDA9

How to reproduce Hit https://api.twitch.tv/helix/streams?first=100&type=all and continue following the page tokens (after) until sometimes (~50%) hitting the error.

Expected behavior It should paginate normally without any errors.

Screenshots

Additional context or questions

djxy commented 4 years ago

I confirm, I have the same error since today. It is random.

Srizbi84 commented 4 years ago

I am facing the same issue. It was working fine yesterday, but today I get this error very often.

djxy commented 4 years ago

I did some tests and you have to retry the cursor when this happens. It seems the cursor is invalid for a certain moment then it works fine.

Srizbi84 commented 4 years ago

Confirmed it works on retry - thanks!!

marcospgp commented 4 years ago

4 days and no response from Twitch either here or on the forum?

Come on guys, this is a production API with many users. Our applications rely on your service being predictable 😄