wakatime/wakatime-cli

panic: runtime error: invalid memory address or nil pointer dereference

gandarez opened this issue · 0 comments

Environment

  • OS: Darwin
  • Platform: arm64
  • Plugin: xcode/14.1-21534.1 xcode-wakatime/v0.1.0
  • CLI: v1.70.1

Stacktrace

goroutine 1 [running]:
runtime/debug.Stack()
 /Users/runner/hostedtoolcache/go/1.19.7/x64/src/runtime/debug/stack.go:24 +0x64
github.com/wakatime/wakatime-cli/cmd.runCmd.func1()
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/run.go:274 +0x130
panic({0x105461160, 0x105991e70})
 /Users/runner/hostedtoolcache/go/1.19.7/x64/src/runtime/panic.go:884 +0x204
github.com/wakatime/wakatime-cli/pkg/heartbeat.isDir({0x16b2ffc2c?, 0x1400044d5f0?})
 /Users/runner/work/wakatime-cli/wakatime-cli/pkg/heartbeat/heartbeat.go:214 +0x20
github.com/wakatime/wakatime-cli/pkg/heartbeat.isXCodePlayground({0x16b2ffc2c, 0x4d})
 /Users/runner/work/wakatime-cli/wakatime-cli/pkg/heartbeat/entity_modify.go:36 +0xe0
github.com/wakatime/wakatime-cli/pkg/heartbeat.WithEntityModifer.func1.1({0x14000450140, 0x1, 0x1})
 /Users/runner/work/wakatime-cli/wakatime-cli/pkg/heartbeat/entity_modify.go:19 +0xfc
github.com/wakatime/wakatime-cli/pkg/heartbeat.WithFormatting.func1.1({0x14000450140, 0x1, 0x1})
 /Users/runner/work/wakatime-cli/wakatime-cli/pkg/heartbeat/format.go:32 +0xa8
github.com/wakatime/wakatime-cli/pkg/heartbeat.NewHandle.func1({0x14000450140, 0x1, 0x1})
 /Users/runner/work/wakatime-cli/wakatime-cli/pkg/heartbeat/heartbeat.go:171 +0xd4
github.com/wakatime/wakatime-cli/cmd/heartbeat.SendHeartbeats(0x14000103ba0, {0x14000140ff0, 0x21})
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/heartbeat/heartbeat.go:127 +0x5e4
github.com/wakatime/wakatime-cli/cmd/heartbeat.Run(0x1054ef560?)
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/heartbeat/heartbeat.go:36 +0xc8
github.com/wakatime/wakatime-cli/cmd.runCmd(0x14000103ba0, 0x0, 0x0, 0x1054ecb48)
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/run.go:290 +0xbc
github.com/wakatime/wakatime-cli/cmd.RunCmdWithOfflineSync(0x140003e9250?, 0xb4?, 0x7?, 0x0?)
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/run.go:248 +0x28
github.com/wakatime/wakatime-cli/cmd.Run(0x0?, 0x0?)
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/run.go:118 +0x604
github.com/wakatime/wakatime-cli/cmd.NewRootCMD.func1(0x1400022c300?, {0x10521ae8f?, 0x4?, 0x4?})
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/root.go:29 +0x20
github.com/spf13/cobra.(*Command).execute(0x1400022c300, {0x1400010c060, 0x4, 0x4})
 /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x1400022c300)
 /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
 /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/wakatime/wakatime-cli/cmd.Execute()
 /Users/runner/work/wakatime-cli/wakatime-cli/cmd/root.go:260 +0x20
main.main()
 /Users/runner/work/wakatime-cli/wakatime-cli/main.go:6 +0x1c