Is there any incompatible change pushed to session...
# ory-network
c
Is there any incompatible change pushed to sessions api? Getting this error in ory client. This is breaking our production `The field
provider
in the JSON string is not defined in the
SessionAuthenticationMethod
properties. JSON: {"method":"oidc","aal":"aal1","completed_at":"<DATETIME>","provider":"google"}`
m
Hey Kewal, there should have been no breaking change, but we are looking into it.
h
What programming language is this?
Can you try upgrading your SDK?
Some SDKs have problems when the API payloads change …. would be great to know what the language is so we can check how to prevent this in the future
c
I tried upgrading ory client sdk to
1.1.33
this is java sdk
still facing the issue.
And it is working for few members, and breaking for majority of them.
@magnificent-energy-493 @high-optician-2097 any idea what could have caused this error?
f
working for few members you mean developers and their SDK clients?
are they using same version of SDK and other deps as you do?
c
we are using java sdk version 1.1.24. For few users it is working and for most users it is breaking with the above error.
can you tell me what could cause the above error?
Copy code
oryFrontendApi.toSession
this method is throwing the exception
h
can you upgrade to 1.1.34?
f
do you have same kratos configs between working and not working peers?
c
For those who it is working
sessions/whoami
is not returning a key called
provider
, for those who it is failing this key is present
trying upgrade to 1.1.34
unable to upgrade to 1.1.34 because it is not present in maven repository yet.
h
ok let me double check
c
SessionAuthenticationMethod
is missing
provider
field
h
yeah, the problems seems to be that the java sdk is rejecting undknown fields?
c
this is there in 1.1.34 but not in 1.1.33 here
h
so we added a new field to this struct called
provider
and typically the SDKs should just ignore it if it is unknown
but apparently the java sdk is configured in such a way that it doesn’t ignore it but instead throws an exception which is incredibly dumbg
🤝 1
c
can you revert the field in the api because I cannot upgrade to 1.1.34 because of unavailability in maven
h
we cant revert the upgrade right now. i will try to do the release on maven. maybe you can check whether there is a config option to ignore unknown fields in the java sdk?
The release of the SDK failed because of sonatype error …
Copy code
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project ory-client: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy failed: Nexus connection problem to URL [<https://oss.sonatype.org/> ]: 502 - Bad Gateway -> [Help 1]
i will trigger a new release now
Looks like other people have the same issue: https://github.com/OpenAPITools/openapi-generator/issues/3438
build for the sdk is triggered. it will take a couple of minutes. i’ll let you know
c
have you reverted the struct to not have this field? And is it deployed?
no, we can not revert the struct. but we’re working on a different solution right now
c
I do not have a way to ignore unknown fields, how much time will it take to get 1.1.34 version in maven repository?
h
a couple of minutes
ok, i found a setting also in openapi generator to resolve this issue in the future. will add this to our set up
https://github.com/ory/sdk/commit/141563661a0fd10fa2a807601703d2b431250148 this will prevent this issue in the future. so it will not happen again
the release of 1.1.35 succeded
i don’t see it here yet: https://mvnrepository.com/artifact/sh.ory/ory-client maybe due to caching though?
Copy code
[INFO] Performing remote staging...
    [INFO] 
    [INFO]  * Remote staging into staging profile ID "1f4414df76f552"
    [INFO]  * Created staging repository with ID "shory-1288".
    [INFO]  * Staging repository at <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288>
    [INFO]  * Uploading locally staged artifacts to profile sh.ory
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-sources.jar>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-sources.jar> (748 kB at 7.9 MB/s)
    Downloading from ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/maven-metadata.xml>
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/maven-metadata.xml>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/maven-metadata.xml> (298 B at 6.6 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-tests.jar.asc>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-tests.jar.asc> (228 B at 21 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-javadoc.jar.asc>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-javadoc.jar.asc> (228 B at 13 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.jar.asc>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.jar.asc> (228 B at 28 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-tests.jar>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-tests.jar> (138 kB at 3.7 MB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.jar>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.jar> (1.5 MB at 16 MB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.pom>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.pom> (19 kB at 567 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.pom.asc>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35.pom.asc> (228 B at 28 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-sources.jar.asc>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-sources.jar.asc> (228 B at 14 kB/s)
    Uploading to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-javadoc.jar>
    Uploaded to ossrh: <https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/shory-1288/sh/ory/ory-client/1.1.35/ory-client-1.1.35-javadoc.jar> (3.5 MB at 22 MB/s)
    [INFO]  * Upload of locally staged artifacts finished.
    [INFO]  * Closing staging repository with ID "shory-1288".
    
    Waiting for operation to complete...
    .................
    
    [INFO] Remote staged 1 repositories, finished with success.
    [INFO] Remote staging repositories are being released...
    
    Waiting for operation to complete...
    .......
    
    [INFO] Remote staging repositories released.
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  01:42 min
    [INFO] Finished at: 2023-06-13T11:20:53Z
    [INFO] ------------------------------------------------------------------------
sh.oryory client1.1.35
c
1.1.34 or 1.1.35 is still not available in maven
h
are you pulling
sh.ory:ory-client:1.1.35
or
sh.ory:ory-client:v1.1.35
?
i’ve triggered another release for
sh.ory:ory-client:v1.1.36
because it looks like maven is having cache issues… the 1.1.36 release should be out in ~7 minutes
c
just
1.1.34
and not
v1.1.34
h
sh.oryory client1.1.34 failed
please sh.oryory client1.1.35
i pushed another version:
sh.ory:ory-client:v1.1.36
does that work?
c
I will try this.
h
Really sorry that this is so difficult - trying my best here to help 😞
c
not able to get 1.1.36 either, as a workaround we have hosted 1.1.34 in our internal package repository and fixed temporarily to unblock our users.
h
great workaround solution!
c
when you click on ory.sh client package in the above sonatype link it returns 404: https://ossindex.sonatype.org/component/pkg:maven/sh.ory/ory-client@1.1.36 Other packages are present. Could this be resulting into not getting deployed in maven repository?
it no longer returns 404
it looks like maven takes some time to propagate new packages. sorry for the issues 😞
i have created a fix so that this bug does not happen in the future
c
no problem, I am glad that you guys provided a prompt help and tried to do an effort to fix this from your side. I saw that maven may take around 48 hours before a published artifact is fully synced. so will wait.
h
thank you, i appreciate your response! ok that is a bummer. in the future, our sdks will no longer break when a new field is added. i changed the configuration in the SDK generator. it was an oversight on our part, sorry about that 😞
c
1.1.36 is now available in maven.
Why is it that all the users do not have provider key in sessions api payload?
h
provider is only set for new sessions, and only if you used social sign in to sign in
c
Just an FYI, also encountered this error in the java SDK, had to do an emergency update to our Android app. We also self compile the sdk for swift, it is still in version 1.1.24 without any issues
h
We have introduced a new flag to all Ory SDKs so this won’t happen any more in the future. Sorry for the problems 😞 Code generation is tricky …
c
Where can I see the parameters you use to compile? Also, I can help with the publishing of the Swift SDK, how could I do this?
h
:)