Coder Social home page Coder Social logo

Comments (12)

acrogenesis avatar acrogenesis commented on July 17, 2024

haha, it freaked me out a bit until I noticed it was this application. I've been trying to find the parameters WebKit supports but I haven't been successful.

Edit: I changed webkit to chromium and it seems to work fine

from tiktok-signature.

jonas-meng avatar jonas-meng commented on July 17, 2024

haha, it freaked me out a bit until I noticed it was this application. I've been trying to find the parameters WebKit supports but I haven't been successful.

Edit: I changed webkit to chromium and it seems to work fine

Sorry to bother, I find it quite odd that seems the signer initiation doesn't work on server?
You can start it on PC without problem.

from tiktok-signature.

acrogenesis avatar acrogenesis commented on July 17, 2024

Be sure to have WebKit or chromium installed and working on your server. Although I believe your issue isn't related to this.

from tiktok-signature.

carcabot avatar carcabot commented on July 17, 2024

I have fixed temporary the audio on version v1.1.6

NOTE
Replacing webkit with chromium will not work generating signature for user/detail

from tiktok-signature.

jonas-meng avatar jonas-meng commented on July 17, 2024

I have fixed temporary the audio on version v1.1.6

NOTE
Replacing webkit with chromium will not work generating signature for user/detail

Indeed, webkit hasn't been banned by Tiktok I believe whereas signature from chromium is completely useless for user detail.

I also ran into a issue seems related to playwright webkit.
All the args that passed to webkit.launch() seems cannot be parsed properly on server context (I've installed playwright along with browsers correctly), causing failure on browser launching.
But it works fine when I launch it on PC.

Do you have any idea?

from tiktok-signature.

carcabot avatar carcabot commented on July 17, 2024

Try to debug your error using

DEBUG=* node browser.js ""

It should show up what's missing, probably you have to install a library missing or something.

from tiktok-signature.

jonas-meng avatar jonas-meng commented on July 17, 2024

Try to debug your error using

DEBUG=* node browser.js ""

It should show up what's missing, probably you have to install a library missing or something.

It doesn't warning me about missing.
Instead, it just complain about cannot parse arguments.

The webkit browser launches correctly if I don't specify any following options on server.

I paste the details as follows:
pw:browser:err Cannot parse arguments: Unknown option --no-sandbox +0ms
(node:4873) UnhandledPromiseRejectionWarning: Error: Protocol error (Playwright.createContext): Browser has been closed.
at /root/tiktok-signature/node_modules/playwright-core/lib/webkit/wkConnection.js:102:63
at new Promise ()
at WKSession.send (/root/tiktok-signature/node_modules/playwright-core/lib/webkit/wkConnection.js:101:16)
at WKBrowser.newContext (/root/tiktok-signature/node_modules/playwright-core/lib/webkit/wkBrowser.js:65:65)
at WKBrowser. (/root/tiktok-signature/node_modules/playwright-core/lib/helper.js:64:31)
at Signer.init (/root/tiktok-signature/index.js:48:39)
(Use node --trace-warnings ... to show where the warning was created)
(node:4873) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4873) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
pw:browser <process did exit 1, null> +130ms

from tiktok-signature.

carcabot avatar carcabot commented on July 17, 2024

Ok, I see, try to remove --no-sandbox argument from index.js file

from tiktok-signature.

jonas-meng avatar jonas-meng commented on July 17, 2024

Ok, I see, try to remove --no-sandbox argument from index.js file

Maybe I didn't make myself clear.
Based on my test on my server (Ubuntu 18.04), all the options:
userAgent =
"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1";
args = [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-infobars",
"--window-position=0,0",
"--ignore-certifcate-errors",
"--ignore-certifcate-errors-spki-list",
];
cannot be parsed.
Due to the fact that we need the userAgent, so I found the it can fit into
browser.newContext({
...
userAgent:userAgent
})

The thing that I don't understand is on PC I can launch it with all those options, but not on server.
Do those options actually make some differences? or do we need those options for some reasons?
If not, I would remove all of them.

from tiktok-signature.

carcabot avatar carcabot commented on July 17, 2024

Are you using same node version for both machines?
Try also removing all arguments just to test

from tiktok-signature.

jonas-meng avatar jonas-meng commented on July 17, 2024

Are you using same node version for both machines?
Try also removing all arguments just to test

yes, in both PC and server, I am using node v14.4.0.
Removing all arguments, but including userAgent like I described above, does generates correct signature and verifyFp.
This is why I am asking do we need all those options? are they exist for some reason?

from tiktok-signature.

carcabot avatar carcabot commented on July 17, 2024

There is a reason for each one argument used, but if this app works for you without those arguments means that you don't need them.
On some other systems can raise an error if arguments are not passed.

I have removed arguments to work on linux systems.

from tiktok-signature.

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.