Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extensions/live pagination broken #540

Closed
BarryCarlyon opened this issue Dec 16, 2021 · 9 comments
Closed

extensions/live pagination broken #540

BarryCarlyon opened this issue Dec 16, 2021 · 9 comments
Labels
product: api API endpoints in the "helix" namespace ticketed Has been given an internal tracking ticket

Comments

@BarryCarlyon
Copy link
Contributor

BarryCarlyon commented Dec 16, 2021

Brief description

The pagination token is always OjI

How to reproduce

Call https://api.twitch.tv/helix/extensions/live?extension_id=es7m79v91nz4xxhzljdl3rpg9m1iuz&first=2

Observe a pagination of OjI

load it again get different results and the same pagination token, see #539

Call https://api.twitch.tv/helix/extensions/live?extension_id=es7m79v91nz4xxhzljdl3rpg9m1iuz&first=2&after=OjI

And get possible the same results and the same pagination token

Expected behavior

Pagination to work

@BarryCarlyon BarryCarlyon added the product: api API endpoints in the "helix" namespace label Dec 16, 2021
@BarryCarlyon
Copy link
Contributor Author

if you call using SoundAlerts ClientID, bttsqjy6dnv05acplp5vy0mflgrh3z

you get a pagination cursor

YVc1emRHRnNiQ014TURBek1qVTBNVGs2WW5SMGMzRnFlVFprYm5Zd05XRmpjR3h3TlhaNU1HMW1iR2R5YURONk9nOjY

Then if you call with an after with that cursor you get

YVc1emRHRnNiQ014TURBek1qVTBNVGs2WW5SMGMzRnFlVFprYm5Zd05XRmpjR3h3TlhaNU1HMW1iR2R5YURONk9nOjY

which is the same, and you get differnet records every time you load (see #539)

@beheh
Copy link

beheh commented Jan 16, 2022

I called this out in #524: after is wrong, but cursor works. So as a workaround you can use cursor for now.

@BarryCarlyon
Copy link
Contributor Author

BarryCarlyon commented Jan 17, 2022

call

https://api.twitch.tv/helix/extensions/live?extension_id=es7m79v91nz4xxhzljdl3rpg9m1iuz&first=10

{
	"data": [
		{
			"broadcaster_id": "32409994",
			"broadcaster_name": "BikeMan",
			"game_name": "Ready or Not",
			"game_id": "511701",
			"title": "‘Ready Or Not’ co-op with @ArielJadeLive @FevertheOctopus and Voidcrow! | Epic Creator Code: BIKEMAN #EpicPartner"
		},
		{
			"broadcaster_id": "742120758",
			"broadcaster_name": "AutumnTeien",
			"game_name": "Impossible Creatures",
			"game_id": "16303",
			"title": "Sprinting to the end! Probably cheating, because game is hard and I am smooth-brain!"
		},
		{
			"broadcaster_id": "125027110",
			"broadcaster_name": "CasasPlaysTV",
			"game_name": "God of War",
			"game_id": "6369",
			"title": "🔴 God of War PC 🎮 - Sunday Stream - Let's Play"
		},
		{
			"broadcaster_id": "478600384",
			"broadcaster_name": "StaticArbiter",
			"game_name": "Pokémon FireRed/LeafGreen",
			"game_id": "13332",
			"title": "[1st Playthrough/6th Attempt] 2 Year Affiliate Anniversary!! - Day #2 - POKEMON RADICAL RED [GBA] - !ffxiv"
		},
		{
			"broadcaster_id": "45993015",
			"broadcaster_name": "Elkinoo",
			"game_name": "Solasta: Crown of the Magister",
			"game_id": "514205",
			"title": "[FR] Solasta: Crown of the Magister \"Il perd la boussole ah ce taré !\" ©DamDSN"
		},
		{
			"broadcaster_id": "44704856",
			"broadcaster_name": "MockKinkajou",
			"game_name": "Phasmophobia",
			"game_id": "518184",
			"title": "Phas with my new horrog game friends :)"
		},
		{
			"broadcaster_id": "46775247",
			"broadcaster_name": "MemoryLeakDeath",
			"game_name": "Star Citizen",
			"game_id": "71375",
			"title": "More Sunday Citizen! | part 32"
		},
		{
			"broadcaster_id": "83327987",
			"broadcaster_name": "TheDoomgoose",
			"game_name": "RimWorld",
			"game_id": "394568",
			"title": "Goosemas Stream 8, Tunnel Clowns defending the Adorable Geese| !youtube !discord !rimmods"
		},
		{
			"broadcaster_id": "42596998",
			"broadcaster_name": "Arovyn",
			"game_name": "Alan Wake Remastered",
			"game_id": "1293419931",
			"title": "Alan Wake Remastered | Supernatural Sunday | DLC"
		},
		{
			"broadcaster_id": "42012172",
			"broadcaster_name": "xPELEx",
			"game_name": "God of War",
			"game_id": "6369",
			"title": "God of War continued | We gamin' | \\o/ |"
		}
	],
	"pagination": "OjEw"
}

then call

https://api.twitch.tv/helix/extensions/live?extension_id=es7m79v91nz4xxhzljdl3rpg9m1iuz&first=10&cursor=OjEw

{
	"data": [
		{
			"broadcaster_id": "45588989",
			"broadcaster_name": "FireStarW",
			"game_name": "Minecraft",
			"game_id": "27471",
			"title": "Exploring NEW caves. Also \"beating\" game for the first time as a 2012 oldster !mods"
		},
		{
			"broadcaster_id": "32409994",
			"broadcaster_name": "BikeMan",
			"game_name": "Ready or Not",
			"game_id": "511701",
			"title": "‘Ready Or Not’ co-op with @ArielJadeLive @FevertheOctopus and Voidcrow! | Epic Creator Code: BIKEMAN #EpicPartner"
		},
		{
			"broadcaster_id": "44704856",
			"broadcaster_name": "MockKinkajou",
			"game_name": "Phasmophobia",
			"game_id": "518184",
			"title": "Phas with my new horrog game friends :)"
		},
		{
			"broadcaster_id": "83327987",
			"broadcaster_name": "TheDoomgoose",
			"game_name": "RimWorld",
			"game_id": "394568",
			"title": "Goosemas Stream 8, Tunnel Clowns defending the Adorable Geese| !youtube !discord !rimmods"
		},
		{
			"broadcaster_id": "1876588",
			"broadcaster_name": "jonnysamsara",
			"game_name": "Sea of Thieves",
			"game_id": "490377",
			"title": "Dream Stream - Sea of Fashion"
		},
		{
			"broadcaster_id": "42596998",
			"broadcaster_name": "Arovyn",
			"game_name": "Alan Wake Remastered",
			"game_id": "1293419931",
			"title": "Alan Wake Remastered | Supernatural Sunday | DLC"
		},
		{
			"broadcaster_id": "478600384",
			"broadcaster_name": "StaticArbiter",
			"game_name": "Pokémon FireRed/LeafGreen",
			"game_id": "13332",
			"title": "[1st Playthrough/6th Attempt] 2 Year Affiliate Anniversary!! - Day #2 - POKEMON RADICAL RED [GBA] - !ffxiv"
		},
		{
			"broadcaster_id": "41367478",
			"broadcaster_name": "GeekEtiquette",
			"game_name": "Death Stranding",
			"game_id": "494364",
			"title": "Death Stranding (PC) First Playthrough | "
		}
	]
}

At the current time:

This returned Bikeman and TheDoomgoose on both pages for example and in a previous test this returned CasasPlaysTV and StaticArbiter on page 1 and page 2. (And other cross overs thats just a quick sample)

Using cursor instead of after doesn't solve the problem as the results are not "sorted" so you cannot obtain all results due to the data not being sorted or returned in a sorted fashion.

So Pagination is useless due to a funamental issue with the endpoint.

@KiKoS0
Copy link

KiKoS0 commented Feb 9, 2022

Yeah I noticed the issue couple of months ago, didn't know that there is an open issue for it so I went ahead and used the legacy V5 endpoint that worked pretty well.
Now I'm back to square one since the old endpoint is getting deprecated, this is really unfortunate because my app heavily relies on this endpoint's result.

@Breci
Copy link

Breci commented Feb 10, 2022

Can confirm and reproduce.
This bug is blocking my transition to helix because I rely on the live extension endpoint

@jbulava jbulava added the ticketed Has been given an internal tracking ticket label Feb 10, 2022
@jbulava
Copy link
Member

jbulava commented Feb 10, 2022

Ticketed for investigation.
HLX-2298

@jbulava
Copy link
Member

jbulava commented Feb 10, 2022

The issue has been confirmed. A change will be made so that the pagination token is read from after as documented. Given that some developers may have noticed that cursor can be provided for subsequent calls instead of after, we will look into which applications have made requests in this manner and communicate this update directly before removing the functionality that honors cursor as a query parameter for pagination.

@jbulava
Copy link
Member

jbulava commented Jun 6, 2022

The team has deployed the fix for this today.

@jbulava jbulava closed this as completed Jun 6, 2022
@BarryCarlyon
Copy link
Contributor Author

BarryCarlyon commented Jun 6, 2022

Looks good.

So just a question of the pagination cursor being malfromed compared to rest of helix, but the docs are correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: api API endpoints in the "helix" namespace ticketed Has been given an internal tracking ticket
Projects
None yet
Development

No branches or pull requests

5 participants