todoist icon indicating copy to clipboard operation
todoist copied to clipboard

todoist list command fails on mac

Open sherry-ummen opened this issue 4 years ago • 8 comments

➜ ~ todoist list panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x143112c]

goroutine 1 [running]: main.List.func1(0x0, 0x0) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/src/github.com/sachaos/todoist/list.go:40 +0xfc main.traverseItems(0x0, 0xc000140f30, 0x0) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/src/github.com/sachaos/todoist/list.go:9 +0x3e main.List(0xc0000f0b00, 0x0, 0x0) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/src/github.com/sachaos/todoist/list.go:35 +0x2d5 github.com/urfave/cli.HandleAction(0x148b5a0, 0x15485f0, 0xc0000f0b00, 0xc0000c8700, 0x0) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/.brew_home/go/pkg/mod/github.com/urfave/[email protected]/app.go:490 +0xc8 github.com/urfave/cli.Command.Run(0x1528adc, 0x4, 0x0, 0x0, 0xc0000ab310, 0x1, 0x1, 0x152bfc8, 0xe, 0x0, ...) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/.brew_home/go/pkg/mod/github.com/urfave/[email protected]/command.go:210 +0x991 github.com/urfave/cli.(*App).Run(0xc0000b7380, 0xc0000c0020, 0x2, 0x2, 0x0, 0x0) /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/.brew_home/go/pkg/mod/github.com/urfave/[email protected]/app.go:255 +0x6ab main.main() /private/tmp/todoist-20200116-87090-1lu0d0c/todoist-0.14.0/src/github.com/sachaos/todoist/main.go:262 +0x160e

sherry-ummen avatar Jan 16 '20 08:01 sherry-ummen

Please ask if you need more details

sherry-ummen avatar Jan 16 '20 08:01 sherry-ummen

Same error on Manjaro, appears to have been remedied by calling todoist sync first, so it looks like an error associated with trying to print something that isn't there.

tthansel avatar Jan 21 '20 23:01 tthansel

Also have this issue on my Mac, and running todoist sync resolved the issue. Obviously it's better to run this command automatically rather than throwing error.

sepehrhosseini avatar Feb 07 '20 11:02 sepehrhosseini

same here. run todoist sync to fix

overcache avatar Mar 07 '20 03:03 overcache

I ran todoist sync and then ran todoist list , same issue. So the workaround did not work for me. Any other workaround?

sherry-ummen avatar Mar 19 '20 08:03 sherry-ummen

so master version does not have this issue, I just built the code myself and using that

sherry-ummen avatar Mar 19 '20 21:03 sherry-ummen

I have a simliar error on mac, but it also happens when I sync. Just compiled fresh from master:

➜ todoist sync
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x12d525d]

goroutine 1 [running]:
github.com/sachaos/todoist/lib.addToChildItem(...)
        /Users/mikeh/go/src/github.com/sachaos/todoist/lib/sync.go:99
github.com/sachaos/todoist/lib.(*Store).ConstructItemTree(0xc0000a7c00)
        /Users/mikeh/go/src/github.com/sachaos/todoist/lib/sync.go:176 +0x77d
github.com/sachaos/todoist/lib.(*Client).Sync(0xc0000d4e40, 0x14eb7d0, 0xc0000a2000, 0x6, 0xc0000c7ca8)
        /Users/mikeh/go/src/github.com/sachaos/todoist/lib/todoist.go:116 +0x257
main.Sync(0xc0000ec580, 0x0, 0xc0000ec580)
        /Users/mikeh/go/src/github.com/sachaos/todoist/sync.go:12 +0x9d
github.com/urfave/cli.HandleAction(0x13e8b40, 0x1482f68, 0xc0000ec580, 0xc0000b8700, 0x0)
        /Users/mikeh/go/pkg/mod/github.com/urfave/[email protected]/app.go:490 +0x82
github.com/urfave/cli.Command.Run(0x146467b, 0x4, 0x0, 0x0, 0xc000099500, 0x1, 0x1, 0x1466412, 0xa, 0x0, ...)
        /Users/mikeh/go/pkg/mod/github.com/urfave/[email protected]/command.go:210 +0x9bb
github.com/urfave/cli.(*App).Run(0xc0000a51e0, 0xc0000ba000, 0x2, 0x2, 0x0, 0x0)
        /Users/mikeh/go/pkg/mod/github.com/urfave/[email protected]/app.go:255 +0x768
main.main()
        /Users/mikeh/go/src/github.com/sachaos/todoist/main.go:326 +0x193d
➜ go version
go version go1.16.2 darwin/amd64

squarepegsys avatar May 30 '21 18:05 squarepegsys

I also get this on sync:

$ todoist sync
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x130a422]

goroutine 1 [running]:
github.com/sachaos/todoist/lib.addToChildItem(...)
        /private/tmp/todoist-20210127-6214-1uxhr2i/todoist-0.15.0/lib/sync.go:93
github.com/sachaos/todoist/lib.(*Store).ConstructItemTree(0xc000127c00)
        /private/tmp/todoist-20210127-6214-1uxhr2i/todoist-0.15.0/lib/sync.go:165 +0x742
github.com/sachaos/todoist/lib.(*Client).Sync(0xc00014ee40, 0x1591960, 0xc000122000, 0x6, 0xc000143a68)
        /private/tmp/todoist-20210127-6214-1uxhr2i/todoist-0.15.0/lib/todoist.go:116 +0x254
main.Sync(0xc00015e580, 0x0, 0xc00015e580)
        /private/tmp/todoist-20210127-6214-1uxhr2i/todoist-0.15.0/sync.go:12 +0x9d
github.com/urfave/cli.HandleAction(0x1472a20, 0x151d1a8, 0xc00015e580, 0xc000136700, 0x0)
        /Users/tsaleh/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/urfave/[email protected]/app.go:490 +0x82
github.com/urfave/cli.Command.Run(0x14fccfc, 0x4, 0x0, 0x0, 0xc0001193b0, 0x1, 0x1, 0x14febd0, 0xa, 0x0, ...)
        /Users/tsaleh/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/urfave/[email protected]/command.go:210 +0x9fb
github.com/urfave/cli.(*App).Run(0xc000125520, 0xc00012e040, 0x2, 0x2, 0x0, 0x0)
        /Users/tsaleh/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/urfave/[email protected]/app.go:255 +0x768
main.main()
        /private/tmp/todoist-20210127-6214-1uxhr2i/todoist-0.15.0/main.go:274 +0x1610

tammersaleh avatar Aug 09 '22 14:08 tammersaleh