Config files not updating in UI

Product: PowerShell Universal
Version: 1.5.9
Hosted: IIS

@adam or @psDevUK

I know that the expected behavior when a config file (I.E. Variables.ps1, Scripts.ps1, etc…) changes, that the UI will reload the file and show the updated version. That said, I’m working on a project where these files are source controlled (and automatically updated when a change in the git repo is detected) they don’t seem to be updated in the UI when they are replaced.

To clarify, I’m not utilizing the built-in source control integration (it didn’t seem to fit what I was looking to do which encompasses more than the config files/their directory).

When I run iisreset, the configurations in the UI display the updated information. I know there is a filewatcher that looks for changes to these files, so presumably it doesn’t detect this as a change for some reason?

I’m also in Discord @ Unholy#5845 for quicker communication if either of you want to discuss/see what I mean in real time.

Hi @rbleattler if possible you able to post your code here…? Just thinking this would be best way to see the issue and to try and replicate it. Or if you cannot post all the code can you give a cut-down example of the page…?

@psDevUK I apologize - this is just in Universal Automation - I’m not presenting a dashboard or anything. This is the built in dashboard where updates aren’t happening. All updates to the repository containing the scripts and config files are being made by git.

def a question for @AlonGvili or @adam I am sure one of the two will let you know :smiley:

1 Like

If the file system watcher isn’t working for whatever reason, you can force a reeavluation of the configuration files by POSTing to api/v1/configuration.

Invoke-RestMethod http://myserver/api/v1/configuration -Method POST -Headers @{ Authorization = "Bearer adminAppToken" }
1 Like

I’ll give this a try today and let you know what I find. Thanks a bunch @adam and @psDevUK

Alright @adam that call does seem to work to get the config files to update, though the UI still doesn’t seem to show/recognize the updated versions of the file contents for scripts.

Additionally now I have this issue where manually invoking a script from the Automation UI leaves me with a forever pending job until I run an IISReset. The logs may be of use to you, but this doesn’t really give me anything:

Universal Log:
This seems to repeat indefinitely while other things (like scheduled jobs) continue to run

2021-01-28T09:03:44.0448441-06:00 8000143b-0003-fe00-b63f-84710c7967bb [INF] Request starting HTTP/1.1 GET https://myserver.com/api/v1/job/25697/log?t=1611846223998   (ca22a1cb)
2021-01-28T09:03:44.0458953-06:00 8000143b-0003-fe00-b63f-84710c7967bb [DBG] 1 candidate(s) found for the request path '"/api/v1/job/25697/log"' (9406aaa8)
2021-01-28T09:03:44.0459278-06:00 8000143b-0003-fe00-b63f-84710c7967bb [DBG] Endpoint '"UniversalAutomation.JobController.GetLogOutput (UniversalAutomation)"' with route pattern '"api/v1/job/{id:long}/log"' is valid for the request path '"/api/v1/job/25697/log"' (430aaaf2)

IIS/Hosting Log:
I believe this continues to go on and on as well

      Request starting HTTP/1.1 GET https://myserver.com/api/v1/job/25697/log?t=1611846901229  

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]

      Request starting HTTP/1.1 GET https://myserver.com/api/v1/job/25697?t=1611846901232  

dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[3]

      The request path  does not match the path filter

dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1001]

      1 candidate(s) found for the request path '/api/v1/job/25697'

dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]

      Endpoint 'UniversalAutomation.JobController.Get (UniversalAutomation)' with route pattern 'api/v1/job/{id:long}' is valid for the request path '/api/v1/job/25697'

dbug: Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[1]

      Request matched endpoint 'UniversalAutomation.JobController.Get (UniversalAutomation)'

dbug: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[3]

      The request path  does not match the path filter

dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1001]

      1 candidate(s) found for the request path '/api/v1/job/25697/log'

dbug: Microsoft.AspNetCore.Routing.Matching.DfaMatcher[1005]

      Endpoint 'UniversalAutomation.JobController.GetLogOutput (UniversalAutomation)' with route pattern 'api/v1/job/{id:long}/log' is valid for the request path '/api/v1/job/25697/log'

dbug: Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware[1]

      Request matched endpoint 'UniversalAutomation.JobController.GetLogOutput (UniversalAutomation)'

dbug: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[9]

      AuthenticationScheme: Cookies was not authenticated.

dbug: Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler[9]

      AuthenticationScheme: Bearer was not authenticated.

info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]

      Authorization was successful.

info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]

      Executing endpoint 'UniversalAutomation.JobController.Get (UniversalAutomation)'

info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]

      Route matched with {action = "Get", controller = "Job"}. Executing controller action with signature UniversalAutomation.Job Get(Int64) on controller UniversalAutomation.JobController (UniversalAutomation).

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Execution plan of authorization filters (in the following order): None

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Execution plan of resource filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Execution plan of action filters (in the following order): Microsoft.AspNetCore.Mvc.Filters.ControllerActionFilter (Order: -2147483648), Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Execution plan of exception filters (in the following order): None

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Execution plan of result filters (in the following order): Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.SaveTempDataFilter

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1]

      Executing controller factory for controller UniversalAutomation.JobController (UniversalAutomation)

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]

      Executed controller factory for controller UniversalAutomation.JobController (UniversalAutomation)

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder[22]

      Attempting to bind parameter 'id' of type 'System.Int64' ...

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder[44]

      Attempting to bind parameter 'id' of type 'System.Int64' using the name 'id' in request data ...

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder[45]

      Done attempting to bind parameter 'id' of type 'System.Int64'.

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder[23]

      Done attempting to bind parameter 'id' of type 'System.Int64'.

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder[26]

      Attempting to validate the bound parameter 'id' of type 'System.Int64' ...

dbug: Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder[27]

      Done attempting to validate the bound parameter 'id' of type 'System.Int64'.

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector[11]

      List of registered output formatters, in the following order: Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter, Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter, Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter, Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector[4]

      No information found on request to perform content negotiation.

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector[8]

      Attempting to select an output formatter without using a content type as no explicit content types were specified for the response.

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector[10]

      Attempting to select the first formatter in the output formatters list which can write the result.

dbug: Microsoft.AspNetCore.Mvc.Infrastructure.DefaultOutputFormatterSelector[2]

      Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter' and content type 'application/json' to write the response.

info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]

      Executing ObjectResult, writing value of type 'UniversalAutomation.Job'.

dbug: Microsoft.AspNetCore.ResponseCompression.ResponseCompressionProvider[2]

      No response compression available for HTTPS requests. See ResponseCompressionOptions.EnableForHttps.

info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]

      Executed action UniversalAutomation.JobController.Get (UniversalAutomation) in 0.9221ms

info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]

      Executed endpoint 'UniversalAutomation.JobController.Get (UniversalAutomation)'

info: Microsoft.AspNetCore.Hosting.Diagnostics[2]

      Request finished in 3.6596ms 200 application/json; charset=utf-8




Can you send me your full log? Either pastebin or email at support@ironmansoftware.com

1 Like

@adam I’ll send this over today. Let me replicate the issue in a fresh log. I was out of the office Friday.

Sent over the logs. Hopefully you can see whatever it is I’m missing.