Teensyduino 1.59 Beta #6

@PaulStoffregen:

OK, I have another data point in the saga of "Unexpected EOF" when installing TD 0.59.6 on a new Arduino IDE 2.x.x installation.

As a recap, my earlier experiences were reported with a brand new installation of Windows 10pro on a brand new PC & SSD, followed by a brand new installation of Arduino IDE 2.2.1. I added the https://www.pjrc.com/teensy/package_teensy_159b6_index.json link and selected TD 0.59.6 for installation. The installation failed with an error of "Unexpected EOF". The details can be found in post <#8> & additional details in post <#17> above.

Today, I was working on my laptop where I normally do all of my Teensy development. It is running Windows 11pro, with Arduino IDE 1.8.19 + TD 1.59b6. I installed Arduino 2.3.0 (the very first time that any version of the new IDE has been installed on this PC). I added the https://www.pjrc.com/teensy/package_teensy_159b6_index.json link & selected 0.59.6 for installation. I was prompted to install the core files from TD 1.58.1, which I accepted. Following this, I again selected TD 0.59.6 for installation from the Boards Manager. This installation once again failed with the error report of "Unexpected EOF". I selected TF 0.59.5 for installation, which succeeded. I then reselected TD 0.59.6 for installation, which also succeeded.

Still seems to be something that is done/provided by TD 0.59.5 that is not done/provided by 0.59.6, but determining exactly what that is is very likely way above my pay grade & capabilities.

Hope this helps . . .

Mark J Culross
KD5RXT
 
Looks like IDE 2.3.0 adding this little refresh button when it has new info. Why it sometimes does this rather than showing the new info is beyond me. At least it's there. Will likely come up on this forum from time to time as more people starting using IDE 2.3.0.

1707324182000.png
 
Summary point, repeated at the bottom: Something changed between 1.57 and 1.58 that prevents me from running the built-in Teensy Loader app from the 1.8.19 Teensyduino IDE install in all versions from 1.58 and onwards.

I can no longer seem to start Teensy Loader after a fresh install of the 1.8.19 Teensyduino 1.59-beta6 IDE. Here's the error after clicking the "Verify" button for the Blink example:
Code:
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/teensy_post_compile -file=Blink.ino -path=/var/folders/m2/1qw3dc9j34v6581pdk8f9c0c0000gn/T/arduino_build_793052 -tools=/Applications/Teensyduino.app/Contents/Java/hardware/teensy/../tools/ -board=TEENSY41
Opening Teensy Loader...
Unable find Teensy Loader.  (p)  Is the Teensy Loader application running?
quitexit status 1
Error compiling for board Teensy 4.1.

I'm on macOS Sonoma 14.2.1. In Activity monitor, there's no process with the word "teensy" running, with the exception of "teensy_ports" that only seems to run when the app is open.

Here's what happens when I try to run the app from the command line:
Code:
open /Applications/Teensyduino.app/Contents/Java/hardware/tools/teensy.app
Code:
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=3057, NSUnderlyingError=0x600003c09110 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600003c08ff0 {Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedDescription=Unable to determine executable path.}}}}}

Directly opening the Teensy Loader app from the 0.59.6 Arduino IDE (v2.3.0) install is a success:
Code:
open ~/Library/Arduino15/packages/teensy/tools/teensy-tools/0.59.6/teensy.app

Once that's open, in the 1.8.19 Teensyduino IDE, I can now Verify and Upload successfully through that alternative Teensy Loader that's now running. I tried the previous 1.8.19 IDE Teensyduino version (1.58), and it also shows this error.

I've tried rebooting, uninstalling the Arduino v2 Teensy install and reinstalling. I've tried reinstalling the 1.8.19 IDE version, all to no avail. I'm at a loss as to what happened.

Next, I tried going backwards in releases and discovered that the Teensyduino 1.57 install works — I do not see the error and the loader app opens just fine. Something changed between 1.57 and 1.58 that prevents me from running the built-in Teensy Loader app from the 1.8.19 Teensyduino IDE install in all versions from 1.58 and onwards.
 
Looks like IDE 2.3.0 adding this little refresh button when it has new info. Why it sometimes does this rather than showing the new info is beyond me. At least it's there. Will likely come up on this forum from time to time as more people starting using IDE 2.3.0.

View attachment 33199
I played with this a bit and I think I have it figured out what it actually does. Let's say I have A GIGA R1 plugged in and have it selected. Then unplug the GIGA R1 and plug in a T4.1 then click on the info button and hover the mouse over the refresh button it shows the T4.1 is plugged into that particular USB port. If I click the refresh button it will automatically deselect the GIGA and select the T4.1 without having to select it from the boards menu. It seems to be a shortcut of sorts. I think. Maybe there is more to it...

Edit: Switching between The T4.1 and MicroMod does not show the refresh button. It automatically shows the the new board that was plugged in.
Edit2: If a person plugs in a T4.1 and a MicroMod the refresh buttons appear for both and clicking on them selects the correcct USB port for each one.
 
Last edited:
I am experiencing problems uploading to a T3.5 (Teensyduino 1.59b6).
The Com port has started to disappear and the Teensyduino uploader is unable to find the Teensy whether set to COM or COM(Teense 3.5)Serial....
The only solution is to re-boot Windows (W10Pro), sometimes even that is not enough and a power down - wait - restart is required.
Even with this routine Windows seems to be screwed, showing an empty desktop screen without any content for a number of minutes.
I have reverted back to Teensyduino 1.59b4 and the problem seems to have gone away.

The Teensy 3.5 is externally powered from a Rapberry Pi Power Supply and the pads on the underside have been cut to separate VUSB from VIN.

EDIT: It seemed to happen occasionally in 1.59b5 but much more so in 1.59b6.
 
Last edited:
This installation once again failed with the error report of "Unexpected EOF".

I'm hoping you can get this Unexpected EOF to happen again. If so, please look in {AppData}\Local\Arduino15\staging\packages. The file you want is "teensy-package.tar.zst". If you're installing 0.59.6, it should be 26,729,059 bytes. The main question is whether you have that file and it's the correct size? Here's a screenshot of Windows Explorer showing it on my Windows test machine.

capture.png
 
The Com port has started to disappear and the Teensyduino uploader is unable to find the Teensy whether set to COM or COM(Teense 3.5)Serial....

Can you save the Help > Verbose Information log from Teensy Loader shortly after this happens?
 
I'm on macOS Sonoma 14.2.1.

Is this Apple Silicon or Intel CPU?

I've been testing on an 2015 Macbook Air with Intel CPU, which has Monterey. My only Apple Silicon Mac is running running Ventura. I'm starting the update now to Sonoma. It's saying I'll get 14.3 when it's done.
 
Note: I believe I saw the unexpected EOF message earlier today as well, but it was on one of the Arduino board updates MBED something (3 different ones updated, don't remember which one).
Note: I have also had a sketch open up Read only today and I could not edit it. But then I simply closed the sketch and reopened and it worked.
I posted about that up on the Arduino Forum:

 
MacOS Sonoma (14.3) finished installing. I updated Arduino IDE to 2.3.0, then updated Teensyduino to 0.59.6.

Clicked Verify and Teensy Loader appeared.

sc.jpg
 
IDE 2.3.0 installed fine and worked for DevBoard build.
Maybe good day to release :D it as Arduino just released 2.3.0 As well as board updates for several boards.
Seems a good idea with a couple forum installs showing no new issues.

Opened 2.1 and got some weird 'something changed restart' - did that twice and close and then the offer for 2.3 stayed and did download and install no problem.

Opened current sketch and did Upload that worked (build good but upload pushed through TyComm delegating to Teensy.exe)
<opps forgot to Post>
This message popped up again when I went back to the IDE earlier - same as seen before 2.3 update with 2.1 - not sure what propmted this
1707353658721.png
 
Maybe good day to release :D

Oh believe me, I really want to wrap up 1.59 release!

But first I want to try investigating @BriComp's issue reported in msg #30 (even though it lacks the specific code I'm supposed to run on Teensy 3.5... hint.. hint...)

I also recently saw a case where Windows got very confused while using an externally powered Teensy, even caused other USB devices like an ordinary Logitech mouse to stop working, and Windows took forever to shut down and ultimately decided to send some sort of crash report to Microsoft (or course without asking for my consent). Maybe these are unrelated. Maybe something else went wrong on that test PC. But perhaps something isn't quite right and perhaps has been that way for a long time but we've just never been able to reproduce it?
 
Also unresolved is @kd5rxt-mark "Unexpected EOF" during install. I'm pretty sure that's going to turn out to be an Arduino CLI issue. But maybe their downloads have some sort of race condition when the prior filename and new filename are the same? I see they're putting the version number into their filenames, so all are unique. On the PJRC server, they're in different folders but the files within each folder have the same names. I might try symlinks and yet another package index file, if Mark confirms the problem is still happening. Changing how I publish the files would be inconvenient, but not nearly as inconvenient as people getting stuck with problems installing.
 
Paul:

I can get the "Unexpected EOF" to happen quite regularly.

Here's how it's happening for me:

0) Arduino IDE 2.3.0 on Windows 11pro, with TD 1.58.1 installed (also have separately installed Arduino IDE 1.8.19 + TD 1.59b6)
1) Open Boards Manager & select 0.59.6 (shows TD 1.58.1 as current), then click INSTALL (picture #1)
2) Installation fails with "Unexpected EOF" (picture #2)

1707358571388.png


1707358591582.png


And, here's the file info as requested:

1707358985573.png


Anything else that I can provide that might also be helpful ??

Mark J Culross
KD5RXT
 
I found at least 1 other "unexpected EOF" report. It had additional info like "wsarecv: An existing connection was forcibly closed by the remote host", so maybe a different problem? Or maybe related?

@PaulStoffregen:

We are currently camping at Lake Kissimmee State Park in Florida, so internet is probably not quite at the usual level of service that we have at home.

Mark J Culross
KD5RXT
 
2) Installation fails with "Unexpected EOF" (picture #2)

Looks like your teensy-package.tar.zst file is definitely wrong. It's only 26,207,755 bytes.

1707360421859.png


The correct teensy-package.tar.zst file for 0.59.6 is 26,729,059 bytes.

1707360470779.png


None of the copies of teensy-package.tar.zst on the PJRC server are 26,207,755 bytes. Here are all teensy-package.tar.zst:

-rw-rw-r-- 1 paul paul 27335653 Mar 19 2023 td_156/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 27364581 Mar 19 2023 td_157/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 28886053 Apr 19 2023 td_158-1/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 28886029 Mar 31 2023 td_158/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 28688602 Aug 9 15:44 td_159-beta3/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 26728904 Dec 2 11:28 td_159-beta4/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 26720582 Jan 15 01:33 td_159-beta5-prelim/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 26725149 Jan 17 15:51 td_159-beta5/teensy-package.tar.zst -rw-rw-r-- 1 paul paul 26729059 Feb 4 23:22 td_159-beta6/teensy-package.tar.zst
 
OK, as another test, I downloaded multiple times, each with the following resulting properties:

Install 0.59.6 over 1.58.1:
1707360063097.png

Result: Unexpected EOF

Install 0.59.6 over 1.58.1:
1707360152564.png

Result: SUCCESS !!

Install 1.58.1 over 0.59.6:
1707360493005.png

Result: Unexpected EOF (on 1.58.1 !!)

Install 1.58.1 over 0.59.6:
1707360639690.png

Result: SUCCESS !!

Install 0.59.6 over 1.58.1:
1707360845507.png

Result: SUCCESS !!

As you suspected/predicted, it now seems that this failure mechanism is very likely caused by an incomplete download.

Mark J Culross
KD5RXT
 

Attachments

  • 1707360734964.png
    1707360734964.png
    42.6 KB · Views: 59
Maybe Arduino IDE is asking a browser to download the file, and the browser got an incomplete download 1 time and keeps retrieving the incomplete file from its cache?
 
Last edited:
Best guess is this (probably) means the file wasn't fully downloaded. But I don't understand why, because the package index tell the file size and a SHA256 checksum, so it really ought to be able to know if it doesn't have the full file.

My understanding is Arduino CLI (running underneath Arduino IDE) is supposed to fully remove the old files and then extract everything from the new download. It should be partially reusing stuff from the 0.59.5 package in the 0.59.6 package (or "Platform").
So, maybe their download mechanism is not really verifying the checksum ?? Or not handling an invalid checksum correctly ??

Mark J Culross
KD5RXT
 
Maybe Arduino IDE is asking a browser to download the file, and the browser got an incompletely download 1 time and keeps reserving the incomplete file from its cache?
Looking at my post #45 above, you'll notice that I also got the "Unexpected EOF" on an attempted install of 1.58.1, which had certainly succeeded a number of times before. Additionally, two of the subsequent attempted installs of 0.59.6 failed with different file sizes (each incomplete). With all of this in mind, it looks like each download is new & unique, just that some of them are simply incomplete. After sufficient attempts, I can usually get each install to finally succeed.

Mark J Culross
KD5RXT
 
Is this Apple Silicon or Intel CPU?

I've been testing on an 2015 Macbook Air with Intel CPU, which has Monterey. My only Apple Silicon Mac is running running Ventura. I'm starting the update now to Sonoma. It's saying I'll get 14.3 when it's done.
Intel. MacBook Pro bought in 2020.
 
Back
Top