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

Can't connect Cura to Octoprint 1.5.1 #212

Closed ctwise closed 3 years ago

ctwise commented 3 years ago

First time using Octoprint and first time using Cura connector. I created an API key for my user, brought up Cura, brought up Connect to OctoPrint and entered the info for the octoprint server. I cliked on the 'Request...' button and a pop-up shows in Octoprint asking for approval. I press 'allow'. But on the Cura side it never changes from 'OctoPrint is not available'.

I put Wireshark on it and that just confuses me more. At either see '403 Forbidden' for each request or I see 202 waiting for approval messages.

I also never see my user in the 'User name' field under the API Key field.

Suggestions?

ctwise commented 3 years ago

I've continued to dig and the plugin doesn't ask for a username and password even though access control is turned on in Octoprint. I tried filling in the username in the proxy settings but that didn't work. The User name field just stays blank.

I'm able to access the http://octopi:80/api/settings from my browser but I see this in the Cura logs:

2020-12-06 20:13:36,088 - WARNING - [MainThread] OctoPrintPlugin.DiscoverOctoPrintAction._onRequestFailed [442]: Connection refused or timeout when trying to access OctoPrint at http://octopi:80/api/settings

ctwise commented 3 years ago

Discovery doesn't work because the printer is on a different network segment.

fieldOfView commented 3 years ago

I think this is a duplicate of #211

fieldOfView commented 3 years ago

the plugin doesn't ask for a username and password

This is correct. The plugin uses keys instead of a username/password. This key has a user connected to it.

ctwise commented 3 years ago

I don’t know if it’s the same problem or not. It’s not due to a timeout according to the logs.

On Mon, Dec 7, 2020 at 3:27 AM Aldo Hoeben notifications@github.com wrote:

the plugin doesn't ask for a username and password

This is correct. The plugin uses keys instead of a username/password. This key has a user connected to it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fieldOfView/Cura-OctoPrintPlugin/issues/212#issuecomment-739759129, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABLBQ5TAG5245J7UIXZHTSTSGXXANCNFSM4UPSYZKA .

fieldOfView commented 3 years ago

The only bit of log that you posted says:

OctoPrintPlugin.DiscoverOctoPrintAction._onRequestFailed [442]: Connection refused or timeout when trying to access OctoPrint at http://octopi:80/api/settings

ctwise commented 3 years ago

That’s a very valid point. And I verified that you are correct. I increased the timeout and it's working now. You can mark this as a duplicate of 211. Thanks for setting me straight. :-)

On Mon, Dec 7, 2020 at 10:09 AM Aldo Hoeben notifications@github.com wrote:

The only bit of log that you posted says:

OctoPrintPlugin.DiscoverOctoPrintAction._onRequestFailed [442]: Connection refused or timeout when trying to access OctoPrint at http://octopi:80/api/settings

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fieldOfView/Cura-OctoPrintPlugin/issues/212#issuecomment-739977340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABLBRVM3NRNLSTMTNSY5LSTTV2TANCNFSM4UPSYZKA .