Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Better error message when failing to read icons #4669

Open
julamb opened this issue Feb 28, 2024 · 9 comments
Open

[Suggestion] Better error message when failing to read icons #4669

julamb opened this issue Feb 28, 2024 · 9 comments

Comments

@julamb
Copy link

julamb commented Feb 28, 2024

What Store were you trying to package for?

iOS

Paste your stack trace below

Status code: 500
Error: Internal Server Error
Details: System.Net.Http.HttpRequestException: Response status code does not indicate success: 415 (Unsupported Media Type).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Microsoft.PWABuilder.IOS.Web.Services.ImageGenerator.CreateIOSImagesZip(Byte[] image, Double padding, String backgroundColor) in D:\a\pwabuilder-ios\pwabuilder-ios\Microsoft.PWABuilder.IOS.Web\Services\ImageGenerator.cs:line 144
   at Microsoft.PWABuilder.IOS.Web.Services.ImageGenerator.InvokePwabuilderImageGeneratorService(Validated options, WebAppManifestContext webManifest) in D:\a\pwabuilder-ios\pwabuilder-ios\Microsoft.PWABuilder.IOS.Web\Services\ImageGenerator.cs:line 67
   at Microsoft.PWABuilder.IOS.Web.Services.ImageGenerator.Generate(Validated options, WebAppManifestContext manifest, String outputDirectory) in D:\a\pwabuilder-ios\pwabuilder-ios\Microsoft.PWABuilder.IOS.Web\Services\ImageGenerator.cs:line 60
   at Microsoft.PWABuilder.IOS.Web.Services.IOSPackageCreator.Create(Validated options) in D:\a\pwabuilder-ios\pwabuilder-ios\Microsoft.PWABuilder.IOS.Web\Services\IOSPackageCreator.cs:line 69
   at Microsoft.PWABuilder.IOS.Web.Controllers.PackagesController.Create(IOSAppPackageOptions options) in D:\a\pwabuilder-ios\pwabuilder-ios\Microsoft.PWABuilder.IOS.Web\Controllers\PackagesController.cs:line 55
   at lambda_method4(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)```

Additional context

I made a mistake in my manifest icons declaration, I was linking a SVG icon with a PNG mime type:

    {
      "src": "./images/icon.svg",
      "type": "image/png",
      "sizes": "512x512"
    }

I was able to locate the error by spotting the CreateIOSImagesZip in the stack trace, but it would be easier to troubleshoot with a more explicit error message saying that we failed to read one of the icons.

@julamb julamb changed the title [BUG] Better error message when failing to read icons [Suggestion] Better error message when failing to read icons Feb 28, 2024
@jgw96 jgw96 added enhancement and removed bug 🐛 labels Mar 5, 2024
Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

8 similar comments
Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants