microsoft / Oryx

Build your repo automatically.
Other
769 stars 176 forks source link

Deployment Failed - Detecting platforms... Error: Oops... An unexpected error has occurred. Error: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1 #2456

Open jfdsistemas opened 5 months ago

jfdsistemas commented 5 months ago

NuGet Product Used dotnet.exe, MSBuild.exe

Product Version .NET8

Worked before? No response

Impact It's more difficult to complete my work

Repro Steps & Context Hello everyone, good morning.

I'm having issues with the build. My code is in Azure Repos, and I'm using App Center for the build. Locally, the code is working perfectly, and when I publish via Visual Studio to the Deployment Center, it also works perfectly. The problem lies in the CI process; when I commit to the master branch, the Deployment Center initiates synchronization to perform the build, and at this step, I'm encountering an exception.

Looking forward to hear from you. Thanks in advance,

Verbose Logs Log Details Commit ID: 6b27c2f8779ec0f86fcdabc7632c6f30f027403a

10:32:00 AM Updating submodules. 10:32:01 AM Preparing deployment for commit id '6b27c2f877'. 10:32:01 AM PreDeployment: context.CleanOutputPath False 10:32:01 AM PreDeployment: context.OutputPath /home/site/wwwroot 10:32:01 AM Repository path is /home/site/repository 10:32:01 AM  Running oryx build... Show Logs... 10:32:06 AM 10:32:06 AM Generating summary of Oryx build 10:32:06 AM Parsing the build logs 10:32:06 AM Found 0 issue(s) 10:32:06 AM 10:32:06 AM Build Summary : 10:32:07 AM

10:32:07 AM Errors (0) 10:32:07 AM Warnings (0) 10:32:07 AM 10:32:07 AM Deployment Failed. deployer = VSTS deploymentPath = Command: oryx build /home/site/repository -o /home/site/wwwroot --platform dotnet --platform-version 8.0 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc849ab74f1fc8 | tee /tmp/oryx-build.log Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20240424.1, Commit: d37b2225a252ab2c04b4726024d047cf01ea1318, ReleaseTagName: 20240424.1

Build Operation ID: 4a932dbf785caecf Repository Commit : 6b27c2f8779ec0f86fcdabc7632c6f30f027403a OS Type : bookworm Image Type : githubactions

Detecting platforms... Error: Oops... An unexpected error has occurred. Error: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options) at Microsoft.Oryx.Detector.DotNetCore.ProjectFileHelpers.GetXmlDocument(ISourceRepo sourceRepo, String projectFile) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProjectFileHelpers.cs:line 82 at Microsoft.Oryx.Detector.DotNetCore.ProjectFileHelpers.IsAzureBlazorWebAssemblyProject(ISourceRepo sourceRepo, String projectFile) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProjectFileHelpers.cs:line 32 at Microsoft.Oryx.Detector.DotNetCore.ProbeAndFindProjectFileProvider.GetRelativePathToProjectFile(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProbeAndFindProjectFileProvider.cs:line 66 at Microsoft.Oryx.Detector.DotNetCore.DefaultProjectFileProvider.GetRelativePathToProjectFile(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/DefaultProjectFileProvider.cs:line 23 at Microsoft.Oryx.Detector.DotNetCore.DotNetCoreDetector.Detect(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/DotnetCoreDetector.cs:line 37 at Microsoft.Oryx.BuildScriptGenerator.DotNetCore.DotNetCorePlatform.Detect(RepositoryContext context) in /usr/oryx/src/BuildScriptGenerator/DotNetCore/DotnetCorePlatform.cs:line 89 at Microsoft.Oryx.BuildScriptGenerator.DefaultPlatformsInformationProvider.GetPlatformsInfo(RepositoryContext context) in /usr/oryx/src/BuildScriptGenerator/DefaultPlatformsInformationProvider.cs:line 53 at Microsoft.Oryx.BuildScriptGenerator.DefaultBuildScriptGenerator.GenerateBashScript(BuildScriptGeneratorContext context, String& script, List1 checkerMessageSink) in /usr/oryx/src/BuildScriptGenerator/DefaultBuildScriptGenerator.cs:line 75 at Microsoft.Oryx.BuildScriptGeneratorCli.BuildScriptGenerator.TryGenerateScript(String& generatedScript, Exception& exception) in /usr/oryx/src/BuildScriptGeneratorCli/BuildScriptGenerator.cs:line 63 at Microsoft.Oryx.BuildScriptGeneratorCli.BuildCommand.Execute(IServiceProvider serviceProvider, IConsole console) in /usr/oryx/src/BuildScriptGeneratorCli/Commands/BuildCommand.cs:line 278 at Microsoft.Oryx.BuildScriptGeneratorCli.CommandBase.OnExecute(IConsole console) in /usr/oryx/src/BuildScriptGeneratorCli/Commands/CommandBase.cs:line 87 Error: Oops... An unexpected error has occurred.\nError: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.\n at System.Xml.XmlTextReaderImpl.Throw(Exception e)\n at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)\n at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()\n at System.Xml.XmlTextReaderImpl.ParseDocumentContent()\n at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)\n at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)\n at Microsoft.Oryx.Detector.DotNetCore.ProjectFileHelpers.GetXmlDocument(ISourceRepo sourceRepo, String projectFile) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProjectFileHelpers.cs:line 82\n at Microsoft.Oryx.Detector.DotNetCore.ProjectFileHelpers.IsAzureBlazorWebAssemblyProject(ISourceRepo sourceRepo, String projectFile) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProjectFileHelpers.cs:line 32\n at Microsoft.Oryx.Detector.DotNetCore.ProbeAndFindProjectFileProvider.GetRelativePathToProjectFile(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/ProbeAndFindProjectFileProvider.cs:line 66\n at Microsoft.Oryx.Detector.DotNetCore.DefaultProjectFileProvider.GetRelativePathToProjectFile(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/ProjectFileProviders/DefaultProjectFileProvider.cs:line 23\n at Microsoft.Oryx.Detector.DotNetCore.DotNetCoreDetector.Detect(DetectorContext context) in /usr/oryx/src/Detector/DotNetCore/DotnetCoreDetector.cs:line 37\n at Microsoft.Oryx.BuildScriptGenerator.DotNetCore.DotNetCorePlatform.Detect(RepositoryContext context) in /usr/oryx/src/BuildScriptGenerator/DotNetCore/DotnetCorePlatform.cs:line 89\n at Microsoft.Oryx.BuildScriptGenerator.DefaultPlatformsInformationProvider.GetPlatformsInfo(RepositoryContext context) in /usr/oryx/src/BuildScriptGenerator/DefaultPlatformsInformationProvider.cs:line 53\n at Microsoft.Oryx.BuildScriptGenerator.DefaultBuildScriptGenerator.GenerateBashScript(BuildScriptGeneratorContext context, String& script, List1 checkerMessageSink) in /usr/oryx/src/BuildScriptGenerator/DefaultBuildScriptGenerator.cs:line 75\n at Microsoft.Oryx.BuildScriptGeneratorCli.BuildScriptGenerator.TryGenerateScript(String& generatedScript, Exception& exception) in /usr/oryx/src/BuildScriptGeneratorCli/BuildScriptGenerator.cs:line 63\n at Microsoft.Oryx.BuildScriptGeneratorCli.BuildCommand.Execute(IServiceProvider serviceProvider, IConsole console) in /usr/oryx/src/BuildScriptGeneratorCli/Commands/BuildCommand.cs:line 278\n at Microsoft.Oryx.BuildScriptGeneratorCli.CommandBase.OnExecute(IConsole console) in /usr/oryx/src/BuildScriptGeneratorCli/Commands/CommandBase.cs:line 87\n/bin/bash -c "oryx build /home/site/repository -o /home/site/wwwroot --platform dotnet --platform-version 8.0 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc849ab74f1fc8 | tee /tmp/oryx-build.log ; exit $PIPESTATUS "