updater.AuthenticateApplication fails with ArgumentException?

Thanks Dat, yes, this appears to be a USB reading problem…

This first stick I used is a Samsung BAR Plus 32GB USB 3.1. Note that flashing the chip with the update with TinyCLR Config off of the USB drive from the PC works successfully, so the file itself is not corrupted.

Using the simple IFU flashing code (but adding this to the top so USB works):

        var usbHostController = GHIElectronics.TinyCLR.Devices.UsbHost.UsbHostController.GetDefault();
        usbHostController.Enable();

… I get exactly the same error.

Also, if I change it to just read the bytes out of the filestream for testing purposes, the Read() function returns 0 bytes read:

        var fsApp = new FileStream($"{drive.Name}PlaneAC_Preview2_Update0.tca", FileMode.Open);

        var bufferSize = 1024;
        byte[] app = new byte[bufferSize];

        int bytesRead = 1;
        int totalBytesRead = 0;

        while (bytesRead > 0)
        {
            bytesRead = fsApp.Read(app, 0, bufferSize);   <-- Reads 0 bytes
            totalBytesRead += bytesRead;
            Debug.WriteLine($"Total read: {totalBytesRead}");
        }

So I tried a second USB stick, MBR, 128gb total size with a 12 GB FAT32 partition (only partition on the drive). This second stick is a SanDisk 128GB Ultra Fit USB 3.1. It sees the device as mass storage arrival and can mount the file system, but thinks the volume label is blank and can’t open/find the file (exception opening FileStream).

I tried a third USB stick, MBR, 32gb total size with a 32gb FAT32 partition (only partition on the drive). This is a Patriot Xporter XT 32 GB USB 2.0. It sees the device as mass storage arrival, but can’t even mount the file system (CLR_E_INVALID_OPERATION in FileSystem::Initialize).

All of these sticks work good on a PC, and the errors for each stick are 100% consistent to that stick (tried under both the simple IFU app and my main app, several times each) so it’s not a randomized/reliability failure. Do you have specific USB sticks that are known to work, like specific makes and models?