We're experiencing an issue with DevExpress Dashboards in combination with Asp.net Zero. Ofcourse we've contacted DevExpress Support desk (multiple times) but we're now at the end of our support scope.
DevExpress final answers were in the area of, "we don't support Asp.net Zero."
Now we're writing you, hoping you could assist us in this matter.
Description: We're using DevExpress Dashboard Endpoint and dashboard component in Asp.Net Zero (Angular). The dashboard functions on its own, and calls the API endpoint specified in the angular frontend. The backend, configured through startup.cs, is configured to listen to /api/dashboard endpoints, and a connection is made. So far so good! Most of the time this works beautifully..
The problem: While this works most of the time, sometimes we're seeing an issue that the charts inside DevExpress dashboard are being retrieved at the backend, but then, it returns an error in one or more of the charts. In more detail: The request from the dashboard frontend (which is send to the backend api/dashboard endpoint) contains a body with JSON. We've noticed that the issue is caused when the tag itemId: "" (string empty), so it fails when no itemId is requested, which turns out to be name of the chart inside the dashboard. (for instance: chartDashboardItem1) So whenever the json request contains itemId with a valid name, the call succeeds.. but when the property is an empty string; it fails. because the backend requires an itemid, and then returns an exception. This problems occurs randomly..
At first we thought this could be the work of an interceptor.. but as we've tested this out, we've let to believe there's no interceptor at work on the calls from the dashboard. The question we're asking is, do you have any idea or tips (we can check out) to see why sometimes the backend retrieves an incomplete request.
This only happens inside an Asp.net Zero project! (tested and proven) We cannot reproduce this issue outside an asp.net Zero project..
We've got 2 solutions running in ASP net Zero, and both use the dashboard.. Both environments show the same issue..
This is the file
\AspNetZeroRadTool\UnitOfMeasures.UnitOfMeasure.json
{
"IsRegenerate": true,
"MenuPosition": "main",
"RelativeNamespace": "UnitOfMeasures",
"EntityName": "UnitOfMeasure",
"EntityNamePlural": "UnitOfMeasures",
"TableName": "UnitOfMeasures",
"PrimaryKeyType": "Guid",
"BaseClass": "Entity",
"EntityHistory": false,
"AutoMigration": true,
"UpdateDatabase": true,
"CreateUserInterface": true,
"CreateViewOnly": true,
"CreateExcelExport": false,
"PagePermission": {
"Host": false,
"Tenant": true
},
"Properties": [
{
"Name": "Description",
"Type": "string",
"MaxLength": -1,
"MinLength": -1,
"Range": {
"IsRangeSet": false,
"MinimumValue": 0,
"MaximumValue": 0
},
"Required": false,
"Nullable": false,
"Regex": "",
"UserInterface": {
"AdvancedFilter": true,
"List": true,
"CreateOrUpdate": true
}
},
{
"Name": "UnitType",
"Type": "string",
"MaxLength": -1,
"MinLength": -1,
"Range": {
"IsRangeSet": false,
"MinimumValue": 0,
"MaximumValue": 0
},
"Required": true,
"Nullable": false,
"Regex": "",
"UserInterface": {
"AdvancedFilter": true,
"List": true,
"CreateOrUpdate": true
}
}
],
"NavigationProperties": [],
"EnumDefinitions": []
}
Product version: 10.3.0 Product type: Angular Product framework type: .net core ABP Framework version: 6.3.1.0
When I run the rad tool to add a component, the backend code is generated correctly, but in the frontend only a template class is added and not filled in. I dont' understand why?
// import {NgModule} from '@angular/core';
// import {AppSharedModule} from '@app/shared/app-shared.module';
// import {AdminSharedModule} from '@app/admin/shared/admin-shared.module';
// import {{{Master_Detail_Child_Prefix_Here}}UnitOfMeasuresComponent} from './{{master_Detail_Child_Prefix_Here}}unitOfMeasures.component';
// import {{{Master_Detail_Child_Prefix_Here}}CreateOrEditUnitOfMeasureComponent} from './{{master_Detail_Child_Prefix_Here}}create-or-edit-unitOfMeasure.component';
// import {{{Master_Detail_Child_Prefix_Here}}ViewUnitOfMeasureComponent} from './{{master_Detail_Child_Prefix_Here}}view-unitOfMeasure.component';
// {{Import_Child_Module_Here}}
// @NgModule({
// declarations: [
// {{Master_Detail_Child_Prefix_Here}}UnitOfMeasuresComponent,
// {{Master_Detail_Child_Prefix_Here}}CreateOrEditUnitOfMeasureComponent,
// {{Master_Detail_Child_Prefix_Here}}ViewUnitOfMeasureComponent,
// ],
// imports: [AppSharedModule , AdminSharedModule {{Use_Import_Child_Module_Here}}],
// })
// export class {{Master_Detail_Child_Prefix_Here}}UnitOfMeasureModule {
// }
Do I have to execute some extra steps I'm missing or am I doing something wrong?
@ismcagdas
My ABP version was indeed 6.3, I've upgraded it to 6.3.1 and ExecuteAsync seems to be called correctly now!
Product version: 10.3.0 Product type: Angular Product framework type: .net core ABP Framework version: 6.3.0.0
I'm in the process of implementing import functionality, but the AsyncBackgroundJob's ExecuteAsync is not being called, a exception is happening inside Abp.BackgroundJobs.BackgroundJobManager but I can't step into that part of the code base. Here are the steps I take when I compe up against this issue:
If I look in the Logs.txt, I see the following exception when BackgroundJobManager attempts to run the job
SELECT TOP(@__p_1) [a].[Id], [a].[CreationTime], [a].[CreatorUserId], [a].[IsAbandoned], [a].[JobArgs], [a].[JobType], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount] FROM [AbpBackgroundJobs] AS [a] WHERE ([a].[IsAbandoned] <> CAST(1 AS bit)) AND ([a].[NextTryTime] <= @__Now_0) ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime] WARN 2021-11-23 09:59:47,962 [4 ] Abp.BackgroundJobs.BackgroundJobManager - Object does not match target type. System.Reflection.TargetException: Object does not match target type. at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Abp.BackgroundJobs.BackgroundJobManager.TryProcessJobAsync(BackgroundJobInfo jobInfo)
An exception is being thrown in BackgroundJobManager. Why is this exception being thrown? Is there a serialization/parsing error happening somewhere? I've tried changing ImportUsersFromExcelJobArgs
to a simpler object. I've tried adding [Serializable]
to it as well, but it doesn't seem to help.
If you've got any ideas, I'd appreciate it.