Kotlin SDK: all_projects() fails with 'Cannot deserialize value of type `com.looker.sdk.GitApplicationServerHttpScheme`'
See original GitHub issueWith the latest Kotlin sources, running against Looker 21.0.34.
- I created a blank project via the Web UI, and configured it to point to a Custom Git Repository (CodeCommit).
- After it’s created successfully, using the Kotlin SDK, I call
update_session()
to set the session and thenall_projects()
but it fails with:
Calling update_session(): body=WriteApiSession(workspace_id=dev)
Response: ApiSession(can={view=true, update=true}, workspace_id=dev, sudo_user_id=null)
Calling all_projects()
Response: SDKErrorResponse(value=GET /projects com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `com.looker.sdk.GitApplicationServerHttpScheme` from String "": not one of the values accepted for Enum class: [http, https]
at [Source: (String)"[{"id":"reports","name":"reports","git_remote_url":"https://...,"git_username":"...",""[truncated 625 chars]; line: 1, column: 372] (through reference chain: java.lang.Object[][0]->com.looker.sdk.Project["git_application_server_http_scheme"]))
...
at com.looker.rtl.APIMethods.ok(APIMethods.kt:38) ~[kotlin-sdk-4.0.0.2.jar:na]
This worked until recently - I just updated to get the latest fix in 544.
sdk.update_project()
is now also failing with a 422 and perhaps it’s the same issue. Without being able to get projects, not clear how to debug further
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Looker SDK Basic Error
I get the following error when making a basic API call. I have setup env variables, and included the port number at the...
Read more >Issues · looker-open-source/sdk-codegen - GitHub
One SDK to rule them all, and in the codegen bind them - Issues ... Looker SDK error with python/ubuntu ... What is...
Read more >Looker API SDKs - Google Cloud
Looker offers an official Looker API client SDK in several languages: Ruby: You can install the Ruby SDK as a gem from rubygems.org....
Read more >Cannot find type definition file for 'request': ERROR in ...
I'm not well versed in Angular, but I think that error is a red herring. You're trying to use the Node version of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So glad you have a work-around!
FWIW I’ve removed that enum constraint for future Looker releases (because the spec doesn’t match reality) so the Kotlin SDK will be happy when we regenerate it after the API spec is updated. It will be a nullable string instead of an enum then.
Normally, we want more in our spec for clarity and integrity, but only if the enum is always guaranteed to have an established value. You receiving
""
when I receivenull
in my tests still puzzles me, though. I haven’t figured out the circumstance that causes it.And, now I won’t have to. 😉
@jkaster , thank you for the suggestion - will give it a try tomorrow.