Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangfire - NullReferenceException #1003

Closed
DannyRawlings opened this issue Jun 16, 2023 · 9 comments
Closed

Hangfire - NullReferenceException #1003

DannyRawlings opened this issue Jun 16, 2023 · 9 comments
Labels
Bug JobScheduler Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Milestone

Comments

@DannyRawlings
Copy link

饾棗饾棽饾榾饾棸饾椏饾椂饾棷饾棽 饾榿饾椀饾棽 饾棷饾槀饾棿
When I save a new or existing job it throws the NullReferenceException.. If I refresh the screen, the record is created or updated

Version 23.1
Latest xpand version

Error

The error occurred:

	Type:       NullReferenceException
	Message:    Object reference not set to an instance of an object.
	Data:       0 entries
	Stack trace:

   at Xpand.XAF.Modules.JobScheduler.Hangfire.JobSchedulerService.JobExpression(MethodInfo method) in D:\a\1\s\src\Modules\JobScheduler.Hangfire\JobSchedulerService.cs:line 226
   at Xpand.XAF.Modules.JobScheduler.Hangfire.JobSchedulerService.AddOrUpdateHangfire(Job job, IServiceProvider serviceProvider) in D:\a\1\s\src\Modules\JobScheduler.Hangfire\JobSchedulerService.cs:line 0
   at Xpand.XAF.Modules.JobScheduler.Hangfire.JobSchedulerService.<>c__DisplayClass28_0.<ScheduleJobs>b__0(Job scheduledJob) in D:\a\1\s\src\Modules\JobScheduler.Hangfire\JobSchedulerService.cs:line 205
   at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector._.OnNext(TSource value) in /_/Rx.NET/Source/src/System.Reactive/Linq/Observable/SelectMany.cs:line 869
	InnerException is null
@DannyRawlings DannyRawlings added Bug Reactive.XAF eXpandFrameowrk/DevExpress.XAF project labels Jun 16, 2023
@apobekiaris
Copy link
Member

please provide a sample solution using the InMemoryStore and detailed repro instructions

@DannyRawlings
Copy link
Author

No probs, I'll come back to you next week

@DannyRawlings
Copy link
Author

See attached example, just log in, go to Jobs, create a new job and just save it.. Then go back and try to edit the job and again save it. You should see the error. I have also attached a video showing my steps.

Xpand.Test.zip

2023-06-19_09h37_49.mp4

@apobekiaris
Copy link
Member

The pre-release 4.231.1.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.231.0
Xpand.Extensions.Blazor v.4.231.0
Xpand.Extensions.Mono.Cecil v.4.231.0
Xpand.Extensions.Office.Cloud v.4.231.0
Xpand.Extensions.Office.Cloud.Google.Blazor v.4.231.0
Xpand.Extensions.Reactive v.4.231.0
Xpand.Extensions.XAF v.4.231.0
Xpand.Extensions.XAF.Xpo v.4.231.0
Xpand.TestsLib v.4.231.0
Xpand.TestsLib.Blazor v.4.231.0
Xpand.TestsLib.Common v.4.231.0
Xpand.TestsLib.EasyTest v.4.231.0
Xpand.VersionConverter v.4.231.0
Xpand.XAF.Core.All v.4.231.0
Xpand.XAF.Modules.AutoCommit v.4.231.0
Xpand.XAF.Modules.Blazor v.4.231.0
Xpand.XAF.Modules.BulkObjectUpdate v.4.231.0
Xpand.XAF.Modules.CloneMemberValue v.4.231.0
Xpand.XAF.Modules.CloneModelView v.4.231.0
Xpand.XAF.Modules.Email v.4.231.0
Xpand.XAF.Modules.GridListEditor v.4.231.0
Xpand.XAF.Modules.HideToolBar v.4.231.0
Xpand.XAF.Modules.JobScheduler.Hangfire v.4.231.0
Xpand.XAF.Modules.JobScheduler.Notification v.4.231.0
Xpand.XAF.Modules.MasterDetail v.4.231.0
Xpand.XAF.Modules.ModelMapper v.4.231.0
Xpand.XAF.Modules.ModelViewInheritance v.4.231.0
Xpand.XAF.Modules.Office.Cloud.Google v.4.231.0
Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.231.0
Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.231.0
Xpand.XAF.Modules.Office.DocumentStyleManager v.4.231.0
Xpand.XAF.Modules.OneView v.4.231.0
Xpand.XAF.Modules.PositionInListView v.4.231.0
Xpand.XAF.Modules.ProgressBarViewItem v.4.231.0
Xpand.XAF.Modules.RazorView v.4.231.0
Xpand.XAF.Modules.Reactive v.4.231.0
Xpand.XAF.Modules.Reactive.Logger v.4.231.0
Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.231.0
Xpand.XAF.Modules.Reactive.Logger.Hub v.4.231.0
Xpand.XAF.Modules.Reactive.Rest v.4.231.0
Xpand.XAF.Modules.RefreshView v.4.231.0
Xpand.XAF.Modules.SequenceGenerator v.4.231.0
Xpand.XAF.Modules.Speech v.4.231.0
Xpand.XAF.Modules.SpellChecker v.4.231.0
Xpand.XAF.Modules.StoreToDisk v.4.231.0
Xpand.XAF.Modules.SuppressConfirmation v.4.231.0
Xpand.XAF.Modules.TenantManager v.4.231.0
Xpand.XAF.Modules.ViewEditMode v.4.231.0
Xpand.XAF.Modules.ViewItemValue v.4.231.0
Xpand.XAF.Modules.ViewWizard v.4.231.0
Xpand.XAF.Modules.Windows v.4.231.0
Xpand.XAF.Web.All v.4.231.0
Xpand.XAF.Win.All v.4.231.0

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

@apobekiaris apobekiaris added this to the 21.2.702.0 milestone Jun 19, 2023
@apobekiaris
Copy link
Member

eXpand.lab release 23.1.301.2 includes commit that relate to this task:

Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.

To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Thanks a lot for your contribution.

@DannyRawlings
Copy link
Author

I have tested the updated version, the error still persists with existing records when updating them. It works fine however when create a new job and update it.. I have also noticed, the Id Guid field no longer auto populates

@apobekiaris
Copy link
Member

I have also noticed, the Id Guid field no longer auto populates

this was a mistake fortgotten from my previous version tests it should not autopopulate.

It works fine however when create a new job and update it.. I have also noticed, the Id Guid field no longer auto populates

Records created under this they should suffer I am sorry for this

@DannyRawlings
Copy link
Author

this was a mistake fortgotten from my previous version tests it should not autopopulate.

No probs

Records created under this they should suffer I am sorry for this

Total understand, it doesn't effect me as I've only been testing it

Thank you for your quick support

apobekiaris added a commit that referenced this issue Jun 19, 2023
@apobekiaris
Copy link
Member

eXpand.lab release 23.1.502.0 includes commit that relate to this task:

Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.

To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Thanks a lot for your contribution.

@apobekiaris apobekiaris removed their assignment Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug JobScheduler Reactive.XAF eXpandFrameowrk/DevExpress.XAF project
Projects
None yet
Development

No branches or pull requests

2 participants