Updating to 1.4.0 caused PrusaSlicer to give HTTP 403 on any upload attempt

Well, this form looks friendly :smile:

What is the problem?
After updating to 1.4.0 through the web interface, PrusaSlicer can no longer upload files to the Octoprint server - pops up error 403, as below:

I don't use an API key as I don't have my instance accessible through the net (don't have configuration access to shared router). Of course, I was previously able to upload files normally just by pressing "send G-code".

What did you already try to solve it?
Googling the hell out of it. Most reports I can find are unrelated, saying they can't access the server interface at all (I can access everything just fine in browser - I can still upload files manually and print them). I haven't found a single other instance of this specific issue.

I also can't replicate in browser exactly what PrusaSlicer is doing. I can only tell from the logs that it's POSTing to /api/files/local, and when I browse to that URL, I get a JSON response of happiness. Also, if I "browse" in PrusaSlicer, it shows up, and if I "test", it reports success.
For some reason, "new users can only put 1 image in a post", so you're just gonna have to click these links instead:
upload://iL7KiavVuaeEAQuobs3nkJ4ynLU.png
upload://imjmWo3c4qpnrbwlbjIUyQJO7yE.png
edit: WELP THAT DOESN'T WORK EITHER :rofl: guess you're just gonna have to trust me.

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)
Screenshot above. Confirmed by a line in the octoprint.log file:
2020-03-18 16:43:08,058 - tornado.access - WARNING - 403 POST /api/files/local (::ffff:192.168.86.26) 484.36ms
Nothing above or below it in this relevant time frame. Immediately before, I connected to the printer; immediately after, I uploaded the file manually. This is the only relevant log entry for when I encountered the screenshot above.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)
OctoPi on a Pi Zero, unmodified but apt-get updated a while ago, then updated through the UI when it popped up for 1.4.0 just a day ago.
OctoPrint version : 1.4.0
OctoPi version : 0.17.0
Previously had the Malyan connectivity fix plugin installed, but no longer needed after updating printer firmware to also give the necessary thermal runaway support (as prompted by the nag dialog to research & do the update), so I removed it. Running plugin-free now.
Monoprice Select Mini v2 cyborg mashup of countless repaired parts
PrusaSlicer 2.1.1 (201912101512) on Windows 10

Sounds familiar.

Close! Very, very close. But no cigar. I imagine I couldn't find it because OP of that thread found new and creative ways to botch the spelling of PrusaSlicer :wink: so it's impossible to find...

Unfortunately, the solution involved a settings page that doesn't exist - referring to "features/access control", which is a page I just don't have in my Settings menu.

In fact there's really not much of anything there.

Copying the API key out of that API tab and pasting it into PrusaSlicer's config page, though, did seem to do the trick. Odd that it needs that. The 403 message really ought to be more clear, in my opinion.

2 Likes

So if I see that message "There are no application keys registered yet." How do I register an application key and why would I want to?

Should "Allow [Cross Origin Resource Sharing (CORS)" be ticked?

BTW Copying the API key from OctoPrint Settings/API into PrusaSlicer/Printer settings/Print host upload/API key does work

2 Likes

Fixed that for ya (in the original thread).