GetLoginFlow() (and other methods) of the Go SDK client of ory/kratos v1.0.0 (github.com/ory/kratos-client-go v1.0.0) fails to properly unmarshal UI Nodes.
Reproducing the bug
Call login flow data, _, err := kratosSDK.FrontendApi.GetLoginFlow() of the Golang Kratos SDK version 1.0.0.
Get the value of ui := data.GetUi().
Check the value of ui.GetNodes().
Expected: the values are not empty.
Actual: the values are empty.
The actual values from the debugger after the incoming JSON from HTTP response was parsed:
I think it's the problem in UnmarshalJSON() function of github.com/ory/kratos-client-go/model_ui_node_attributes.go file . Where it constantly falls into the if match > 1 { // more than 1 match branch.
Relevant log output
There are no errors reported or returned. If fails to parse json silently.
Relevant configuration
No response
Version
1.0.0
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Binary
Additional Context
It works fine in github.com/ory/kratos-client-go v0.13.1.
My Go version is 1.21, MacOS ARM (same is on Linux ARM).
Preflight checklist
Ory Network Project
No response
Describe the bug
GetLoginFlow()
(and other methods) of the Go SDK client of ory/kratos v1.0.0 (github.com/ory/kratos-client-go v1.0.0
) fails to properly unmarshal UI Nodes.Reproducing the bug
data, _, err := kratosSDK.FrontendApi.GetLoginFlow()
of the Golang Kratos SDK version 1.0.0.ui := data.GetUi()
.ui.GetNodes()
.Expected: the values are not empty.
Actual: the values are empty.
The actual values from the debugger after the incoming JSON from HTTP response was parsed:
The actual incoming JSON:
I think it's the problem in
UnmarshalJSON()
function ofgithub.com/ory/kratos-client-go/model_ui_node_attributes.go
file . Where it constantly falls into theif match > 1 { // more than 1 match
branch.Relevant log output
Relevant configuration
No response
Version
1.0.0
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Binary
Additional Context
It works fine in
github.com/ory/kratos-client-go v0.13.1
. My Go version is 1.21, MacOS ARM (same is on Linux ARM).