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

EventSub WebSocket eventsub subscription endpoint doesn't send correct response payload #226

Closed
Xemdo opened this issue Apr 11, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Xemdo
Copy link
Contributor

Xemdo commented Apr 11, 2023

Brought to attention by @Awakened-Redstone

What is the problem?

When using EventSub WebSocket simulation, the endpoint localhost:8080/eventsub/subscriptions is available to emulate api.twitch.tv/helix/eventsub/subscriptions

The mock endpoint is returning the following data:

{
  "body": {
    "id": "3a5914c9-2dba-ebe8-b2c4-8ae90a04c114",
    "status": "enabled",
    "type": "channel.update",
    "version": "1",
    "created_at": "2023-04-11T18:12:24.4053977Z",
    "cost": 0,
    "condition": {
      
    },
    "transport": {
      "method": "websocket",
      "session_id": "39489cd5_9f9d8253",
      "connected_at": "2023-04-11T18:12:21.7012872Z"
    }
  },
  "total": 0,
  "max_total_cost": 10,
  "total_cost": 0
}

But the production endpoint is returning the following:

{
  "data": [
    {
      "id": "dd634805-672c-4673-accd-18eb1d5b1d03",
      "status": "enabled",
      "type": "channel.update",
      "version": "1",
      "condition": {
        "broadcaster_user_id": "57047445"
      },
      "created_at": "2023-04-11T18:08:28.936786622Z",
      "transport": {
        "method": "websocket",
        "session_id": "<removed>",
        "connected_at": "2023-04-11T18:08:24Z"
      },
      "cost": 0
    }
  ],
  "total": 1,
  "max_total_cost": 10,
  "total_cost": 0
}

Operating System

All

Architecture Version (x86, x64, arm, etc)

All

Steps to reproduce

  1. twitch event websocket start-server
  2. curl -kvl -X POST http://localhost:8080/eventsub/subscriptions -H "Client-ID: 4ofh8m0706jqpholgk00u3xvb4spct" -d '{"type":"channel.update","version":"1","condition":{"broadcaster_user_id": ""},"transport":{"method": "websocket","session_id": ""}}'
  3. curl -kvl -X POST http://api.twitch.tv/helix/eventsub/subscriptions -H "Client-ID: 4ofh8m0706jqpholgk00u3xvb4spct" -d '{"type":"channel.update","version":"1","condition":{"broadcaster_user_id": ""},"transport":{"method": "websocket","session_id": ""}}'
  4. Compare

Can use https://xemdo.github.io/twitch-websocket-tester/ to compare with DevTools instead of curl

Relevant log output

No response

@Xemdo Xemdo added the bug Something isn't working label Apr 11, 2023
@Xemdo Xemdo self-assigned this Apr 11, 2023
@Xemdo Xemdo mentioned this issue Apr 11, 2023
4 tasks
@Xemdo Xemdo closed this as completed in a3fa945 Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant