elsa-workflows / elsa-workflows/elsa-core

MongoDB Instances View Internal Server Error

Open
#5,715 4 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

### Discussed in https://github.com/elsa-workflows/elsa-core/discussions/5707

Originally posted by **gustavoaraujocardozo** July 4, 2024
I have setting the project to run with mongo db, like this...

elsa.UseMongoDb($"{mongoDbConnectionString}/{mongoDbName}");

elsa.UseWorkflowManagement(management =>
{
management.UseMongoDb();
});

elsa.UseWorkflowRuntime(runtime =>
{
runtime.UseMongoDb();
});

after execute my workflow while checking the instances, i got this error

System.FormatException: An error occurred while deserializing the Outputs property of class Elsa.Workflows.Runtime.Entities.ActivityExecutionRecord: An error occurred while deserializing the MemoryBlockReference property of class Elsa.Workflows.Models.Argument: Type is not supported.
---> System.FormatException: An error occurred while deserializing the MemoryBlockReference property of class Elsa.Workflows.Models.Argument: Type is not supported.
---> System.ArgumentException: Type is not supported.
at System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(QCallTypeHandle type, ObjectHandleOnStack retObject)
at System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(Type type)
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeClass(BsonDeserializationContext context)
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Deserialize(BsonDeserializationContext context, BsonDeserializationArgs args)
at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.DeserializeMemberValue(BsonDeserializationContext context, BsonMemberMap memberMap)

![image](https://github.com/elsa-workflows/elsa-core/assets/11926577/bcdf5c8f-cc34-4df2-a349-282df7695b74)

I got the error at this point when call this endpoint (https://localhost:7268/elsa/api/activity-executions/report)

![image](https://github.com/elsa-workflows/elsa-core/assets/11926577/def43c9b-ecce-4b91-bf97-2a4d2dd0c118)

the same is not true while using sql lite, just with mongo db. The problem start when i click on executions tab.

![image](https://github.com/elsa-workflows/elsa-core/assets/11926577/0c0da361-5506-478f-bdb7-20d03fe2bd8a)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.