Skip to content

status sync command fails on Mac #921

@kokoc

Description

@kokoc

What happened?
devspace status sync command is not able to parse content from sync.log on mac. Here is the exception(please use horizontal scroll to find the exception message):

[fatal]  Error parsing /Users/username/projectname/.devspace/logs/sync.log: Json object is invalid {"level":"info","msg":"Start syncing","time":"2020-02-10T16:37:11-06:00"}
github.com/devspace-cloud/devspace/cmd/status.(*syncCmd).RunStatusSync
	/Users/runner/runners/2.164.0/work/devspace/devspace/cmd/status/sync.go:99
github.com/devspace-cloud/devspace/cmd/status.newSyncCmd.func1
	/Users/runner/runners/2.164.0/work/devspace/devspace/cmd/status/sync.go:56
github.com/spf13/cobra.(*Command).execute
	/Users/runner/runners/2.164.0/work/devspace/devspace/vendor/github.com/spf13/cobra/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
	/Users/runner/runners/2.164.0/work/devspace/devspace/vendor/github.com/spf13/cobra/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/Users/runner/runners/2.164.0/work/devspace/devspace/vendor/github.com/spf13/cobra/command.go:864
github.com/devspace-cloud/devspace/cmd.Execute
	/Users/runner/runners/2.164.0/work/devspace/devspace/cmd/root.go:70
main.main
	/Users/runner/runners/2.164.0/work/devspace/devspace/main.go:17
runtime.main
	/Users/runner/hostedtoolcache/go/1.13.7/x64/src/runtime/proc.go:203
runtime.goexit
	/Users/runner/hostedtoolcache/go/1.13.7/x64/src/runtime/asm_amd64.s:1357

Json from exception message looks wellformed and other json parsers are able to deserialize it.

What did you expect to happen instead?
devspace status sync command output contains parsed json content

How can we reproduce the bug? (as minimally and precisely as possible)

  • Docker for Mac on Mac
  • Start code sync on any project
  • Launch status sync command

Local Environment:

  • Operating System: mac
  • Deployment method: kubectl apply

Kubernetes Cluster:

  • Provider: Docker for Mac
  • Kubernetes Version:
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?

  • Json file linebreaks are LF
  • PHPStorm IDE is looking on the project root

/kind bug

Metadata

Metadata

Assignees

Labels

area/syncIssues related to the real-time code synchronizationkind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions