microsoft/Oryx

GitHub action failing

ismailhozza opened this issue · 2 comments

Bug Report

We have Azure Static Web with an API written with .NET 8. During actions workflow it fails with following issue. We can't figure out the reason.
Error: Oops... An unexpected error has occurred.
Error: System.ArgumentNullException: Value cannot be null. (Parameter 'path3')
at System.ArgumentNullException.Throw(String paramName)
at System.IO.Path.Combine(String path1, String path2, String path3)
at Microsoft.Oryx.BuildScriptGenerator.PlatformInstallerBase.GetInstallerScriptSnippet(String platformName, String version, String directoryToInstall) in /usr/oryx/src/BuildScriptGenerator/PlatformInstallerBase.cs:line 124
at Microsoft.Oryx.BuildScriptGenerator.DotNetCore.DotNetCorePlatformInstaller.GetInstallerScriptSnippet(String version) in /usr/oryx/src/BuildScriptGenerator/DotNetCore/DotNetCorePlatformInstaller.cs:line 25
at Microsoft.Oryx.BuildScriptGenerator.DotNetCore.DotNetCorePlatform.GetInstallerScriptSnippet(BuildScriptGeneratorContext context, PlatformDetectorResult detectorResult) in /usr/oryx/src/BuildScriptGenerator/DotNetCore/DotnetCorePlatform.cs:line 252
at Microsoft.Oryx.BuildScriptGenerator.PlatformsInstallationScriptProvider.GetInstallationScriptSnippets(IEnumerable1 detectionResults, BuildScriptGeneratorContext context) in /usr/oryx/src/BuildScriptGenerator/PlatformsInstallationScriptProvider.cs:line 73 at Microsoft.Oryx.BuildScriptGenerator.PlatformsInstallationScriptProvider.GetBashScriptSnippet(BuildScriptGeneratorContext context, IEnumerable1 detectionResults) in /usr/oryx/src/BuildScriptGenerator/PlatformsInstallationScriptProvider.cs:line 55
at Microsoft.Oryx.BuildScriptGenerator.DefaultBuildScriptGenerator.GenerateBashScript(BuildScriptGeneratorContext context, String& script, List`1 checkerMessageSink) in /usr/oryx/src/BuildScriptGenerator/DefaultBuildScriptGenerator.cs:line 76
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

Resolved by removing global.json from the root of the api project and pushing to GitHub

Hello @ismailhozza, how did you solve it? Do you have a link to the project?

I've more or less the same issue:

  • Api is .NET 7
  • Client (Blazor) is .NET 8

And the error message is like:

Downloading and extracting 'dotnet' version '7.0.404' to '/opt/dotnet/7.0.404'...
Detected image debian flavor: bullseye.
Downloaded in 5 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: dotnet...
Done in 10 sec(s).

image detector file exists, platform is dotnet..

Using .NET Core SDK Version: 7.0.404
"2024-03-06 17:44:32"|ERROR|
Welcome to .NET 7.0!
---------------------
SDK Version: 7.0.404

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
  Determining projects to restore...
/opt/dotnet/7.0.404/sdk/7.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(160,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. Download the .NET SDK from https://aka.ms/dotnet/download [/github/workspace/src/ProtoBufJsonConverter/ProtoBufJsonConverter.csproj::TargetFramework=net8.0]
/opt/dotnet/7.0.404/sdk/7.0.404/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(160,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. Download the .NET SDK from https://aka.ms/dotnet/download [/github/workspace/src-webcil/MetadataReferenceService.Default/MetadataReferenceService.Default.csproj::TargetFramework=net8.0] | 1 | Please build your app locally before publishing. | https://docs.microsoft.com/en-us/azure/app-service/configure-language-dotnetcore?pivots=platform-linux


---End of Oryx build logs---
Oryx has failed to build the solution.

See also #2350