mdziekon / octoprint-spoolman

An OctoPrint plugin integrating with Spoolman, a universal filament spools inventory manager.
GNU Affero General Public License v3.0
27 stars 3 forks source link

Plugin fails to connect with forward-slash on the end of the instance URL #31

Closed ars3nic closed 6 months ago

ars3nic commented 6 months ago

The problem

When providing the Spoolman instance URL to the plugin, if a forward slash ('/') is included at the end of the URL, the plugin fails to connect to the instance and returns "Unknown error". Removing the slash results in a successful connection to Spoolman.

2024-04-28 09_23_01-OctoPrint 2024-04-28 09_23_08-OctoPrint

I discovered this issue when I copied my Spoolman URL from the Chrome address bar to paste it into the plugin, and Chrome automatically appended the slash after the port number. So it's not a big deal, but given Chrome's popularity and the likelihood that other people will encounter this, either providing a notice to the user or automatically ignoring/dropping the slash would be helpful.

Version of octoprint-spoolman

1.0.1

Version of OctoPrint

1.10.0

Operating system running OctoPrint

OctoPi 1.0.0

Printer model & used firmware incl. version

No response

Browser and version of browser, operating system running browser

Chrome 124.0.6367.63, Windows 10

Checklist of files to include below

Additional information & file uploads

octoprint-systeminfo-20240428092805.zip

mdziekon commented 6 months ago

Hi @ars3nic, thanks for the bringing my attention to this problem.

Ignoring the trailing slash sounds indeed like a good idea, as this might be a common issue. Will put this on my backlog.

mdziekon commented 6 months ago

Fix has been merged into master, and I'll try to push a release candidate as well.