Unable to install STM32 based boards

Unable to install STM32 MCU based boards in board manager. I checked with them, they said the problem is with the Adruino IDE. I get the following error:


The proxy selected was Manual-HTTPS. Somehow the connection gets lost in between and then resumes randomly.

Hi @dr-kdj. When you install the "STM32 MCU based boards" platform, it is also necessary to install the toolchain that allows compilation for that architecture. The maintainers of that toolchains decided to use GitHub for the distribution of the fairly large toolchain release archive file (as opposed to self-hosting the files like the Arduino company does with our toolchains).

GitHub recently reduced the expiration time set for the token that is used to download these files. The expiration is now set for 5 minutes after the initiation of the download. This means that the download is intentionally failed if it takes longer than ~5 minutes (there is apparently some leeway on the enforcement of the expiration).

There is discussion about that here:

This means that the ability to successfully install the "STM32 MCU based boards" boards platform is dependent on the speed of your Internet connection. If the file can't be downloaded within five minutes, the platform installation fails with this "UNKNOWN: stream error: stream ID 1; PROTOCOL_ERROR; received from peer" error. It seems your Internet connection is too slow to download this file before the expiration of the token.

The workaround will be to manually download the file using a tool that supports resumption of downloads.

I'm happy to provide instructions you can follow to do that, but first I need to know exactly which file it is that is failing to download (there are multiple variants for different operating system architectures). Please do this:

  1. Attempt to install the platform, just as you did before.
  2. Wait for the installation to fail.
  3. You should now see that some information about the installation attempt was printed to the black "Output" panel at the bottom of the Arduino IDE window. Right click on that panel.
    A context menu will open.
  4. Select Copy All from the menu.
  5. Open a reply here on this forum topic by clicking the "Reply" button.
  6. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  7. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the copied output into the code block.
  8. Move the cursor outside of the code block markup before you add any additional text to your reply.
  9. Click the "Reply" button to publish the post.

Dear PTILLISCH,

Thank you for your explanation. Yes, I was thinking the same. I changed the internet connection from wireless to wired and now I am able to install the STM32 based boards. Unlike the other threads where they suggest to downgrade the Arduino IDE version, the Github 5 min time out is more strange!

You are welcome. I'm glad it is working now. Thanks for taking the time to share the solution you found!

Regards, Per

The Arduino developers are now tracking the problem of the failing platform installation here:

Even though the root cause of the failure is on GitHub's end, it is not clear whether they expected the change they made to have this type of effect, and whether they will ever take action to resolve the problems it caused. So it is worth investigating whether Arduino IDE can be made to manage to complete the downloads under these conditions.

If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:


:red_exclamation_mark: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on Arduino Forum.


I have an update to share on this. GitHub reported that they took measures to fix the problem:

I performed a test and found that the failure no longer occurs, even though the download took 12 minutes.

So I believe the problem is now resolved.

If anyone still encounters the "PROTOCOL_ERROR; received from peer" error when installing an Arduino boards platform, please comment here (or in the GitHub issue if you prefer) and we'll investigate further.