Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.4.0rc2] /api/login?passive=true as sent by printoid causes Bad Request #3381

Closed
foosel opened this issue Dec 10, 2019 · 8 comments
Closed

[1.4.0rc2] /api/login?passive=true as sent by printoid causes Bad Request #3381

foosel opened this issue Dec 10, 2019 · 8 comments

Comments

@foosel
Copy link
Owner

@foosel foosel commented Dec 10, 2019

Problem

RC2 fixed the 504 error for cura but still getting 'command error:api/login?passive=true(400)' every few seconds in printoid with the new 14RC1 or 14RC2

Originally posted by @stevvie in #3349 (comment)

@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Dec 10, 2019

Issue is caused by printoid still using request parameters and a GET instead of a json body in a POST as specified by the API: http://docs.octoprint.org/en/master/api/general.html#post--api-login

1.3.x still supported that. JSON decoding behaviour in 1.4.0 changed due to an update of a library, making the fallback of reading request parameters no longer work.

Bringing back the fallback for 1.4.x but this should also be fixed on Printoid's side by adhering to the API specification!

@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Dec 10, 2019

Solved by the above commit, confirmed to work with current Printoid LITE.

@fieldOfView

This comment has been minimized.

Copy link
Contributor

@fieldOfView fieldOfView commented Dec 10, 2019

I was going to ask OP to fill in the issue template because there is info missing, but then I noticed who OP was ;-)

@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Dec 10, 2019

I just needed a ticket number ;)

@anthonyst91

This comment has been minimized.

Copy link

@anthonyst91 anthonyst91 commented Dec 10, 2019

Hello Gina,

The issue is now fixed in Printoid (on the devel branch only) :

  • OctoPrint v1.4.0-rc2 and above -> I now use POST with JSON body
  • OctoPrint v1.3.12 and below -> still use POST with request parameters for retro compatibility

I will publish the new release as soon as possible :)

@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Dec 10, 2019

  • OctoPrint v1.3.12 and below -> still use POST with request parameters for retro compatibility

That's actually not necessary, POST with JSON has always been the right thing, that the other stuff worked as well was just a left over from ... 1.1.x?

@anthonyst91

This comment has been minimized.

Copy link

@anthonyst91 anthonyst91 commented Dec 10, 2019

@foosel foosel added this to the 1.4.0 milestone Dec 11, 2019
@foosel

This comment has been minimized.

Copy link
Owner Author

@foosel foosel commented Dec 12, 2019

1.4.0rc3 has just been released

@foosel foosel closed this Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.