Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most searches crash the docker container #7

Open
joshfester opened this issue Jul 10, 2024 · 4 comments
Open

Most searches crash the docker container #7

joshfester opened this issue Jul 10, 2024 · 4 comments

Comments

@joshfester
Copy link

I can get some hello world searches to work, but if I try anything else, I get errors like this, which crash the docker container:

[2024-07-10 16:44:20][DEBUG] 	Navigate to: https://www.google.com/search?hl=EN&ie=UTF-8&lr=lang_en&nfpr=1&num=20&oq=alien+labs+cannabis&pws=0&q=alien+labs+cannabis&sourceid=chrome
[2024-07-10 16:44:20][ERROR] 	Error preparing the page: eval js error: TypeError: Cannot read properties of undefined (reading 'apply')
    at <anonymous>:1:113 <nil>
[2024-07-10 16:44:25][INFO] 	4450000 SERP results
panic: runtime error: slice bounds out of range [4:1]
goroutine 31 [running]:
github.com/karust/openserp/google.(*Google).Search(0xc000132990, {{0xc0002ab3e0, 0x13}, {0xc000013f38, 0x2}, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...})
	/build/google/search.go:296 +0xeb5
github.com/karust/openserp/core.NewServer.func1(0xc0001e4008)
	/build/core/server.go:50 +0x25d
github.com/gofiber/fiber/v2.(*App).next(0xc000194d88, 0xc0001e4008)
	/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:144 +0x1b2
github.com/gofiber/fiber/v2.(*App).handler(0xc000194d88, 0x493ecf?)
	/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:171 +0x78
github.com/valyala/fasthttp.(*Server).serveConn(0xc000112e00, {0x10272c8, 0xc0005b0ed0})
	/go/pkg/mod/github.com/valyala/[email protected]/server.go:2363 +0xe90
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc00018d4a0, 0xc00005dee0)
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:224 +0xa4
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:196 +0x32
created by github.com/valyala/fasthttp.(*workerPool).getCh in goroutine 1
	/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x190
serp exited with code 2
@muratkaragoz
Copy link

Change "strings.Join(textSliced[4:]," as "strings.Join(textSliced[:]," at line 296 and then run "go build" at console.

@iInvisibilities
Copy link

Same issue here.

@baderdean
Copy link

Change "strings.Join(textSliced[4:]," as "strings.Join(textSliced[:]," at line 296 and then run "go build" at console.

Could you do a PR and update the docker image to still use the docker image without any hotfix please?

@amour86
Copy link

amour86 commented Oct 18, 2024

Change "strings.Join(textSliced[4:]," as "strings.Join(textSliced[:]," at line 296 and then run "go build" at console.

Could you do a PR and update the docker image to still use the docker image without any hotfix please?

Same here

shadowy-pycoder pushed a commit to shadowy-pycoder/openserp that referenced this issue Nov 20, 2024
shadowy-pycoder added a commit to shadowy-pycoder/openserp that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants