microsoft / Oryx

Build your repo automatically.
Other
768 stars 177 forks source link

Azure Static Web Apps : SDK Request Failed #2530

Open rkieru opened 1 month ago

rkieru commented 1 month ago

Bug Report

At what date and time did you most recently experience the problem?

Monday, October 7th. Has been an issue since last Thursday.

Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.

GitHub action runner leveraging Azure/static-web-apps-deploy@v1

What happened?

My workflow has stopped being able to download the correct packages from Oryx. Nothing in the workflow or my network configuration has changed, and I have verified that the action runner itself can access the CDN with a curl check that completes successfully.

Error: Oops... An unexpected error has occurred.
Error: System.AggregateException: Http request to retrieve the SDKs available to download from 'https://oryx-cdn.microsoft.io/' failed. Please ensure that your network configuration allows traffic to required Oryx dependencies, as documented in 'https://github.com/microsoft/Oryx/blob/main/doc/hosts/appservice.md#network-dependencies'
System.AggregateException: One or more errors occurred. (A task was canceled.)

What did you expect or want to happen?

For the build to detect my NodeJS package, download from the CDN, and finish the process

How can we reproduce it?

Unsure. My build fails after Oryx has stalled on "Detecting platforms..." My package.json has an engines declaration and my workflow identifies the node versions I expect it to use.

Do you have log output? Please include between the backticks:

Error: Oops... An unexpected error has occurred.
Error: System.AggregateException: Http request to retrieve the SDKs available to download from 'https://oryx-cdn.microsoft.io/' failed. Please ensure that your network configuration allows traffic to required Oryx dependencies, as documented in 'https://github.com/microsoft/Oryx/blob/main/doc/hosts/appservice.md#network-dependencies'
System.AggregateException: One or more errors occurred. (A task was canceled.)
 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.Oryx.BuildScriptGenerator.ListBlobsHelper.GetAllBlobs(String sdkStorageBaseUrl, String platform, HttpClient httpClient, String oryxSdkStorageAccountAccessToken) in /usr/oryx/src/BuildScriptGenerator/Helpers/ListBlobsHelper.cs:line 23
   at Microsoft.Oryx.BuildScriptGenerator.SdkStorageVersionProviderBase.GetAvailableVersionsFromStorage(String platformName) in /usr/oryx/src/BuildScriptGenerator/SdkStorageVersionProviderBase.cs:line 54
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodeSdkStorageVersionProvider.GetVersionInfo() in /usr/oryx/src/BuildScriptGenerator/Node/VersionProviders/NodeSdkStorageVersionProvider.cs:line 29
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<UseExceptionHandler>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>b__1_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<CancelOnProcessTermination>b__1_0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<InvokeAsync>g__FullInvocationChainAsync|2_0(InvocationContext context)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Invocation.InvocationPipeline.<InvokeAsync>g__FullInvocationChainAsync|2_0(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
   at System.CommandLine.CommandExtensions.InvokeAsync(Command command, String[] args, IConsole console)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.CommandExtensions.InvokeAsync(Command command, String[] args, IConsole console)
   at Microsoft.Oryx.BuildScriptGeneratorCli.Program.Main(String[] args) in /usr/oryx/src/BuildScriptGeneratorCli/Program.cs:line 51
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Oryx.BuildScriptGeneratorCli.Program.Main(String[] args)
   at Microsoft.Oryx.BuildScriptGeneratorCli.Program.<Main>(String[] args)
--- End of stack trace from previous location ---

   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Microsoft.Oryx.BuildScriptGenerator.ListBlobsHelper.GetAllBlobs(String sdkStorageBaseUrl, String platform, HttpClient httpClient, String oryxSdkStorageAccountAccessToken) in /usr/oryx/src/BuildScriptGenerator/Helpers/ListBlobsHelper.cs:line 23
   at Microsoft.Oryx.BuildScriptGenerator.ListBlobsHelper.GetAllBlobs(String sdkStorageBaseUrl, String platform, HttpClient httpClient, String oryxSdkStorageAccountAccessToken) in /usr/oryx/src/BuildScriptGenerator/Helpers/ListBlobsHelper.cs:line 29
   at Microsoft.Oryx.BuildScriptGenerator.SdkStorageVersionProviderBase.GetAvailableVersionsFromStorage(String platformName) in /usr/oryx/src/BuildScriptGenerator/SdkStorageVersionProviderBase.cs:line 54
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodeSdkStorageVersionProvider.GetVersionInfo() in /usr/oryx/src/BuildScriptGenerator/Node/VersionProviders/NodeSdkStorageVersionProvider.cs:line 29
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodeVersionProvider.GetVersionInfo() in /usr/oryx/src/BuildScriptGenerator/Node/VersionProviders/NodeVersionProvider.cs:line 37
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodePlatform.GetMaxSatisfyingVersionAndVerify(String version) in /usr/oryx/src/BuildScriptGenerator/Node/NodePlatform.cs:line 678
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodePlatform.ResolveVersions(RepositoryContext context, PlatformDetectorResult detectorResult) in /usr/oryx/src/BuildScriptGenerator/Node/NodePlatform.cs:line 526
   at Microsoft.Oryx.BuildScriptGenerator.Node.NodePlatform.Detect(RepositoryContext context) in /usr/oryx/src/BuildScriptGenerator/Node/NodePlatform.cs:line 1[46](<<REDACTED>>#step:7:47)
   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, List`1 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

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

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
sarsharma commented 3 weeks ago

Hi @rkieru Apologies for the late reply Can you please check if the issue still persists? Thanks!

rkieru commented 3 weeks ago

@sarsharma - I ended up bypassing Oryx entirely by disabling the build process in the static web app workflow. Instead I just build the app normally (ex: npm run build) and upload that artifact.