I’m testing the application in field update but hitting an ArgumentException when calling AuthenticateApplication()… Not sure why. Any ideas?
Error:
#### Exception System.ArgumentException - 0xfd000000 (6) ####
#### Message:
#### GHIElectronics.TinyCLR.Update.InFieldUpdate::NativeAuthenticateApplication [IP: 0000] ####
#### GHIElectronics.TinyCLR.Update.InFieldUpdate::AuthenticateApplication [IP: 0023] ####
#### Ecu.ECU::CheckForAndUpdateFirmwareIfAvailable [IP: 0140] ####
#### Ecu.ECU::UsbHostController_OnConnectionChangedEvent [IP: 00cc] ####
#### GHIElectronics.TinyCLR.Devices.UsbHost.UsbHostController::OnConnectionChangedCallBack [IP: 0019] ####
#### GHIElectronics.TinyCLR.Devices.UsbHost.Provider.UsbHostControllerApiWrapper::<.ctor>b__6_0 [IP: 0042] ####
Source:
FileStream fsApp = null;
try
{
fsApp = new FileStream($"{drive.Name}PlaneAC_Preview2_Update0.tca", FileMode.Open);
}
catch(Exception e)
{
FileSystem.Unmount(media.Hdc);
p.WriteLine($"Firmware update not found: {e.ToString()}");
return;
}
if(fsApp == null)
{
return;
}
InFieldUpdate updater;
updater = new InFieldUpdate(fsApp);
if (updater == null)
{
return;
}
updater.ApplicationKey = new byte[] { redacted }; //Add key as byte array here.
try
{
updater.AuthenticateApplication(out var versionApp); <-- Exceptions here with ArgumentException
}
catch (Exception e)
{