wtwitch icon indicating copy to clipboard operation
wtwitch copied to clipboard

[BUG] New Subscription puts "null" in config

Open kars0n777 opened this issue 10 months ago • 1 comments

Describe the bug I can't subscribe to a new twitch. I get Live channels:jq: error (at <stdin>:1): Cannot iterate over null (null) when I run wtwitch c

To Reproduce I ran wtwitch s pge4 then the end of my config was read "lastSubscriptionUpdate": "null" Then I remove the new subscription from my config and it works as expected.

Expected behavior I want to be able to subscribe to a channel and not have an error.

Logs/system info (please complete the following information):

  • Artix Linux Open RC 6.7.9-zen1-1-zen
  • wtwitch 2.6.3-1

debug.log before subscribing

debug.log after subscribing

kars0n777 avatar Mar 25 '24 04:03 kars0n777

lastSubscriptionUpdate being set to "null" when subscribing or unsubscribing is the usual behavior. That's not the source of your issue.

The issue is that before adding this new channel you are subscribed to exactly 100 channels. Afterwards it's 101, which exceeds the Twitch API's maximum number of URLs to return per page. Twitch likely only returns an error response instead of the stream data.

There's a pull request https://github.com/krathalan/wtwitch/pull/31 to paginate the API calls, but until then you will be limited to 100 subscriptions.

jfsen avatar Mar 27 '24 10:03 jfsen