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

Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead. #221

Open
mrkin opened this issue Jul 23, 2024 · 2 comments

Comments

@mrkin
Copy link

mrkin commented Jul 23, 2024

Error: TikTok does not offer a websocket upgrade. Please provide a valid `sessionId` to use request polling instead. -- and log error : please fix it!

WRAPPER @abcxyz : Error event triggered: Error while connecting, Error: Request failed with status code 403 1|server | { 1|server | info: 'Error while connecting', 1|server | exception: Error: Request failed with status code 403 1|server | at createError (C:\s2-tiktok\TikTok-Chat-Reader-main\node_modules\axios\lib\core\createError.js:16:15) 1|server | at settle (C:\s2-tiktok\TikTok-Chat-Reader-main\node_modules\axios\lib\core\settle.js:17:12) 1|server | at IncomingMessage.handleStreamEnd (C:\s2-tiktok\TikTok-Chat-Reader-main\node_modules\axios\lib\adapters\http.js:312:11) 1|server | at IncomingMessage.emit (node:events:525:35) 1|server | at endReadableNT (node:internal/streams/readable:1358:12) 1|server | at processTicksAndRejections (node:internal/process/task_queues:83:21) { 1|server | config: { 1|server | transitional: [Object], 1|server | adapter: [Function: httpAdapter], 1|server | transformRequest: [Array], 1|server | transformResponse: [Array], 1|server | timeout: 10000, 1|server | xsrfCookieName: 'XSRF-TOKEN', 1|server | xsrfHeaderName: 'X-XSRF-TOKEN', 1|server | maxContentLength: -1, 1|server | maxBodyLength: -1, 1|server | validateStatus: [Function: validateStatus], 1|server | headers: [Object], 1|server | responseType: 'arraybuffer', 1|server | method: 'get', 1|server | url: 'https://webcast.tiktok.com/webcast/im/fetch/?aid=1988&app_language=en-US&app_name=tiktok_web&browser_language=en&browser_name=Mozilla&browser_online=true&browser_platform=Win32&browser_version=5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F106.0.0.0+Safari%2F537.36&cookie_enabled=true&cursor=&internal_ext=&device_platform=web&focus_state=true&from_page=user&history_len=0&is_fullscreen=false&is_page_visible=true&did_rule=3&fetch_rule=1&last_rtt=0&live_id=12&resp_content_type=protobuf&screen_height=1152&screen_width=2048&tz_name=Europe%2FBerlin&referer=https%3A%2F%2Fwww.tiktok.com%2F&root_referer=https%3A%2F%2Fwww.tiktok.com%2F&host=https%3A%2F%2Fwebcast.tiktok.com&version_code=270000&webcast_sdk_version=1.3.0&update_version_code=1.3.0&room_id=7394757225468349192&verifyFp=verify_5b161567bda98b6a50c0414d99909d4b&_signature=_02B4Z6wo00f017F9coQAAIBDoq6GdmLyOxOxfXYAAIrJ45&X-Bogus=DFSzswSL5-kANGVptwz4tt9WcBjS', 1|server | data: undefined 1|server | }, 1|server | request: ClientRequest { 1|server | _events: [Object: null prototype], 1|server | _eventsCount: 7, 1|server | _maxListeners: undefined, 1|server | outputData: [], 1|server | outputSize: 0, 1|server | writable: true, 1|server | destroyed: true, 1|server | _last: true, 1|server | chunkedEncoding: false, 1|server | shouldKeepAlive: true, 1|server | maxRequestsOnConnectionReached: false, 1|server | _defaultKeepAlive: true, 1|server | useChunkedEncodingByDefault: false, 1|server | sendDate: false, 1|server | _removedConnection: false, 1|server | _removedContLen: false, 1|server | _removedTE: false, 1|server | strictContentLength: false, 1|server | _contentLength: 0, 1|server | _hasBody: true, 1|server | _trailer: '', 1|server | finished: true, 1|server | _headerSent: true, 1|server | _closed: true, 1|server | socket: [TLSSocket], 1|server | _header: 'GET /webcast/im/fetch/?aid=1988&app_language=en-US&app_name=tiktok_web&browser_language=en&browser_name=Mozilla&browser_online=true&browser_platform=Win32&browser_version=5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F106.0.0.0+Safari%2F537.36&cookie_enabled=true&cursor=&internal_ext=&device_platform=web&focus_state=true&from_page=user&history_len=0&is_fullscreen=false&is_page_visible=true&did_rule=3&fetch_rule=1&last_rtt=0&live_id=12&resp_content_type=protobuf&screen_height=1152&screen_width=2048&tz_name=Europe%2FBerlin&referer=https%3A%2F%2Fwww.tiktok.com%2F&root_referer=https%3A%2F%2Fwww.tiktok.com%2F&host=https%3A%2F%2Fwebcast.tiktok.com&version_code=270000&webcast_sdk_version=1.3.0&update_version_code=1.3.0&room_id=7394757225468349192&verifyFp=verify_5b161567bda98b6a50c0414d99909d4b&_signature=_02B4Z6wo00f017F9coQAAIBDoq6GdmLyOxOxfXYAAIrJ45&X-Bogus=DFSzswSL5-kANGVptwz4tt9WcBjS HTTP/1.1\r\n' + 1|server | 'Accept: text/html,application/json,application/protobuf\r\n' + 1|server | 'Connection: keep-alive\r\n' + 1|server | 'Cache-Control: max-age=0\r\n' + 1|server | 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36\r\n' + 1|server | 'Referer: https://www.tiktok.com/\r\n' + 1|server | 'Origin: https://www.tiktok.com\r\n' + 1|server | 'Accept-Language: en-US,en;q=0.9\r\n' + 1|server | 'Accept-Encoding: gzip, deflate\r\n' + 1|server | 'Cookie: ttwid=1%7CTX5vi9VOGqOJkzfd28A5MxndvW9xkSv1bNaEaWR6vP8%7C1721729689%7Cb340a6df7cc7b59d421f3133eae7cb20bd2ad995431b3934c4ab5b4a7a59d3a3; tt_csrf_token=A2eFKmXF-exfnjV7aROqdtSWe3Bres-RU5mQ; tt_chain_token=uPEOyAAwEhdlM67ODdsTow==; msToken=G1lr_8nRB3udnK_fFzgBD7sxvc0PK6Osokd1IJMaVPVcoB4mwSW-D6MQjTdoJ2o20PLt_MWNgtsAr095wVSShdmn_XVFS34bURvakVglDyWAHncoV_jVJCRdiJRdbJBi_E_KD_G8vpFF9-aOaJrk; \r\n' + 1|server | 'Host: webcast.tiktok.com\r\n' + 1|server | '\r\n', 1|server | _keepAliveTimeout: 0, 1|server | _onPendingData: [Function: nop], 1|server | agent: [Agent], 1|server | socketPath: undefined, 1|server | method: 'GET', 1|server | maxHeaderSize: undefined, 1|server | insecureHTTPParser: undefined, 1|server | path: '/webcast/im/fetch/?aid=1988&app_language=en-US&app_name=tiktok_web&browser_language=en&browser_name=Mozilla&browser_online=true&browser_platform=Win32&browser_version=5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F106.0.0.0+Safari%2F537.36&cookie_enabled=true&cursor=&internal_ext=&device_platform=web&focus_state=true&from_page=user&history_len=0&is_fullscreen=false&is_page_visible=true&did_rule=3&fetch_rule=1&last_rtt=0&live_id=12&resp_content_type=protobuf&screen_height=1152&screen_width=2048&tz_name=Europe%2FBerlin&referer=https%3A%2F%2Fwww.tiktok.com%2F&root_referer=https%3A%2F%2Fwww.tiktok.com%2F&host=https%3A%2F%2Fwebcast.tiktok.com&version_code=270000&webcast_sdk_version=1.3.0&update_version_code=1.3.0&room_id=7394757225468349192&verifyFp=verify_5b161567bda98b6a50c0414d99909d4b&_signature=_02B4Z6wo00f017F9coQAAIBDoq6GdmLyOxOxfXYAAIrJ45&X-Bogus=DFSzswSL5-kANGVptwz4tt9WcBjS', 1|server | _ended: true, 1|server | res: [IncomingMessage], 1|server | aborted: false, 1|server | timeoutCb: null, 1|server | upgradeOrConnect: false, 1|server | parser: null, 1|server | maxHeadersCount: null, 1|server | reusedSocket: false, 1|server | host: 'webcast.tiktok.com', 1|server | protocol: 'https:', 1|server | _redirectable: [Writable], 1|server | [Symbol(kCapture)]: false, 1|server | [Symbol(kBytesWritten)]: 0, 1|server | [Symbol(kEndCalled)]: true, 1|server | [Symbol(kNeedDrain)]: false, 1|server | [Symbol(corked)]: 0, 1|server | [Symbol(kOutHeaders)]: [Object: null prototype], 1|server | [Symbol(kUniqueHeaders)]: null 1|server | }, 1|server | response: { 1|server | status: 403, 1|server | statusText: 'Forbidden', 1|server | headers: [Object], 1|server | config: [Object], 1|server | request: [ClientRequest], 1|server | data: 1|server | }, 1|server | isAxiosError: true, 1|server | toJSON: [Function: toJSON] 1|server | } 1|server | }
@Wannes-Vanoyenbrugge
Copy link

Having the same problem.

@Wannes-Vanoyenbrugge
Copy link

Ah no, you just have to update lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants