Skip to content

Panic: runtime error: invalid memory address or nil pointer dereference #54

@maciejgurgul

Description

@maciejgurgul

I use version from master and v2, and i got the same error:

http: panic serving [::1]:60992: runtime error: invalid memory address or nil pointer dereference
goroutine 41 [running]:
net/http.(*conn).serve.func1(0xc0000f8e60)
        /usr/local/go/src/net/http/server.go:1801 +0x147
panic(0x1632640, 0x1b18ef0)
        /usr/local/go/src/runtime/panic.go:975 +0x3e9
net/http.(*Client).deadline(0x0, 0x0, 0x30, 0x16534c0)
        /usr/local/go/src/net/http/client.go:189 +0x22
net/http.(*Client).do(0x0, 0xc00015e000, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/client.go:604 +0x2bd
net/http.(*Client).Do(...)
        /usr/local/go/src/net/http/client.go:586
net/http.(*Client).Post(0x0, 0xc00032c0e0, 0x66, 0x16f60d0, 0x10, 0x17a5640, 0xc000702600, 0xc000490040, 0x9b9c9d0, 0x100ff38)
        /usr/local/go/src/net/http/client.go:846 +0x195
github.com/Iwark/spreadsheet.(*Service).post(0xc000613928, 0xc000484000, 0x46, 0xc000702150, 0xc0005aa868, 0xc000484000, 0x46, 0x0)
        /Users/maciejgurgul/go/src/github.com/Iwark/spreadsheet/service.go:278 +0x17a
github.com/Iwark/spreadsheet.(*updateRequest).Do(0xc0002096a0, 0xc0002a0000, 0xc0002096a0)
        /Users/maciejgurgul/go/src/github.com/Iwark/spreadsheet/update_request.go:38 +0x29b
github.com/Iwark/spreadsheet.(*Service).SyncSheet(0xc000613928, 0xc0002a0000, 0x0, 0x16f0e76)
        /Users/maciejgurgul/go/src/github.com/Iwark/spreadsheet/service.go:206 +0x1d3
github.com/Iwark/spreadsheet.(*Sheet).Synchronize(...)
        /Users/maciejgurgul/go/src/github.com/Iwark/spreadsheet/sheet.go:155
main.updateGoogleSheet()
        /Users/maciejgurgul/Projects/copy-reports-bash/main.go:360 +0x307
main.testConnextion(0x17b0740, 0xc0002e0460, 0xc00015e500)
        /Users/maciejgurgul/Projects/copy-reports-bash/main.go:85 +0x94
net/http.HandlerFunc.ServeHTTP(0x171c558, 0x17b0740, 0xc0002e0460, 0xc00015e500)
        /usr/local/go/src/net/http/server.go:2042 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc00019a180, 0x17b0740, 0xc0002e0460, 0xc00015e300)
        /Users/maciejgurgul/go/src/github.com/gorilla/mux/mux.go:210 +0xd3
net/http.serverHandler.ServeHTTP(0xc0002e0000, 0x17b0740, 0xc0002e0460, 0xc00015e300)
        /usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0000f8e60, 0x17b1e80, 0xc00002eec0)
        /usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2969 +0x36c

I try update cell. I did it exacly, like on example. Could you fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions