Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MuirisOG 382 posts 1284 karma points
    Mar 01, 2019 @ 13:00
    MuirisOG
    0

    Error in backoffice Settings section

    I'm getting an error in the backoffice when I try to look at the log files using log viewer.

    ×
    Server error: Contact administrator, see log for full details.
    Failed to retrieve number of errors in logs 
    ×
    Server error: Contact administrator, see log for full details.
    Failed to retrieve log level counts 
    ×
    Server error: Contact administrator, see log for full details.
    Failed to retrieve log templates
    

    Here is the entry in the log file (I've trimmed it a bit)

    {
        "@t": "2019-03-01T10:06:34.1915803Z",
        "@mt": "Unhandled controller exception occurred for request '{RequestUrl}'",
        "@l": "Error",
        "@x": "Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: M. Path '', line 0, position 0.\r
       at Newtonsoft.Json.JsonTextReader.ParseValue() in /_/Src/Newtonsoft.Json/JsonTextReader.cs:line 1706\r
       at Newtonsoft.Json.JsonTextReader.Read() in /_/Src/Newtonsoft.Json/JsonTextReader.cs:line 419\r
       at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) in /_/Src/Newtonsoft.Json/JsonReader.cs:line 1195\r
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 196\r
       at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in /_/Src/Newtonsoft.Json/JsonSerializer.cs:line 907\r
       at Serilog.Formatting.Compact.Reader.LogEventReader.TryRead(LogEvent& evt)\r
       at Umbraco.Core.Logging.Viewer.JsonLogViewer.GetLogs(DateTimeOffset startDate, DateTimeOffset endDate, ILogFilter filter, Int32 skip, Int32 take)\r
       at Umbraco.Core.Logging.Viewer.LogViewerSourceBase.GetLogLevelCounts(DateTimeOffset startDate, DateTimeOffset endDate)\r
       at Umbraco.Web.Editors.LogViewerController.GetLogLevelCounts()\r
       at lambda_method(Closure , Object , Object[] )\r
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)\r
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r
    --- End of stack trace from previous location where exception was thrown ---\r
    .
    .
    .
    "RequestUrl": "http://umbraco-test.mydomain.co.uk:800/umbraco/backoffice/UmbracoApi/LogViewer/GetLogLevelCounts",
    "SourceContext": "Umbraco.Web.Editors.LogViewerController",
    "ProcessId": 6724,
    "ProcessName": "w3wp",
    "ThreadId": 139,
    "AppDomainId": 3,
    "AppDomainAppId": "LMW3SVC43ROOT",
    "MachineName": "UMBRACO-TEST",
    "Log4NetLevel": "ERROR",
    "HttpRequestNumber": 8,
    "HttpRequestId": "8b56b874-c698-4d78-aebd-d5258b746cc0"
    }
    
  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Mar 01, 2019 @ 13:35
    Sebastiaan Janssen
    0

    Would it be possible to share the whole log file so we can debug? You can send it to [email protected] if you want.

  • MuirisOG 382 posts 1284 karma points
    Mar 01, 2019 @ 13:51
    MuirisOG
    0

    Hi Sebastiaan

    as it is a test site, I've reinstalled it and it is now working without errors.

    One difference is that the first time I ran the first site, I did it through IIS Express in VS2017, but for my second attempt, I first ran it as a site set up on a Windows Server 2012.

    Thanks for your assistance.

    Its' probably not necessary to send you the log file now ...

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Mar 01, 2019 @ 13:57
    Sebastiaan Janssen
    0

    Please, if you still have it, this looks like a bug we need to fix one way or another :)

  • MuirisOG 382 posts 1284 karma points
    Mar 01, 2019 @ 14:44
    MuirisOG
    1

    Sebastiaan

    I had deleted the site in order to reinstall it, so I created another just like the one that failed, and yes, I have got the same errors.

    I will send you the log file.

    Thanks

    Maurice

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Mar 04, 2019 @ 09:16
    Warren Buckley
    0

    Hi Maurice

    As you were able to reproduce this error/bug again then can you please give me some insight and in-depth details on how you reproduced it.

    Thanks,
    Warren

  • MuirisOG 382 posts 1284 karma points
    Mar 04, 2019 @ 10:51
    MuirisOG
    0

    Hi Warren

    I'm using Microsoft Visual Studio Professional 2017 (Version 15.9.7).

    These are the steps I took in VS 2017,

    • File > New Project > ASP.NET Web Application (.NET Framework) Visual C#
    • Tools > NuGet Package Manager > Package Manager Console
    • Install-Package UmbracoCms
    • Build > Build Solution

    In VS 2017, I selected the option "IIS Express (Internet Explorer)" to run the project.

    Then in the backoffice settings section, I hit the problem above when using the log viewer.

    I have emailed a copy of the log file to Sebastiaan.

    (Note that when I ran the site for the first time after setting it up on the Windows Server 2012, rather than IIS Express, I didn't hit this problem).

    Many thanks

    Muiris

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Mar 04, 2019 @ 11:09
    Warren Buckley
    0

    Hi Maurice

    I got a copy from Seb and the JSON is malformed on line 71 of the file that you sent him

    {"@t":"2019-03-01T14:31:36.6433405Z","@mt":"{LogPrefix} Waiting for tasks to complete","LogPrefix":"[HealthCheckNot{"@t":"2019-03-01T14:31:49.0573244Z","@mt":"{StartMessage} [Timing {TimingId}]","StartMessage":"Booting Umbraco 8.0.0 on NPT-162663.","TimingId":"7d0bd70","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":13024,"ProcessName":"iisexpress","ThreadId":23,"AppDomainId":5,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"NPT-162663","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"b137d16f-9e5c-4d09-a25a-86cf549f5fba"}
    

    In here you can see the problem in LogPrefix "LogPrefix":"[HealthCheckNot{"{"@t":"2019-03-01T14:31:49.0573244Z",

    It has a new log item entry inside the health check one.

    Can you please confirm every time you try this with your repro steps above, you get the same/error problem with malformed JSON and I would be curious to know if it's the same error with the log item HealthCheck.

    Thanks,
    Warren

  • MuirisOG 382 posts 1284 karma points
    Mar 04, 2019 @ 12:08
    MuirisOG
    0

    Hi Warren

    I've just sent today's log file to Sebastiaan, after trying to view the log files in the backoffice.

    Shall I try building a completely new site again, or do as I've just done, and log into the one which failed last Friday?

    thanks

    Maurice

  • Sebastiaan Janssen 5058 posts 15520 karma points MVP admin hq
    Mar 04, 2019 @ 12:52
    Sebastiaan Janssen
    0

    Unfortunately we're unable to reproduce the problem on our machines. For now we'll assume it's something on your machine, not sure what else we could look into.

    Maybe you can zip up the whole site that is giving you the log errors and send it over https://wetransfer.com/ so I can check if there's anything weird. Make sure to zip it up with a strong password (30 characters at least) and send me the zip password in a separate message.

  • MuirisOG 382 posts 1284 karma points
    Mar 04, 2019 @ 14:56
    MuirisOG
    100

    Sebastiaan

    the clue was staring at me all along.

    The problem was running the site for the first time in VS 2017 using IE 11 (version 11.590.17131.0 to be precise).

    enter image description here

    I tried it in Chrome and Edge and there weren't any problems.

    However, if I removed the log file and launched the site in IE 11, it hit the problem again.

    So, it looks like an IE problem (which I guess I shouldn't use anyway).

    Would you still like a zipped up version of the site?

    Thanks

    Muiris

  • Alexandre Locas 52 posts 219 karma points
    Mar 20, 2019 @ 15:47
    Alexandre Locas
    0

    Hi, I have the exact same error on Azure, any ideas ? Thank you

Please Sign in or register to post replies

Write your reply to:

Draft