Open aeturnum opened 3 years ago
Hi @aeturnum - are you seeing the stream as offline after the webhook, or is it still marked as live in the Helix API?
Hey @lleadbet,
It seems like, after a brief initial period where both APIs see my account as streaming, they separate.
Here's a sample timeline from just now:
~9:38:00 PST - Start stream
09:38:27 PST - Server gets a webhook from twitch servers telling me the stream is up with the streaming payload as expected
09:38:49 PST - Server gets a 2nd webhook from twitch servers telling me the stream is down (the stream is not down)
I don't think it's always 30s, but pretty quickly the helix and kraken APIs start having different opinions. Helix thinks I'm not streaming and Kraken thinks I am.
Here's another set of httpie requests:
Thanks, and apologies for the delay in responses.
Are you still seeing this, and if so, what webhook are you using- Eventsub or Webhooks?
No problem @lleadbet, this is an odd bug and I'm sure y'all have more important ones.
I am using webhooks to get notified of streams - I don't think I've seen eventsub in the docs. Is that better maintained?
In any case, I just repeated starting my usual stream of the Microsoft™️ Edge™️ home screen. Once again, the Helix API shows nothing and the Kraken API shows the stream. However, this time I never got a notification even though I believe I have an active webhook subscription for my channel.
To be honest I have no idea how consistent this bug is - it always works when I'm testing, but I'm more of a developer than a streamer so I don't notice unless I'm working on some new feature.
Hi there! Just coming back to remind y'all that I can reproduce this 100% of the time:
Brief description I noticed this bug testing Twitch Streaming Webhooks. I will get a stream up notification, then very quickly after a stream down notification, though I have not stopped streaming.
I can easily confirm that this is a Helix bug because the V5 API shows the stream as up. My user_id is 503254 (as can be seen in the logs below)
Posting here based on advice from API forums: https://discuss.dev.twitch.tv/t/v5-api-correctly-shows-stream-is-up-but-helix-says-it-is-down/28877/2
How to reproduce 1) Start streaming 2) Wait an indeterminate period until twitch believes the stream has stopped 3) Try api requests:
Httpie requests to V5 and Helix APIs showing difference
``` ddrexler@Drexbook-Pro:conmon|$ http -v 'https://api.twitch.tv/kraken/streams/503254?stream_type=live' Client-Id:****************************** Authorization:"Bearer ******************************" Accept:application/vnd.twitchtv.v5+json GET /kraken/streams/503254?stream_type=live HTTP/1.1 Accept: application/vnd.twitchtv.v5+json Accept-Encoding: gzip, deflate Authorization: Bearer ****************************** Client-Id: ****************************** Connection: keep-alive Host: api.twitch.tv User-Agent: HTTPie/2.2.0 HTTP/1.1 200 OK Access-Control-Allow-Origin: * Cache-Control: no-cache, no-store, must-revalidate, private Connection: keep-alive Content-Length: 1287 Content-Type: application/json; charset=utf-8 Date: Mon, 02 Nov 2020 19:08:32 GMT Expires: 0 Pragma: no-cache Strict-Transport-Security: max-age=300 Timing-Allow-Origin: https://www.twitch.tv Vary: Accept-Encoding X-Cache: MISS, MISS X-Cache-Hits: 0, 0 X-Served-By: cache-sea4446-SEA, cache-sjc10023-SJC X-Timer: S1604344113.782850,VS0,VS0,VE45 { "stream": { "_id": 40320599246, "average_fps": 30, "broadcast_platform": "live", "channel": { "_id": 503254, "broadcaster_language": "en", "broadcaster_software": "", "broadcaster_type": "", "created_at": "2008-04-28T10:16:22.519482Z", "description": "Watch me be bad", "display_name": "aeturnum", "followers": 11, "game": "World of Warcraft", "language": "en", "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/aeturnum-profile_image-e52423744803803f-300x300.jpeg", "mature": false, "name": "aeturnum", "partner": false, "privacy_options_enabled": false, "private_video": false, "profile_banner": null, "profile_banner_background_color": "", "status": "Wow TBC Atlantiss", "updated_at": "2020-11-02T18:51:41.203231Z", "url": "https://www.twitch.tv/aeturnum", "video_banner": null, "views": 437 }, "community_id": "", "community_ids": [], "created_at": "2020-11-02T18:34:44Z", "delay": 0, "game": "World of Warcraft", "is_playlist": false, "preview": { "large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-640x360.jpg", "medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-320x180.jpg", "small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-80x45.jpg", "template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_aeturnum-{width}x{height}.jpg" }, "stream_type": "live", "video_height": 1080, "viewers": 1 } } ddrexler@Drexbook-Pro:conmon|$ http -v 'https://api.twitch.tv/helix/streams?user_id=503254' Client-Id:****************************** Authorization:"Bearer ******************************" GET /helix/streams?user_id=503254 HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate Authorization: Bearer ****************************** Client-Id: ****************************** Connection: keep-alive Host: api.twitch.tv User-Agent: HTTPie/2.2.0 HTTP/1.1 200 OK Access-Control-Allow-Origin: * Cache-Control: no-cache, no-store, must-revalidate, private Connection: keep-alive Content-Length: 27 Content-Type: application/json; charset=utf-8 Date: Mon, 02 Nov 2020 19:08:43 GMT Expires: 0 Pragma: no-cache Ratelimit-Limit: 800 Ratelimit-Remaining: 799 Ratelimit-Reset: 1604344124 Strict-Transport-Security: max-age=300 Timing-Allow-Origin: https://www.twitch.tv Twitch-Trace-Id: a2192f16be752294b9766cf3d2c96c52 Vary: Accept-Encoding X-Cache: MISS, MISS X-Cache-Hits: 0, 0 X-Ctxlog-Logid: 1-5fa0593b-2a00335f697aff2c181ad4a8 X-Served-By: cache-sea4466-SEA, cache-sjc10068-SJC X-Timer: S1604344123.049030,VS0,VS0,VE49 { "data": [], "pagination": {} } ```Expected behavior Both APIs would show the stream as up.
Additional context or questions It's entirely possible that I'm using the Helix API incorrectly, but I don't see how. I will leave my stream of the home page of Microsoft Edge live so others can test.