uwolfer / gerrit-intellij-plugin

Gerrit Code Review Tool Integration for the IntelliJ Platform
Apache License 2.0
495 stars 102 forks source link

Fails to interact with rest api #422

Closed theoman6 closed 3 years ago

theoman6 commented 3 years ago

2:58 PM Failed set file review status for Gerrit change: com.google.gerrit.extensions.restapi.RestApiException: Expected JSON but got 'text/html'.

2:58 PM Failed to save draft comment: com.google.gerrit.extensions.restapi.RestApiException: Expected JSON but got 'text/html'.

I get this on clicking on the diff and adding comments.

Gerrit 3.4.1 Plugin 1.2.5-203

uwolfer commented 3 years ago

@theoman6: Do other operations work for you? For example set a star for a change (using change context menu) or any other write operation?

uwolfer commented 3 years ago

@theoman6: Please see my question above. I'll mark this issue as closed as long as I do not receive a feedback.

teodozjan commented 2 years ago

Hi. I'm having the same issue on windows but not on linux. Can I help somehow to diagnose this defect?

uwolfer commented 2 years ago

@teodozjan: Do other operations work for you? For example set a star for a change (using change context menu) or any other write operation?

teodozjan commented 2 years ago

14:06 Failed to star Gerrit change (not supported for Gerrit versions older than 2.8): com.google.gerrit.extensions.restapi.RestApiException: Expected JSON but got 'text/html; charset=iso-8859-1

while server version is newer

Powered by Gerrit Code Review (3.4.1)

uwolfer commented 2 years ago

@teodozjan: What authentication method does your Gerrit server use? Is it a single sing on system?

teodozjan commented 2 years ago

No, it is user password based login

teodozjan commented 2 years ago

SOLVED

Problem was with http:// instead of https:// prefix. I feel little embarrassed to make such mistake. I'm not sure if plugin can show better information to a user? @uwolfer

uwolfer commented 2 years ago

Thanks for sharing the update.

I'm not sure how we can detect such an error in a better way in the plugin... In case your server also responds on http port, it will just result in an http error.