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.66k stars 279 forks source link

[BUG] - Screenshot error with vague information of what to do next when packaging for Microsoft #4597

Closed jaredshaunsmith closed 7 months ago

jaredshaunsmith commented 7 months ago

Link to the report card page

https://www.pwabuilder.com/reportcard?site=https://studio.vsco.co

What Store were you trying to package for?

Windows

What is the error message you received?

Error: Failed. Status code 500

System.Text.Json.JsonException: The JSON value could not be converted to Microsoft.PWABuilder.Windows.Chromium.Models.WebManifestScreenshot. Path: $[0] | LineNumber: 0 | BytePositionInLine: 29.

Paste your stack trace below

The site I was testing is: https://studio.vsco.co at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonCollectionConverter2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.DeserializeAsObject(Utf8JsonReader& reader, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpanAsObject(ReadOnlySpan1 json, JsonTypeInfo jsonTypeInfo) at Microsoft.PWABuilder.Windows.Chromium.Models.WebAppManifestContext.From(JsonDocument manifest, Uri manifestUri) in C:\app\Models\WebAppManifestContext.cs:line 27 at Microsoft.PWABuilder.Windows.Chromium.Services.WebManifestFinder.Find(WindowsAppPackageOptions options) in C:\app\Services\WebManifestFinder.cs:line 81 at Microsoft.PWABuilder.Windows.Chromium.Services.WindowsAppPackageCreator.GenerateZip(WindowsAppPackageOptions options) in C:\app\Services\WindowsAppPackageCreator.cs:line 135 at Microsoft.PWABuilder.Windows.Chromium.Services.WindowsAppPackageCreator.CreateAppPackage(WindowsAppPackageOptions options, AnalyticsInfo analyticsInfo) in C:\app\Services\WindowsAppPackageCreator.cs:line 72 at Microsoft.PWABuilder.Windows.Chromium.Controllers.MsixController.CreateAppPackage(WindowsAppPackageOptions options, HttpContext httpContext) in C:\app\Controllers\MsixController.cs:line 153 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|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.g__Awaited|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.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

HEADERS

Accept: / Connection: keep-alive Host: pwabuilder-windows-docker.azurewebsites.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Content-Type: application/json Max-Forwards: 9 Origin: https://www.pwabuilder.com Content-Length: 2270 sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120" correlation-id: 10cadbfca-d849-4cd6-979e-101f2c1f37bd5 platform-identifier-version: 1.0.0 sec-ch-ua-mobile: ?0 platform-identifier: PWABuilder sec-ch-ua-platform: "macOS" Sec-Fetch-Site: cross-site Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty X-ARR-LOG-ID: 7fddb1ab-2afe-4b14-8653-d2e5c950a8ee CLIENT-IP: 174.160.228.105:62712 DISGUISED-HOST: pwabuilder-windows-docker.azurewebsites.net X-SITE-DEPLOYMENT-ID: pwabuilder-windows-docker__55f7 WAS-DEFAULT-HOSTNAME: pwabuilder-windows-docker.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: 174.160.228.105:62712, 174.160.228.105 X-Original-URL: /msix/generatezip X-WAWS-Unencoded-URL: /msix/generatezip

at We (https://www.pwabuilder.com/code/test-publish-pane.02aabd61.js:14:241)
at async je (https://www.pwabuilder.com/code/test-publish-pane.02aabd61.js:14:7327)
at async fe (https://www.pwabuilder.com/code/test-publish-pane.02aabd61.js:14:6936)
at async g.generate (https://www.pwabuilder.com/code/test-publish-pane.02aabd61.js:1835:1123)

What environment were you using?

Web on Chrome from mac os

Additional context

No response

jgw96 commented 7 months ago

hey! So the issue is that your screenshots entry is not the right shape. https://docs.pwabuilder.com/#/builder/manifest?id=screenshots has the right format. Thanks!