Giter Site home page Giter Site logo

Comments (3)

jlplenio avatar jlplenio commented on June 11, 2024

Hmmmm difficult. I think this is a problem with playwright. Could you try with chromium, i.e. comment out this line:
https://github.com/jlplenio/crude-twitch-viewer-bot/blob/8380c49fdeba680c202b124c789c72c7d0abaa03/ctvbot/instance.py#L135C1-L135C30

And try a different browser by changing

self.browser = self.playwright.chromium.launch(
with e.g. playwright.firefox.launch()

In general, I would recommend you try playwright isolated in a small custom python script. And return to the bot once it works.

And does the executable work from https://github.com/jlplenio/crude-twitch-viewer-bot/releases/latest?

from crude-twitch-viewer-bot.

Nesonica avatar Nesonica commented on June 11, 2024

Hi @jlplenio ,

I wanted to provide an update on this issue. I've managed to resolve it by switching from using Google Chrome to Mozilla Firefox in the Playwright configuration. Here's how I modified the relevant part of the script:

self.playwright = sync_playwright().start()

self.browser = self.playwright.firefox.launch(
    proxy=proxy_dict,
    headless=self.headless,
    channel="firefox",
    args=[
        "--window-position={},{}".format(self.location_info["x"], self.location_info["y"]),
        "--mute-audio",
    ],
)

This change seems to have resolved the spawn UNKNOWN error I was facing with Chrome. The script now successfully launches a Firefox instance via Playwright.

I'd like to thank the developers for creating and maintaining this project. Your work is greatly appreciated.

I'm now closing this issue as it has been resolved.

Best Regards,
Nes

from crude-twitch-viewer-bot.

jlplenio avatar jlplenio commented on June 11, 2024

Interesting. Can you confirm that everything is works as expected. Restarts, fresh, kill, screenshot, green status boxes etc.
I was afraid to switch to another browser because I kept seeing in my tests that Twitch behaves differently depending on the browser (layout, cookies, local storage).

And thank you for coming back and presenting your solution. Kudos @Nesonica

from crude-twitch-viewer-bot.

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.