tgbot-collection/archiver

Unable to work

scavin opened this issue ยท 4 comments

scavin commented
Across the Great Wall, we can reach every corner in the world.


INFO[2023-05-09 07:06:15][main.main()] I'm running...
INFO[2023-05-09 07:06:31][main.archiveRunner()] ๐Ÿ—œ๏ธ Archiving https://github.com/tgbot-collection/archiver
INFO[2023-05-09 07:06:31][main.archiveOrg.submit()] Requesting to archive.org https://github.com/tgbot-collection/archiver
INFO[2023-05-09 07:06:32][main.takeScreenshot()] Taking screenshot for https://github.com/tgbot-collection/archiver
ERRO[2023-05-09 07:06:32][main.takeScreenshot()] fork/exec : no such file or directory
ERRO[2023-05-09 07:06:32][main.takeScreenshot()] Post "http://localhost:9515/wd/hub/session": dial tcp 127.0.0.1:9515: connect: connection refused
panic: runtime error: invalid memory address or nil pointer dereference
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x267ad0]

goroutine 38 [running]:
github.com/tebeka/selenium.(*Service).Stop(0x0)
	/root/go/pkg/mod/github.com/tebeka/selenium@v0.9.9/service.go:275 +0x20
panic({0x2b8cc0, 0x543d10})
	/usr/lib/go-1.18/src/runtime/panic.go:838 +0x20c
main.takeScreenshot({0x40004bdcb0, 0x2c})
	/root/archiver/screenshot.go:78 +0x400
main.screenshotRunner({0x399bb0, 0x40004de280})
	/root/archiver/handler.go:65 +0x94
created by main.urlHandler
	/root/archiver/handler.go:55 +0x1f4```

did you install chrome-webdriver https://chromedriver.chromium.org/downloads ?

scavin commented

How to add chrome-webdriver to docker?

I installed chrome-webdriver locally, but it doesn't work

What is your OS in docker? For alpine it's chromium-chromedriver as you can see it in Dockerfile.

If your chrome-driver is not included in PATH, you need to set environment variables DRIVER=/path/to/chrome/driver

scavin commented

thank you.
I created the image using Dockerfile and it ran successfully.