RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Consistent timeout error when lauching headless browser

Open ishaw18 opened this issue 4 years ago • 10 comments

I have consistently had an issue at this point in the program. I implemented a change of adding timeout = 0 in line 26 of screenshot downloader, and I did get one video to work, however I still face this issue 99% of the time.

the window as follows. Anyone know what's going on and how to fix this? image

ishaw18 avatar Jun 03 '22 01:06 ishaw18

Further, I believe that this is an issue with playwrights default timout of 30 seconds. If there were a way to extend this, I think that would fix it.

ishaw18 avatar Jun 03 '22 01:06 ishaw18

You can try disabling timout, or setting a higher value

# Get the thread screenshot
        page = browser.new_page()
        page.goto(reddit_object["thread_url"], timeout = 0)

or you can do it globaly using page.set_default_timeout()

nizar0x1f avatar Jun 03 '22 03:06 nizar0x1f

You can try disabling timout, or setting a higher value

# Get the thread screenshot
        page = browser.new_page()
        page.goto(reddit_object["thread_url"], timeout = 0)

or you can do it globaly using page.set_default_timeout()

If you were to do it globally, where exactly do you do that? Within the sceenshot downloader script?

ishaw18 avatar Jun 03 '22 03:06 ishaw18

here

        # Get the thread screenshot
        page = browser.new_page()
        page.set_default_timeout(0)
        page.goto(reddit_object["thread_url"])

nizar0x1f avatar Jun 03 '22 04:06 nizar0x1f

so i added this, and not the script just stops on Launching Headless Browser... i let it sit for 10 minutes and nothing happened image

yes i understand that removing the script time out was going to cause this, but why is the script hanging up on other subreddits, and how do we fix it?

EDIT: idk if this helps at all but i eventually destroyed the task with ctrl-c and got this output image

reinkdesigns avatar Jun 03 '22 15:06 reinkdesigns

same issue with timeout. Tried @nizarbamida method but it takes too long

FireHe4d avatar Jun 05 '22 21:06 FireHe4d

i tried letting it run for 8 hours while i slept and it never got past launching headless browser, does anyone have an idea whats causing it to lock up?

reinkdesigns avatar Jun 07 '22 04:06 reinkdesigns

I believe it most likely has something to do with how many/how long the comments are on the particular reddit thread. I think that it may just be going through for too long and then get tripped up. As far as a solution.. I am not sure.

ishaw18 avatar Jun 07 '22 04:06 ishaw18

It is possible that it was trying to load some image/video/link in the post or the comments Happening to me right now

binayakbishnu avatar Jun 15 '22 03:06 binayakbishnu

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment, or this will be closed in 10 days.

github-actions[bot] avatar Jul 02 '22 00:07 github-actions[bot]