fieldOfView / Cura-OctoPrintPlugin

Cura plugin which enables printing directly to OctoPrint and monitoring the process
GNU Affero General Public License v3.0
484 stars 74 forks source link

Problems requesting API key #189

Closed Schmittfinger closed 3 years ago

Schmittfinger commented 3 years ago

Hi,

I have problems to connect my Octoprint (1.4.2) to cura (tested with 4.6 and 4.7) on windows 10. I can configure the octoprint-plugin in cura. If I click the Request... button for the API Key-field, my browser opens the octoprint-website and (after login) nothing happens. If I click the both once again, a new browser-tab opens with octoprint and in the first browser-tap appears a windows with "Do you allow cura to access to the octoprint-API - Allow / Disallow". I clicked allow but nothing happens again.

I tested to copy/paste the "global API key" from octoprint to Octoprint-Cura-Plugin - with the result "OctoPrint is not available". What I'm doing wrong?

My cura.log is attached.

Thanks Sebastian cura.log

fieldOfView commented 3 years ago

I've had a look at the logs. There are 17 cases where you pressed the Request... button. 16 of them end with the AppKey request being denied ("Disallow" was pressed). The last one ends with the AppKey request being accepted ("Allow" was pressed). I also see a lot of Connection refused or timeout when trying to access OctoPrint at http://192.168.178.71:80/api/settings errors.

Does your OctoPrint instance respond in a timely fashion when you open Connection refused or timeout when trying to access OctoPrint at http://192.168.178.71:80/api/settings?apikey=[your apikey] ?

fieldOfView commented 3 years ago

Possibly related to #188

Schmittfinger commented 3 years ago

Thanks for your hint. My problem is related to #188 I have a setup here with two printers and two octoprint-installations (for each printer).

I tested the following:

Question at this point - can I edit the different options (see attached screenshot) once again when octoprint is already connected?

Thanks and best regards,

Sebastian Settings

fieldOfView commented 3 years ago

It would be great if you could test this development snapshot, which should fix issues with managing keys for multiple OctoPrint instances.

Download the file and drop it onto the buildplate in Cura as if you were opening a 3d model.

grantx2016 commented 3 years ago

@fieldOfView My plugin also stopped working after upgrading to Cura 4.7. I can confirm that your development snapshot fixed the issue. Thanks for the quick action on this and keep up the great work on this plugin. It's very useful.

Schmittfinger commented 3 years ago

@fieldOfView Today I upgrade my cura to version 4.7.1 Unfortunatly with this version I had the same issues again - with the marketplace-plugin-version and the development snapshot. I hope I have more time for testing this weekend.

Thanks for your help.

Best regards, Sebastian

fieldOfView commented 3 years ago

A new day, a new development snapshot. I managed to break the appkey workflow (the Request... button) in the previous snapshot, unless you were very quick.

Schmittfinger commented 3 years ago

Thanks for your new development build. It works for me, too. Until now both of my printers had a seperate octoprint-installation each on a raspi 1. Some of my problems with the connection between cura and octoprint seems to be the little/bad performance of the raspi 1. Today I connected one of my printers to a raspi3 for testing (had issues with camera). I tried to connect cura to the octoprint on the raspi3 and it worked suddenly.

Best regards, Sebastian

fieldOfView commented 3 years ago

Fix is available in version 3.5.17 in the Marketplace