twireapp / Twire

Twire is an alternative and open source Twitch client for Android
GNU General Public License v3.0
1.04k stars 58 forks source link

No transmision at all #314

Open p0k33m0n opened 2 years ago

p0k33m0n commented 2 years ago

2.10.2 - no transmissions at all (empty page), I do not logging into Twitch. On 2.10.1 everything works fine.

Nickwasused commented 2 years ago

tl:dr You need an account now.

Since Twitch is shutting down the V5 API, we need to use the new Helix API. But there is a problem because we need to send a token with every request: that requires you to be logged in. So no account = no data from Twitch.

vagosss commented 2 years ago

So devices with older versions of Android, e.g 4.2 that can't log in are doomed?

Nickwasused commented 2 years ago

At the moment it looks like it, but maybe we find another way.

Perflyst commented 2 years ago

Is it possible to use a hardcoded shared account for all Twire users which are not logged in? https://github.com/twireapp/Twire/blob/98cc91600aa3f2eb4cb93d05591e180a69c5d951/app/src/main/java/com/perflyst/twire/service/Settings.java#L516

Nickwasused commented 2 years ago

I think that there could be some problems with that:

  1. Twitch Terms of Service (https://www.twitch.tv/p/en/legal/terms-of-service/#4-account)

Unless expressly permitted in writing by Twitch, you may not [...], or provide access to your account to anyone else

  1. API Limits: 800 Requests to the API per minute could be a problem in the future

But there is something called "App access tokens" but I don´t know if we can use that.

App access tokens are meant only for server-to-server API requests and should never be included in client code.

Perflyst commented 2 years ago

Another alternative would be to go the "NewPipe way" and switch to unofficial APIs, but that would be a lot of work...

sphars commented 2 years ago

Can we have somewhere in the release notes or a popup in the app saying that signing into Twitch is required now? I don't use any account, which is why I like Twire, but I don't have an option now. I only knew about the requirement by seeing this issue.

yephny commented 2 years ago

It looks like the new release was not planned well. According to the release notes, v.2.10.2 "includes local follows, so you don't require a Twitch account to follow streamers", but you need an account to use Twitch anyway.

taraletti commented 2 years ago

In my case, have an account and I can't see any transmission. I get a sign of the video can't be played and must try in another resolution (besides that I don't know where to change that). I tried with different internet bandwidth. In the previous version everything was fine

KaMyKaSii commented 1 year ago

It's possible to use the yt-dlp method as it don't need an account?

yt-dlp -v --print-traffic https://twitch.tv/alanzoka -g
[debug] Command-line config: ['-v', '--print-traffic', 'https://twitch.tv/alanzoka', '-g']
[debug] Home config "yt-dlp.conf": ['-o', '/home/matheus/youtube-dl/%(extractor)s-%(uploader)s-%(title)s-%(format_id)s.%(ext)s', '--no-mtime', '--restrict-filenames']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f27] API
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.6 (CPython 64bit) - Linux-6.0.8-060008-generic-x86_64-with-glibc2.35 (glibc 2.35)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-108331-g257eea3db4-20220924 (setts), ffprobe N-108331-g257eea3db4-20220924
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, secretstorage-3.3.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] [twitch:stream] Extracting URL: https://twitch.tv/alanzoka
[twitch:stream] alanzoka: Downloading stream GraphQL
send: b'POST /gql HTTP/1.1\r\nContent-Length: 727\r\nHost: gql.twitch.tv\r\nContent-Type: text/plain;charset=UTF-8\r\nClient-Id: kimne78kx3ncx6brgo4mv6wki5h1ko\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
send: b'[{"operationName": "StreamMetadata", "variables": {"channelLogin": "alanzoka"}, "extensions": {"persistedQuery": {"version": 1, "sha256Hash": "1c719a40e481453e5c48d9bb585d971b8b372f8ebb105b17076722264dfa5b3e"}}}, {"operationName": "ComscoreStreamingQuery", "variables": {"channel": "alanzoka", "clipSlug": "", "isClip": false, "isLive": true, "isVodOrCollection": false, "vodID": ""}, "extensions": {"persistedQuery": {"version": 1, "sha256Hash": "e1edae8122517d013405f237ffcc124515dc6ded82480a88daef69c83b53ac01"}}}, {"operationName": "VideoPreviewOverlay", "variables": {"login": "alanzoka"}, "extensions": {"persistedQuery": {"version": 1, "sha256Hash": "3006e77e51b128d838fa4e835723ca4dc9a05c5efd4466c1085215c6e437e65c"}}}]'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Content-Length: 649
header: Content-Type: application/json
header: Access-Control-Allow-Origin: *
header: Content-Encoding: gzip
header: Date: Mon, 14 Nov 2022 22:21:50 GMT
[twitch:stream] alanzoka: Downloading stream access token GraphQL
send: b'POST /gql HTTP/1.1\r\nContent-Length: 391\r\nHost: gql.twitch.tv\r\nContent-Type: text/plain;charset=UTF-8\r\nClient-Id: kimne78kx3ncx6brgo4mv6wki5h1ko\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
send: b'{"query": "{\\n              streamPlaybackAccessToken(\\n                channelName: \\"alanzoka\\",\\n                params: {\\n                  platform: \\"web\\",\\n                  playerBackend: \\"mediaplayer\\",\\n                  playerType: \\"site\\"\\n                }\\n              )\\n              {\\n                value\\n                signature\\n              }\\n            }"}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Content-Length: 873
header: Content-Type: application/json
header: Access-Control-Allow-Origin: *
header: Date: Mon, 14 Nov 2022 22:21:50 GMT
[twitch:stream] 40491643225: Downloading m3u8 information
send: b'GET /api/channel/hls/alanzoka.m3u8?allow_source=true&allow_audio_only=true&allow_spectre=true&p=8565582&player=twitchweb&playlist_include_framerate=true&segment_preference=4&sig=95c5657796413d3266411a472c9a242d8ce3f012&token=%7B%22adblock%22%3Afalse%2C%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22blackout_enabled%22%3Afalse%2C%22channel%22%3A%22alanzoka%22%2C%22channel_id%22%3A38244180%2C%22chansub%22%3A%7B%22restricted_bitrates%22%3A%5B%5D%2C%22view_until%22%3A1924905600%7D%2C%22ci_gb%22%3Afalse%2C%22geoblock_reason%22%3A%22%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1668465710%2C%22extended_history_allowed%22%3Afalse%2C%22game%22%3A%22%22%2C%22hide_ads%22%3Afalse%2C%22https_required%22%3Atrue%2C%22mature%22%3Afalse%2C%22partner%22%3Afalse%2C%22platform%22%3A%22web%22%2C%22player_type%22%3A%22site%22%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22role%22%3A%22%22%2C%22server_ads%22%3Atrue%2C%22show_ads%22%3Atrue%2C%22subscriber%22%3Afalse%2C%22turbo%22%3Afalse%2C%22user_id%22%3Anull%2C%22user_ip%22%3A%22177.128.55.192%22%2C%22version%22%3A2%7D HTTP/1.1\r\nHost: usher.ttvnw.net\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: content-length: 7757
header: content-type: application/vnd.apple.mpegurl
header: date: Mon, 14 Nov 2022 22:21:50 GMT
header: x-amzn-trace-id: Root=1-00000000-000000000000000000000000
header: x-amzn-trace-id: Root=1-00000000-000000000000000000000000
header: cache-control: no-cache,no-store
header: connection: close
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 40491643225: Downloading 1 format(s): 1080p60__source_
https://video-weaver.sao03.hls.ttvnw.net/v1/playlist/CqME7HjeyDmCsvZ_N1ZqoWY4VetVw86avn-cHxGdO_tTgqmE9CvSZ42o5sqNmsvtusubwd6ZEZrGfo9wmPnEyz5xrtVHXP1dR-4XS2hoSTrStFvDSJE8c1rImS1JXTof9_IzOmTIV5MbtiWxBAIvbHeTT6jMTrePhv1If7nugPei51etoxEacIDuwifBIYxGUZ5VJ4TrQzhv0vwxgtBrWRlerCNwSitV4wNwmUspcWFwQm-ilfJgm8DT5O5eE9GLzL7huyUdK0kg_Y0NHJJawOkVwn-_33DonheoIf_AiGPOQj74RuyPC3dom2sK6kW2eBZwu_IZkdE9hfWMc3JZjFq_YhWuakCaCk_zRsL1QDF5y6fwoqIMdjffxB_b03q9IACNDl_-uA-D4Tvhi7Gbm7D1eKrtBBVqrDetojlQXkfgvrf4zFS7xppLfDN4Q-h2ybVtyPm9e1w70aKmyMARdw7V3KXDlHPEmkGFk3s4WSZwjt3fDakdAKCHNTFV9SvBRqQKqm6Qy5J57r5hDBmahHQua6tLuA3zuj-KfaQCt5IDB8VOPJMvYJdFlm3splhdWPHQVkgg9pXQNjjFjXcuO5h3VwovxKHg4sn2vubXeJQtj5wmhHP7LJASikqDOXpJeB-dRCb1y9UJ7IvH1wnPOA5hj_WHfz3u0_W4duNKhoZoD5PZzQJgWgSsLTfVRReM8L_2jnjk327C8xmDs8nq3b9XE6a-cBoMWalvbAaZ-Z9gaLQqIAEqCXVzLWVhc3QtMTDIAw.m3u8