pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.55k stars 273 forks source link

[BUG] 500 error while iOS Packaging #4642

Closed jamshaidjavaid closed 5 months ago

jamshaidjavaid commented 5 months ago

Link to the report card page

https://www.pwabuilder.com/reportcard?site=https://techify.world

What Store were you trying to package for?

iOS

What is the error message you received?

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.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.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)

HEADERS

Accept: / Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Content-Length: 998 Content-Type: application/json Host: pwabuilder-ios.azurewebsites.net Max-Forwards: 10 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Origin: https://www.pwabuilder.com sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121" correlation-id: 8ae78c1c-85a4-4616-a3c6-ddf10c2336e1e platform-identifier-version: 1.0.0 sec-ch-ua-mobile: ?0 platform-identifier: PWABuilder sec-ch-ua-platform: "Windows" Sec-Fetch-Site: cross-site Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty X-ARR-LOG-ID: a5b4e3db-5d90-47db-bfbe-a51f9006a851 CLIENT-IP: 116.58.9.130:64222 DISGUISED-HOST: pwabuilder-ios.azurewebsites.net X-SITE-DEPLOYMENT-ID: pwabuilder-ios__82a9 WAS-DEFAULT-HOSTNAME: pwabuilder-ios.azurewebsites.net X-Forwarded-Proto: https X-AppService-Proto: https X-ARR-SSL: 2048|256|CN=Microsoft Azure TLS Issuing CA 01, O=Microsoft Corporation, C=US|CN=*.azurewebsites.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US X-Forwarded-TlsVersion: 1.3 X-Forwarded-For: 116.58.9.130:64222 X-Original-URL: /packages/create X-WAWS-Unencoded-URL: /packages/create

at Ie (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:6:279)
at async qe (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:14:7228)
at async fe (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:14:7067)
at async g.generate (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:1833:1123)

Paste your stack trace below

The site I was testing is: https://techify.world Error: Error generating iOS package. 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.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.gAwaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.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)

HEADERS

Accept: / Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Content-Length: 998 Content-Type: application/json Host: pwabuilder-ios.azurewebsites.net Max-Forwards: 10 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Origin: https://www.pwabuilder.com sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121" correlation-id: 8ae78c1c-85a4-4616-a3c6-ddf10c2336e1e platform-identifier-version: 1.0.0 sec-ch-ua-mobile: ?0 platform-identifier: PWABuilder sec-ch-ua-platform: "Windows" Sec-Fetch-Site: cross-site Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty X-ARR-LOG-ID: a5b4e3db-5d90-47db-bfbe-a51f9006a851 CLIENT-IP: 116.58.9.130:64222 DISGUISED-HOST: pwabuilder-ios.azurewebsites.net X-SITE-DEPLOYMENT-ID: pwabuilder-ios__82a9 WAS-DEFAULT-HOSTNAME: pwabuilder-ios.azurewebsites.net X-Forwarded-Proto: https X-AppService-Proto: https X-ARR-SSL: 2048|256|CN=Microsoft Azure TLS Issuing CA 01, O=Microsoft Corporation, C=US|CN=*.azurewebsites.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US X-Forwarded-TlsVersion: 1.3 X-Forwarded-For: 116.58.9.130:64222 X-Original-URL: /packages/create X-WAWS-Unencoded-URL: /packages/create

at Ie (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:6:279)
at async qe (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:14:7228)
at async fe (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:14:7067)
at async g.generate (https://www.pwabuilder.com/code/test-publish-pane.e307632c.js:1833:1123)

What environment were you using?

OS: Windows

Browser: [Chrome (121.0.6167.86 (Official Build) (64-bit))]

Additional context

No response

Jaylyn-Barbee commented 5 months ago

A few things

  1. You icon is type svg but you have them listen as image/png
  2. iOS doesn't accept svg, we have an issue to alert our users to that here #4600 but haven't gotten around to implementing this yet
  3. You have so image size mismatches as seen in edge devtools

PWABuilder recommends png icons because they are a bit more widely accepted. If you have any questions are try these fixes and still are unable to package let us know

image

jamshaidjavaid commented 5 months ago

@Jaylyn-Barbee

I got it. Thank you for your help. 🙌