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

Unable to use POST v1/session/:sessionId/load #27

Open
akaikrai opened this issue Aug 26, 2021 · 1 comment
Open

Unable to use POST v1/session/:sessionId/load #27

akaikrai opened this issue Aug 26, 2021 · 1 comment

Comments

@akaikrai
Copy link

akaikrai commented Aug 26, 2021

After sending a zip archive of a build to my roku device I get a "socket hang up" error. After some digging i discovered that it most likely has to do with CORS and strict-origin-when-cross-origin header.
I assume that the session drops after attempting to load a zip file from my local machine to the device because of security measures taken to prevent CSRF attacks.
Is there a workaround?

@aps5431
Copy link

aps5431 commented Oct 20, 2021

We are also trying to achieve the same thing. We are tying to call the side load API from Postman and we are getting the following error.
2021/10/20 17:23:35 http: panic serving [::1]:56049: runtime error: invalid memory address or nil pointer dereference
goroutine 18 [running]:
net/http.(*conn).serve.func1()
C:/Program Files/Go/src/net/http/server.go:1801 +0xb9
panic({0x7c7140, 0xa56420})
C:/Program Files/Go/src/runtime/panic.go:1047 +0x266
bytes.(*Buffer).ReadFrom(0xc000206c00, {0x0, 0x0})
C:/Program Files/Go/src/bytes/buffer.go:204 +0x75
io.copyBuffer({0x87f180, 0xc000206c00}, {0x0, 0x0}, {0x0, 0x0, 0x0})
C:/Program Files/Go/src/io/io.go:409 +0x14b
io.Copy(...)
C:/Program Files/Go/src/io/io.go:382
httpServer.(*Server).GetLoadHandler.func1({0x885490, 0xc00021a0e0}, 0x51d227)
C:/Program Files/Go/src/httpServer/handlers.go:232 +0xfa
httpServer.Middleware.func1({0x885490, 0xc00021a0e0}, 0xc000206ae0)
C:/Program Files/Go/src/httpServer/middleware.go:29 +0x31
net/http.HandlerFunc.ServeHTTP(0xc000222500, {0x885490, 0xc00021a0e0}, 0x100000000000010)
C:/Program Files/Go/src/net/http/server.go:2046 +0x2f
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000152000, {0x885490, 0xc00021a0e0}, 0xc000222400)
D:/Discovery/automated-channel-testing-master/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0x1cf
net/http.(*ServeMux).ServeHTTP(0x0, {0x885490, 0xc00021a0e0}, 0xc000222400)
C:/Program Files/Go/src/net/http/server.go:2424 +0x149
net/http.serverHandler.ServeHTTP({0x884670}, {0x885490, 0xc00021a0e0}, 0xc000222400)
C:/Program Files/Go/src/net/http/server.go:2878 +0x43b
net/http.(*conn).serve(0xc0000a8000, {0x8864e0, 0xc000172870})
C:/Program Files/Go/src/net/http/server.go:1929 +0xb08
created by net/http.(*Server).Serve
C:/Program Files/Go/src/net/http/server.go:3033 +0x4e8

We have tried with the zip file alone and also the whole path of zip file in the request body. Both are giving the same response.
Where is the channel.zip file expected to be while testing using postman .We are not sure where we are going solution. Can someone help.

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

2 participants