I am running a application I made in service fabric on the local dev cluster.
when debugging and seeing the output, its filled with
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
everything is green and I havent found anything that dont work as expected. So what exactly do I do to find out what it is that is an InvalidOperation :) ?
Checked event logs and diagnostic events and no errors are shown.
It is probably catched and handled inside SFA, if it would be serious it would be rethrown so I would not worry about it too much.
Might have to do with the fact that it is the local dev environment and certain operations are not valid in a non-azure / on-premises installation environment.
A local dev environment for example lets you simulate a 5 node cluster on a single machine. Any exceptions caused by that might be catched and if it is detected that it is a non-real world environment it could be handled in a different way.
I'm seeing exactly the same thing, but in production as well and agree that I don't think it's a problem, though it will impact performance.
I'll put a few more things in context to hopefully help other people who see the same thing.
Here's my code which works correctly and I don't see the exception being thrown all the way up.
Log.Information("About to record activity for {Machine}", machineId);
using (var tx = StateManager.CreateTransaction())
{
await map.AddOrUpdateAsync(tx, machineId, _ => new SystemInfo { LastSeenUtc = timestampUtc }, (_, info) =>
{
info.LastSeenUtc = timestampUtc;
return info;
}).ConfigureAwait(false);
await tx.CommitAsync().ConfigureAwait(false);
Log.Information("Just committed transaction {Tx}", tx.TransactionId);
}
Log.Information("Recorded activity for {Machine}", machineId);
And with the debug output window. I'm using serilog with the Serilog.Sinks.Debug sink to capture the output.
[07:48:27 INF] About to record activity for d6441d45e1834db7860c00a8074652f9
[07:48:27 INF] Just committed transaction 131489813076754311
[07:48:27 INF] Recorded activity for d6441d45e1834db7860c00a8074652f9
Exception thrown: 'System.InvalidOperationException' in Microsoft.ServiceFabric.Data.Impl.dll
Transaction 131489813076754311 is committing or rolling back or has already committed or rolled back
And I see the stack trace as
Everything else appears to be fine - but throwing exceptions is not great for performance.
Related
Very soon after launch CoreData+CloudKit (NSPersistentCloudKitContainer) crashes by throwing this exception:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Must register a handler for activity identifier "com.apple.coredata.cloudkit.activity.import." before submitting it'
terminating with uncaught exception of type CKException
I can't seem to find any documentation on handlers needed for activity imports. I am guessing this is an iOS 14 bug???
It is. I have the same error. On Simulator works great while on Device crashes. My guess is a problem CloudKit and the Persistent Store. They need fix this.
Uploading job plans into MAXIMO 7.6 using mxloader sheet; the next jonb plan does not go in because of ERROR 500 stating that 'BMXAA4160E - A major exception has occurred' comes up.
I have queried successful uploads from the DEMO and then used to format for mine.
I expect that all the distinct job plans upload at one run of the MXloader. This is the error message that I received
Error 500: nested exception is: psdi.util.MXSystemException:
BMXAA4160E - A major exception has occurred. Check the system log to
see if there are any companion errors logged. Report this error to your
system administrator.
I'm trying to use Azure Notification Hub to handle my MPNS WUP app notifications on a Unity3D generated project.
I used the following article to setup it in Visual Studio 2015 on the generated project: Getting started with Notification Hubs for Windows Universal Platform Apps
The app compiles and once it runs the following async code...
var result = await hub.RegisterNativeAsync(channel.Uri);
...the console prints the following log:
Exception thrown: 'System.Runtime.InteropServices.COMException' in Microsoft.WindowsAzure.Messaging.Managed.dll
WinRT information: ResourceMap Not Found.
Exception thrown: 'System.TypeInitializationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in Microsoft.WindowsAzure.Messaging.Managed.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
OnWebCamTextureToMatHelperDisposed
(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 45)
Exception thrown: 'Microsoft.WindowsAzure.Messaging.RegistrationException' in mscorlib.ni.dll
Unhandled 'Platform.COMException' exception caught! - 'The text associated with this error code could not be found.
The type initializer for 'Microsoft.WindowsAzure.Messaging.Http.Resources' threw an exception.', Sender: '<null>'. Missing try/catch blocks.
(Filename: C:\buildslave\unity\build\PlatformDependent/MetroPlayer/MetroDebug.cpp Line: 41)
My current setup is:
Unity3D 5.4.3p4
Visual Studio 2015
WindowsAzure.Messaging.Managed 0.1.7.9 (I also tried with 0.1.7.8 that is used in the getting started article)
We tested also this on a native WUP project using the same how-to article and had the same problem.
In the end we discovered it was not related to Unity or the project configuration as we thought, but to the Azure Account.
The Pricing Tier on the the Microsoft Azure Notification Hub was defined as Free (limit to 500 Active Devices), after changing it to Basic (limit to 200K Active Devices) the exception is gone.
This was a really bad experience and took some days for our team to find out the reason as the exception has no real link to the actual issue nor the Microsoft Azure Dashboard has any notification related to the limit on the push registrations.
I have a Xamarin app using the Microsoft.Azure.Devices.Client.DeviceClient to listen for messages from the Azure IoT hub. Occasionally I get errors thrown that I cannot catch, and deal with. One such exception is:
Microsoft.Azure.Devices.Client.Exceptions.UnauthorizedException
This exception is just an example of an exception I am getting, and one that I can reliably recreate by changing system time. Other IoTHubExceptions are sporadic and difficult to recreate and hence the need to try and catch the exception.
Can anyone tell me how I can catch these IoT hub based errors? The code is:
try
{
await _deviceClientInbound.OpenAsync();
// execution never gets passed this line and the exception is eventually thrown, having reached this point
Message receivedMessage = await _deviceClientInbound.ReceiveAsync();
if (receivedMessage == null) continue;
await _deviceClientInbound.CompleteAsync(receivedMessage);
}
catch (Exception e)
{
// Exception is never caught in here ...
// How can I catch the IoTHubException based exceptions
}
If you are getting unauthorized exception . Then please check your iot hub connection string used in device client to confirm that the shared access polity used with connection string have all the privileges or not, that is needed at your end.
I believe this has to do with the various refactorings done for the supported platforms and you will likely have to catch all exceptions, process the ones you want, and rethrow ones you don't. Depending on platform you might be able to include:
using Microsoft.Azure.Devices.Client.Exceptions;
The sources are here if you feel like spelunking:
https://github.com/Azure/azure-iot-sdk-csharp/search?utf8=%E2%9C%93&q=using+Microsoft.Azure.Devices.Client.Exceptions
I'm having a problem where I'm trying to delete a folder that I've created asynchronously. I can't seem to use System.IO.File to delete synchronously because Visual Studio Express claims that this does not exist. When I use DeleteAsync(), the folder deletes just fine, but it also throws a FileNotFoundException, which is a problem because it causes my program to fail, even though the folder gets deleted successfully. It's been giving me issues for days.
I've initialized the folder like this
StorageFolder zip_contents_folder = await ApplicationData.Current.LocalFolder.CreateFolderAsync("Zip Contents", CreationCollisionOption.ReplaceExisting);
and, after extracting zip files to it, I delete it later by using
try
{
await zip_contents_folder.RenameAsync("trashfile2.xml", NameCollisionOption.GenerateUniqueName);
await zip_contents_folder.DeleteAsync();
}
catch (Exception e_deletezipfolder)
{
System.Diagnostics.Debug.WriteLine(e_deletezipfolder.ToString());
}
EDIT:
This is the output to the console. It's happening right after my 3rd party DLL is loaded
'Indigo.exe' (Managed (v4.0.30319)): Loaded 'D:\Skydrive\Visual Studio Projects\eBook\Indigo\bin\Debug\AppX\Ionic.Zip.DLL'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.dll
Does anyone know a workaround for this problem?