Code Monkey home page Code Monkey logo

Comments (5)

Zansabar avatar Zansabar commented on June 10, 2024

I am getting something similar - but it is a Header Overflow
It happens when I attempt to connect. I have two different machines that I run on and both are showing the same thing. I am a paid subscriber to TikFinity and that is working okay. So, i know the issue is with me.
I've attempted to update the connector library and the same result. Also, went forward with npm audit fix and no changes. I did an npm audit fix -force to try and resolve critical issues, this broke the code. After restoring from source control, back at this place.
For the record, this happened last week and then the next day was fine, so I thought nothing more of it until I tried yesterday to go live and use it. So, looking for suggestions on how to fix. Thank you for opening this issue up - looks like I'm not alone.

Error event triggered: Error while connecting, Error: Failed to retrieve room_id from page source. Parse Error: Header overflow
{
info: 'Error while connecting',
exception: Error: Failed to retrieve room_id from page source. Parse Error: Header overflow
at WebcastPushConnection._retrieveRoomId2 (node_modules\tiktok-live-connector\dist\index.js:499:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
}

from tiktok-live-connector.

Marksmanship256 avatar Marksmanship256 commented on June 10, 2024

I have the same issue, for some users roomInfo returns an empty result.

Code example:
2024-02-09_193450

Return example:
2024-02-09_193408

from tiktok-live-connector.

Zansabar avatar Zansabar commented on June 10, 2024

I was able to do digging more into this, but still need help. After signing up with a VPN service to see if this was the problem (I was advised in Discord that TT might be blocking my IP), I found that even with a new IP4, the problem persists. I downloaded and used the TiTokLiveSharp Unity version (because I'm C# dev) and found that the call to retrieve the room_id throws the "IP address might be blocked" message. However, if I use the Zerody Chatreader demo web page and KNOW the room_id ahead of time and can feed that to the C# program upon connecting, this appears to work. (I was thinking okay, just do that, but that is painful to go find the room_id manually each time when few others are having this problem.) So, digging into the node.js code under index.js line 492 is throwing the error... it doesn't even return much except for the page overflow error... here is the line

``let mainPageHtml = await _classPrivateFieldGet(this, _httpClient).getMainPage(@${_classPrivateFieldGet(this, _uniqueStreamerId)}/live);` `

I've gotten this far, but I cannot quite tell what the method "getMainPage" is doing and how to trouble shoot further. Could someone explain just a bit more...?

from tiktok-live-connector.

Zansabar avatar Zansabar commented on June 10, 2024

Digging deeper. Found that the async getMainPage(path) call within the tiktokHttpClient.js file is where the Parse error is coming from. The URL here appears to just be calling the simple tik tok live page of tha account that is live.
If I go to a browser, that URL works fine. I'm able to view source on that page and find the "room_id" no problem, which is the whole reason this library is calling this page in the first place... to get that room_id to move forward.
But, that parse error is the killer! I've tried to inspect the response from it, by adjusting this code:

async getMainPage(path) {
    let response = await _classPrivateMethodGet(this, _get, _get2).call(this, `${Config.TIKTOK_URL_WEB}${path}`);
	 console.log('Main Page Response:', response.data); // Log the response data
    return response.data;
}

but it never comes back and throws that catch in "index.js" with the "Parse error: Header overflow"

Thinking that we we have a large header for some reason that the default axios library cannot handle...
I've added a line to that axiosInstance to increase the response size to 1GB
maxContentLength: 1000000000, // Adjust the maximum response size as needed

That didn't work.

This seems to be isolated to myself and maybe a couple others who are trying to use this library.
Any thoughts on other options or routes to try and solve this?

from tiktok-live-connector.

Zansabar avatar Zansabar commented on June 10, 2024

Finally found my issue on this. My node js was WAY out of date! I was still on ver 12. Upgraded to version 21 and we this error is no longer an issue for me. I have other issues now, The dreaded Missing Cursor in Initial Fetch Response and the Websocket upgrade one that appears to plague everyone here and there. I'll address these in another post.

from tiktok-live-connector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.