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 #187

Open
jetLuoxianjie opened this issue May 23, 2024 · 11 comments

Comments

@jetLuoxianjie
Copy link

jetLuoxianjie commented May 23, 2024

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

@jetLuoxianjie jetLuoxianjie changed the title Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead. catcherline Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead May 23, 2024
@jetLuoxianjie jetLuoxianjie changed the title catcherline Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead May 23, 2024
@grobekelle
Copy link

Unfortunately, I´ve the same issue since today.

`
WRAPPER @xyz: Error event triggered: Upgrade to websocket failed, Websocket connection failed, Error: Server responded with a non-101 status: 200 OK
Response Headers Follow:
content-length: 0
handshake-msg: DEVICE_BLOCKED
handshake-status: 415
tt_stable: 1
x-tt-trace-host: 01e433ed606f50fe17b03bcce88dcd1fde9f94321462e6c7ccf3289c35a8949125469dd848cb408eb2c5a24babcb6d743c1e413689a8614da286ec866fafafe6991bcdb8834699a16e555e6f7c9077fc56c7d6aa783bf6732ce406b344a11afcd3447ff2a5fed576b83899ea8acaed3294
x-tt-trace-id: 00-24052317233651F5A8C974F807C4E27F-3CDA7A2F25D344A7-00
server: TLB
x-tt-logid: 2024052317233651F5A8C974F807C4E27F
x-origin-response-time: 23,23.201.31.167
x-akamai-request-id: 3696814f.1a3f6e8d
expires: Thu, 23 May 2024 17:23:37 GMT
cache-control: max-age=0, no-cache, no-store
pragma: no-cache
date: Thu, 23 May 2024 17:23:37 GMT
x-cache: TCP_MISS from a2-17-34-213.deploy.akamaitechnologies.com (AkamaiGHost/11.5.1-56325026) (-)
connection: keep-alive
x-cache-remote: TCP_MISS from a23-201-31-167.deploy.akamaitechnologies.com (AkamaiGHost/11.5.0.1-56208139) (-)
x-tt-trace-tag: id=16;cdn-cache=miss;type=dyn
server-timing: cdn-cache; desc=MISS, edge; dur=85, origin; dur=23, inner; dur=21
x-parent-response-time: 107,2.17.34.213

{
info: 'Upgrade to websocket failed',
exception: 'Websocket connection failed, Error: Server responded with a non-101 status: 200 OK\n' +
'Response Headers Follow:\n' +
'content-length: 0\n' +
'handshake-msg: DEVICE_BLOCKED\n' +
'handshake-status: 415\n' +
'tt_stable: 1\n' +
'x-tt-trace-host: 01e433ed606f50fe17b03bcce88dcd1fde9f94321462e6c7ccf3289c35a8949125469dd848cb408eb2c5a24babcb6d743c1e413689a8614da286ec866fafafe6991bcdb8834699a16e555e6f7c9077fc56c7d6aa783bf6732ce406b344a11afcd3447ff2a5fed576b83899ea8acaed3294\n' +
'x-tt-trace-id: 00-24052317233651F5A8C974F807C4E27F-3CDA7A2F25D344A7-00\n' +
'server: TLB\n' +
'x-tt-logid: 2024052317233651F5A8C974F807C4E27F\n' +
'x-origin-response-time: 23,23.201.31.167\n' +
'x-akamai-request-id: 3696814f.1a3f6e8d\n' +
'expires: Thu, 23 May 2024 17:23:37 GMT\n' +
'cache-control: max-age=0, no-cache, no-store\n' +
'pragma: no-cache\n' +
'date: Thu, 23 May 2024 17:23:37 GMT\n' +
'x-cache: TCP_MISS from a2-17-34-213.deploy.akamaitechnologies.com (AkamaiGHost/11.5.1-56325026) (-)\n' +
'connection: keep-alive\n' +
'x-cache-remote: TCP_MISS from a23-201-31-167.deploy.akamaitechnologies.com (AkamaiGHost/11.5.0.1-56208139) (-)\n' +
'x-tt-trace-tag: id=16;cdn-cache=miss;type=dyn\n' +
'server-timing: cdn-cache; desc=MISS, edge; dur=85, origin; dur=23, inner; dur=21\n' +
'x-parent-response-time: 107,2.17.34.213\n'
}
WRAPPER @xyz: Error event triggered: Error while connecting, Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead.
{
info: 'Error while connecting',
exception: Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead.
at WebcastPushConnection.connect (C:\Node\node_modules\tiktok-live-connector\dist\index.js:300:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
WRAPPER @xyz: Connection failed, Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead.
`

@TTLiveStream
Copy link

FYI The devs are working a solution. Might be down for a bt. There is a new Sign Server upgrade that has recently happened / happening.

@bakteribaik
Copy link

Ever try this?

const tiktok = new WebcastPushConnection(username, {
    sessionId: 'put_your_session_id_here'
})

how to get session_Id?

  • open browser
  • go to tiktok.com
  • login
  • press F12
  • go to application tab
  • expand cookies
  • click on link
  • search session_id on that window

@zerodytrash
Copy link
Owner

Fixed. Please update the lib to v1.1.7. Thanks.

@qrq
Copy link

qrq commented May 24, 2024

Hi zerodytrash
Updated to v1.1.7 but Not working for me !
also in your demo page still give :

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

is it need to session id or something like that ?

i hope Unity team work quickly like Mr: zerodytrash

@qrq
Copy link

qrq commented May 24, 2024

I solve it by replace old index.js by new one , thanks

@khaitv0711
Copy link

I updated to v1.1.7 and also still got:
Error: TikTok does not offer a websocket upgrade. Please provide a valid sessionId to use request polling instead

@lacozy
Copy link

lacozy commented Jun 4, 2024

I still receive the same issue

@qrq
Copy link

qrq commented Jun 5, 2024

me too

@thesuperankes
Copy link

Same here

@fmalk
Copy link

fmalk commented Jun 30, 2024

Same, but using sessionId as per documentation works. However, I believe the solution will be to somehow retrieve this ID from a registered Tiktok App (TikTok Developers page), but I couldn't find info regarding how to authenticate my session this way from the API.

My guess is relying on my own user sessionId will either a) be ineffective since I'd have to update my code every time it changes and b) I might have my account blocked using it this way.

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

10 participants