Sometimes resource diff crashes with the following Javascript error. No clear steps to reproduce.
TypeError: Cannot read property 'value' of undefined
at E (https://argo.svc/main.ae7b875b9adcb70f9210.js:157:201977)
at e.value (https://argo.svc/main.ae7b875b9adcb70f9210.js:157:195751)
at e.value (https://argo.svc/main.ae7b875b9adcb70f9210.js:157:195320)
at e.value (https://argo.svc/main.ae7b875b9adcb70f9210.js:157:228714)
at Object.e.patch (https://argo.svc/main.ae7b875b9adcb70f9210.js:157:247102)
at https://argo.svc/main.ae7b875b9adcb70f9210.js:18:120032
at Array.map (<anonymous>)
at Object.children (https://argo.svc/main.ae7b875b9adcb70f9210.js:18:119548)
at t.render (https://argo.svc/main.ae7b875b9adcb70f9210.js:18:39479)
at Ai (https://argo.svc/main.ae7b875b9adcb70f9210.js:96:63644)
Version
v1.3.6
I'm working with @stgarf on this. Here is the panic when doing a diff from the CLI:
$ argostage app diff filterdrecv-debug
Already at context 'stage'
===== apps/Deployment mail-pipeline/filterdrecv-debug ======
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/yudai/gojsondiff.(*Object).PostApply(0xc000354580, 0x23e9040, 0xc0009f6900, 0xc0009f6ba0, 0xc0003546c0)
/go/src/github.com/yudai/gojsondiff/deltas.go:164 +0x266
github.com/yudai/gojsondiff.applyDeltas(0xc000354700, 0x3, 0x4, 0x23e9040, 0xc0009f6900, 0xc000066c00, 0xc0009f6b00)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Array).PostApply(0xc000354ac0, 0x248ddc0, 0xc000b4df80, 0xc0009f6b60, 0xc000354e00)
/go/src/github.com/yudai/gojsondiff/deltas.go:195 +0xf8
github.com/yudai/gojsondiff.applyDeltas(0xc00041e500, 0x5, 0x8, 0x248ddc0, 0xc000b4df80, 0xc0009f6830, 0x1)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Object).PostApply(0xc000354e40, 0x23e9040, 0xc0009f6b00, 0xc0009f6b20, 0x0)
/go/src/github.com/yudai/gojsondiff/deltas.go:164 +0x224
github.com/yudai/gojsondiff.applyDeltas(0xc0009f6500, 0x2, 0x2, 0x23e9040, 0xc0009f6b00, 0xc000cc6f10, 0x4)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Array).PostApply(0xc0002c1600, 0x248ddc0, 0xc000b4ce40, 0xc0009f6ac0, 0xc0002c1680)
/go/src/github.com/yudai/gojsondiff/deltas.go:195 +0xf8
github.com/yudai/gojsondiff.applyDeltas(0xc0009f6700, 0x2, 0x2, 0x248ddc0, 0xc000b4ce40, 0x100b852, 0xc0009f69a0)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Object).PostApply(0xc0002c16c0, 0x248ddc0, 0xc000b4cdb0, 0xc0009f6a60, 0xc0002c16c0)
/go/src/github.com/yudai/gojsondiff/deltas.go:160 +0xf8
github.com/yudai/gojsondiff.applyDeltas(0xc00095af90, 0x1, 0x1, 0x248ddc0, 0xc000b4cdb0, 0x80, 0x0)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Object).PostApply(0xc0002c1700, 0x248ddc0, 0xc000b4ccc0, 0xc0009f6a20, 0xc0002c1700)
/go/src/github.com/yudai/gojsondiff/deltas.go:160 +0xf8
github.com/yudai/gojsondiff.applyDeltas(0xc00095afa0, 0x1, 0x1, 0x248ddc0, 0xc000b4ccc0, 0x248ddc0, 0xc000389568)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Object).PostApply(0xc0002c17c0, 0x248ddc0, 0xc000b4cc00, 0xc0009f69e0, 0xc0002c17c0)
/go/src/github.com/yudai/gojsondiff/deltas.go:160 +0xf8
github.com/yudai/gojsondiff.applyDeltas(0xc00095afb0, 0x1, 0x1, 0x248ddc0, 0xc000b4cc00, 0xc000b4cc00, 0xc0000b60b0)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:304 +0x27d
github.com/yudai/gojsondiff.(*Differ).ApplyPatch(0xc000cc7540, 0xc000b4cc00, 0x29e80c0, 0xc0009f67c0)
/go/src/github.com/yudai/gojsondiff/gojsondiff.go:116 +0x69
github.com/argoproj/argo-cd/cmd/argocd/commands.NewApplicationDiffCommand.func1(0xc00047e780, 0xc00026f320, 0x1, 0x1)
/go/src/github.com/argoproj/argo-cd/cmd/argocd/commands/app.go:968 +0x108b
github.com/spf13/cobra.(*Command).execute(0xc00047e780, 0xc00026f2d0, 0x1, 0x1, 0xc00047e780, 0xc00026f2d0)
/go/src/github.com/spf13/cobra/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003f8780, 0x0, 0x0, 0x230adbe)
/go/src/github.com/spf13/cobra/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/spf13/cobra/command.go:800
main.main()
/go/src/github.com/argoproj/argo-cd/cmd/argocd/main.go:14 +0x28
$ argocd version
argocd: v1.3.2+a5a65cd
BuildDate: 2019-12-03T21:32:47Z
GitCommit: a5a65cdfe7c43fd1e3beada202d80c19bc50bd40
GitTreeState: clean
GoVersion: go1.12.6
Compiler: gc
Platform: darwin/amd64
argocd-server: v1.3.2+a5a65cd
BuildDate: 2019-12-03T21:32:18Z
GitCommit: a5a65cdfe7c43fd1e3beada202d80c19bc50bd40
GitTreeState: clean
GoVersion: go1.12.6
Compiler: gc
Platform: linux/amd64
Ksonnet Version: v0.13.1
Kustomize Version: Version: {Version:kustomize/v3.2.1 GitCommit:d89b448c745937f0cf1936162f26a5aac688f840 BuildDate:2019-09-27T00:10:52Z GoOs:linux GoArch:amd64}
Helm Version: v2.15.2
Kubectl Version: v1.14.0
we can repro reliably when diffing from a specific commit to another
v1.3.6
Just FYI, our production environment is running v1.2.5 so it's occuring in releases _at least_ that old.
PR is waiting for review
@dtjm, @stgarf: Finally published v1.4.0-rc1 with the fix for the crash.
The https://github.com/argoproj/argo-cd/issues/2865 is still open. CLI/UI won't crash anymore but still might incorrectly report out-of-sync. Working on fixing #2865 next
Most helpful comment
@dtjm, @stgarf: Finally published v1.4.0-rc1 with the fix for the crash.
The https://github.com/argoproj/argo-cd/issues/2865 is still open. CLI/UI won't crash anymore but still might incorrectly report out-of-sync. Working on fixing #2865 next