V1.6.1 Regex bug = Unable to parse

Using v1.6.1 I get the error “Unable to parse” when I click the “Jobs” tab on the dashboard. This looks like an issue with the regex here: https://github.com/HangfireIO/Hangfire/blob/4dec6435fb552364833c359079230ad04fd98e53/src/Hangfire.SqlServer.Msmq/MessageQueueExtensions.cs

Server Error in '/hangfire/v1' Application.

Unable to parse .\da3-hangfire-accounting 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.ApplicationException: Unable to parse .\da3-hangfire-accounting

Source Error: 


 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[ApplicationException: Unable to parse .\da3-hangfire-accounting]
   MQTools.MessageQueueExtensions.GetCount(MessageQueue messageQueue) +419
   Hangfire.SqlServer.Msmq.MsmqJobQueueMonitoringApi.GetEnqueuedAndFetchedCount(String queue) +193
   Hangfire.SqlServer.SqlServerMonitoringApi.Queues() +729
   Hangfire.Dashboard.Pages.QueuesPage.Execute() +222
   Hangfire.Dashboard.RazorPage.TransformText(String body) +31
   Hangfire.Dashboard.RazorPageDispatcher.Dispatch(DashboardContext context) +86
   Hangfire.Dashboard.<>c__DisplayClass1_2.<UseHangfireDashboard>b__1(IDictionary`2 env) +622
   Microsoft.Owin.Mapping.<Invoke>d__0.MoveNext() +462
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +181
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +69
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<RunApp>d__5.MoveNext() +203
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +181
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +69
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.<DoFinalWork>d__2.MoveNext() +193
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) +96
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +509
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +979

  


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1

UPDATE: I’ve done some more testing and the REGEX appears invalid only for Public MSMQs. Are public MSMQs still supported?

Thanks for the reporting! I’ve created a GitHub issue, and already committed the fix. It will be available with Hangfire 1.6.2 soon.

1 Like