try icon indicating copy to clipboard operation
try copied to clipboard

Internal Error 500: Running any snippet will cause an error

Open zmjack opened this issue 4 years ago • 6 comments

Describe the bug

I used the command 'dotnet try --verbose' and the site started up. But if I run any code snippets on the website, I get an error:

[MLS.Agent.Middleware.ExceptionFilter] ? System.NotSupportedException: Unsupported log file format. Latest supported version is 7, the log file has version 9.

Did this error occur while using dotnet try or online?

  • [x] dotnet-try
  • [ ] online

What kind of error was it?

  • [ ] User Interface (UI): For example the output never displayed
  • [ ] Service Error: For example "The service is temporarily unavailable. We are working on it"
  • [x] Other:

2020-07-08T08:24:01.7676428Z [|6143940c-482c8867e8e63d61.1.] [MLS.Agent.Middleware.ExceptionFilter] ? System.NotSupportedException: Unsupported log file format. Latest supported version is 7, the log file has version 9. at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(Stream stream) in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 53

Screenshots

image image

Please complete the following:

  • OS
    • [x] Windows 10
    • [ ] macOS
    • [ ] Linux (Please specify distro)
    • [ ] iOS
    • [ ] Android
  • Browser
    • [x] Chrome
    • [x] Edge
    • [ ] Safari

zmjack avatar Jul 08 '20 08:07 zmjack

Please try installing the latest version:

> dotnet tool uninstall -g dotnet-try
> dotnet tool install -g Microsoft.dotnet-try

jonsequitur avatar Jul 08 '20 14:07 jonsequitur

Unfortunately, I installed the Microsoft.dotnet-try 1.0.20268.1, but the error has not disappeared.

2020-07-08T15:45:03.4488876Z [MLS.Agent.Middleware.ExceptionFilter] ❌ System.AggregateException: One or more errors occurred. (Unsupported log file format. Latest supported version is 7, the log file has version 9.) ---> System.NotSupportedException: Unsupported log file format. Latest supported version is 7, the log file has version 9. at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(Stream stream) in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 53 at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(String sourceFilePath) in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 37 at Buildalyzer.AnalyzerManager.Analyze(String binLogPath, IEnumerable`1 buildLoggers) at WorkspaceServer.Packaging.Package.LoadDesignTimeBuildFromBuildLogFile(Package package, FileSystemInfo binLog) --- End of inner exception stack trace ---

zmjack avatar Jul 08 '20 16:07 zmjack

@zmjack we have a newer version not yet published on nuget.org could you see if upgrading using the following command addresses the issues you are encountering

dotnet tool update -g --add-source "https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" Microsoft.dotnet-try

colombod avatar Jul 08 '20 17:07 colombod

@colombod Thanks! I tried the newer version and it's working now.

But I think it still has some bugs.

Please look at the GIF: Honeycam 2020-07-09 15-54-25

When I run a snippet, a red block will be displayed if the file 'package_fullBuild.binlog' is not in the directory (./snippets). Wait until the file is generated and everything is fine.

zmjack avatar Jul 09 '20 08:07 zmjack

Looks like a race condition on first build action

colombod avatar Jul 09 '20 08:07 colombod

@colombod Thanks! I tried the newer version and it's working now.

But I think it still has some bugs.

Please look at the GIF: Honeycam 2020-07-09 15-54-25

When I run a snippet, a red block will be displayed if the file 'package_fullBuild.binlog' is not in the directory (./snippets). Wait until the file is generated and everything is fine.

Looks like that the binlog generation is in flight when you attempt the first run. Looks like a race condition to address

colombod avatar Jul 14 '20 17:07 colombod