Octoprint (OctoPi) 1.10.0 upgraded failed: HASH error

What is the problem?

Octoprint (OctoPi) upgrade fails with HASH errors

What did you already try to solve it?

Started with a new 32GB SDXC card, installed OctoPi via the Raspberry Pi Imager; booted up and opened a web browser and was presented with the Upgrade prompt. The upgrade failed with HASH error with "zeroconf". Updated OctoPi system (sudo apt upgrade). Stopped there and went into Safe Mode. Upgrade failed again.

Have you tried running in safe mode?

Yes, and upgrade still failed.

Did running in safe mode solve the problem?

No.

Systeminfo Bundle

octoprint-systeminfo-20240425083417.zip (448.1 KB)

Additional information about your setup

Raspberry Pi 4B, 4GB. Printer not yet connected.

Hi there

To be honest I'm not quite sure what is happening there, but it seems to me that you have issues with either the network connection to the Pi or your internet connection.

For some reason a download doesn't finish and causes file check errors

2024-04-25 07:48:45,286 > Collecting zeroconf~=0.127
2024-04-25 07:48:45,287 > Downloading https://www.piwheels.org/simple/zeroconf/zeroconf-0.132.2-cp39-cp39-manylinux_2_31_armv7l.whl (8.6 MB)
2024-04-25 07:50:57,723 > ━━━━━━━━━━╸                              2.4/8.6 MB 18.7 kB/s eta 0:05:35
2024-04-25 07:50:58,225 ! ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
2024-04-25 07:50:58,226 ! zeroconf~=0.127 from https://www.piwheels.org/simple/zeroconf/zeroconf-0.132.2-cp39-cp39-manylinux_2_31_armv7l.whl#sha256=4c4bd2fe7ee9ff5dd36bd88bfb0dd7ab8c3dab9b10fbb086d78f9d253be3801e (from OctoPrint==1.10.0):
2024-04-25 07:50:58,226 ! Expected sha256 4c4bd2fe7ee9ff5dd36bd88bfb0dd7ab8c3dab9b10fbb086d78f9d253be3801e
2024-04-25 07:50:58,227 ! Got        aa4b50eabff22828396e3e820964d4df2754ccd10eec4f0cc63f486d179807ce
2024-04-25 07:50:58,227 !

We weren't able to duplicate the issue, so we assume the problem is somehow on your end.

The new updated OctoPi image was just released and should be the easiest and fastest solution for :slight_smile:
Just flash it and OctoPrint will be up to date.

Greetings,
Thanks for the quick reply, and it's easy to just start over at this point. I'm glad to hear there is a new Image, and I hope all (173) the OS modules (sudo apt upgrade) were also updated.
As for my network, I'm not sure how I would experience the same failure multiple times at different time of the day. My network is all Ubiquiti based, and in this case, direct Ethernet connected. I've not experienced any network issues on any my servers and PCs otherwise.
Thanks again,
Thom

I do believe that is part of building a new image, to bring all the packages up to date as well.

I think I'd agree with @PrintedWeezl's "diagnosis" here - it does seem to cut off mid-download of the dependency zeroconf. Pip then, correctly, refuses to complete the installation because the download failed. It doesn't show any errors about why the download stopped, which is quite strange though.

Hello again,
Two things: I did reboot my entire network and the update worked fine. I'm not sure what was going on, but that fixed it. Thanks.
Second, I subsequently started over and re-Imaged with the new release. Much to my amazement, all the OS packages still needed updating. I would seem to me that the new release would be tested on an up-to-date OS version before it was released and Imaged. Just saying.
Thom

You are severely underestimating the testing overhead here. OctoPrint only has one full time resource, me. We've seen significant and also subtle breakage on package updates in the past, especially with new haproxy and python packages, but basically anything can cause the image to break since we don't control whatever gets thrown on the apt repo.

Running an apt upgrade on each image build would therefore require a significant amount of testing that is simply not possible to perform. It would require me to regularly drop everything else and concentrate on nothing but testing a new build for days. That is not feasible, there's already more work to be done than there's time to do it.

The image updates instead have a different goal: updating a very limited amount of software, primarily OctoPrint but also the kernel and firmware, in order to keep things usable if RPi decides to throw out another hardware revision that needs new firmware to boot (this has happened in the past and was the reason we even added this update).

Tldr: yes, keeping these images fully updated would be nice. Alas, it is simply not possible to do so with the current resources, so instead the focus is on a curated list of included software, kept as short as possible. Work is being done to improve (not solve) this situation, but for now things are as they are.

2 Likes

I had the same exact problem.

Solution was straightforward enough: get pip to bypass downloading the whl file and instead use one you downloaded yourself.

Breakdown:

  1. Run the software update button from octoprint ; when it fails, close the update progress window but keep the software update screen open as shown below to be safe

  1. open the octoprint software update log file (e.g. /home/pi/.octoprint/logs/plugin_softwareupdate_console.log) and locate the URL of the zeroconf file to download e.g.
    https://www.piwheels.org/simple/zeroconf/zeroconf-0.132.2-cp39-cp39-manylinux_2_31_armv7l.whl
  2. Download the whl file using your browser directly by clicking the link OR by copying the URL to your browser's address bar and hitting ENTER
  3. Save or copy the downloaded file onto the octopi e.g. at /home/pi/temp/zeroconf-0.132.2-cp39-cp39-manylinux_2_31_armv7l.whl
  4. Now, on the octopi console, run the appropriate command to manually install our downloaded whl package file, using pip e.g.
    ~/oprint/bin/python -m pip --disable-pip-version-check install ~/temp/zeroconf-0.132.2-cp39-cp39-manylinux_2_31_armv7l.whl --no-cache-dir

Important: Before doing step 5

  • only do this once you are ready to immediately perform the next step, as this puts octoprint into a partially upgraded, possibly somewhat broken state, so
  • Keep the octoprint update screen open and do not close ; open it back up again before starting this step if you previously closed it
  1. Now in the octoprint web page, immediately click the update software button again. This time, octoprint will try again but notice that the zeroconf module has already been upgraded, thus bypassing the download attempt and all the errors that come with that.

Note 1: paths that use /home/pi/ assumes your octopi's Raspian OS admin user is called the default of 'pi' ; change all paths in the steps above to use /home/AdminUserNameHere/rest/of/the/path

Note 2: The systeminfo bundle below is my setup after completing the upgrade

octoprint-systeminfo-20240501135401.zip (74.8 KB)

Thank you for this! My update stopped at exactly the same file and your steps worked perfectly!

I am having the same issue. will try the steps above and report back! thank you!