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

Windows package generation crashes #1898

Closed StrawMonkey closed 2 years ago

StrawMonkey commented 3 years ago

Describe the bug I get an error when generating the windows package, other platforms work.

URL to app https://app.timeling.com

To Reproduce Steps to reproduce the behavior:

  1. Go to pwabuilder.com
  2. Enter https://app.timeling.com
  3. Everything looks šŸ‘Œ, click Next
  4. Download windows package

Expected behavior Package download.

Screenshots image

Additional info (please complete the following information):

Additional context

Error response:

Error: Error generating Windows package Error: Failed. Error: Error: Failed. Status code 500, Error: , Details: Microsoft.PWABuilder.Windows.Chromium.Models.ProcessException: The pwa_builder.exe process exited with exit code 1. Process: C:\inetpub\wwwroot\Resources\cli\pwabuilder\pwa_builder.exe Process args: --url="https://app.timeling.com" --target="D:\Temp\pwabuilder\modernpackage-bcb603f7-2000-49af-b8d8-9a5588b5bc16" --version="1.0.1.0" --publisher="CN=F9E241D0-8351-4031-894E-3458A3ABCAB7" --package-id-name="39898StrawMonkey.Timeling" --launch-args=" --windows-store-app" --display-name="Timeling" --publisher-display-name="StrawMonkey" --images="D:\Temp\pwabuilder\app-images-eaf81e02-7259-4606-88a6-2807fc7ac0fe" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --signed-app Standard output: Standard error: [0706/155842.239:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale [0706/155842.286:WARNING:headless_browser_main_parts.cc(107)] Cannot create Pref Service with no user data dir. [0706/155846.488:ERROR:pwa_headless_manifest_handler.cc(190)] Failed to retreive PWA manifest for https://app.timeling.com Output directory: D:\Temp\pwabuilder\modernpackage-bcb603f7-2000-49af-b8d8-9a5588b5bc16 Msix options: --url="https://app.timeling.com" --target="D:\Temp\pwabuilder\modernpackage-bcb603f7-2000-49af-b8d8-9a5588b5bc16" --version="1.0.1.0" --publisher="CN=F9E241D0-8351-4031-894E-3458A3ABCAB7" --package-id-name="39898StrawMonkey.Timeling" --launch-args=" --windows-store-app" --display-name="Timeling" --publisher-display-name="StrawMonkey" --images="D:\Temp\pwabuilder\app-images-eaf81e02-7259-4606-88a6-2807fc7ac0fe" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --signed-app Standard output: Standard error: [0706/155842.239:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale [0706/155842.286:WARNING:headless_browser_main_parts.cc(107)] Cannot create Pref Service with no user data dir. [0706/155846.488:ERROR:pwa_headless_manifest_handler.cc(190)] Failed to retreive PWA manifest for https://app.timeling.com ---> Microsoft.PWABuilder.Windows.Chromium.Models.ProcessException: The pwa_builder.exe process exited with exit code 1. Process: C:\inetpub\wwwroot\Resources\cli\pwabuilder\pwa_builder.exe Process args: --url="https://app.timeling.com" --target="D:\Temp\pwabuilder\modernpackage-bcb603f7-2000-49af-b8d8-9a5588b5bc16" --version="1.0.1.0" --publisher="CN=F9E241D0-8351-4031-894E-3458A3ABCAB7" --package-id-name="39898StrawMonkey.Timeling" --launch-args=" --windows-store-app" --display-name="Timeling" --publisher-display-name="StrawMonkey" --images="D:\Temp\pwabuilder\app-images-eaf81e02-7259-4606-88a6-2807fc7ac0fe" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --signed-app Standard output: Standard error: [0706/155842.239:WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale [0706/155842.286:WARNING:headless_browser_main_parts.cc(107)] Cannot create Pref Service with no user data dir. [0706/155846.488:ERROR:pwa_headless_manifest_handler.cc(190)] Failed to retreive PWA manifest for https://app.timeling.com at Microsoft.PWABuilder.Windows.Chromium.Services.ProcessRunner.Run(String processPath, String processArgs, Nullable`1 killTime, String workingDirectory, Encoding outputEncoding) in D:\Dev\pwabuilder-windows-chromium\Web\Services\ProcessRunner.cs:line 79 at Microsoft.PWABuilder.Windows.Chromium.Services.PwaBuilderWrapper.Run(WindowsAppPackageOptions options, ImageGeneratorResult appImages, WebAppManifestContext webManifest, String outputDirectory) in D:\Dev\pwabuilder-windows-chromium\Web\Services\PwaBuilderWrapper.cs:line 51 --- End of inner exception stack trace --- at Microsoft.PWABuilder.Windows.Chromium.Services.PwaBuilderWrapper.Run(WindowsAppPackageOptions options, ImageGeneratorResult appImages, WebAppManifestContext webManifest, String outputDirectory) in D:\Dev\pwabuilder-windows-chromium\Web\Services\PwaBuilderWrapper.cs:line 57 at Microsoft.PWABuilder.Windows.Chromium.Services.ModernWindowsPackageCreator.BuildStorePackage(WindowsAppPackageOptions options, ImageGeneratorResult appImages, WebAppManifestContext webManifest, String outputDirectory) in D:\Dev\pwabuilder-windows-chromium\Web\Services\ModernWindowsPackageCreator.cs:line 72 at Microsoft.PWABuilder.Windows.Chromium.Services.ModernWindowsPackageCreator.Create(WindowsAppPackageOptions options, ImageGeneratorResult appImages, WebAppManifestContext webManifest, String outputDirectory) in D:\Dev\pwabuilder-windows-chromium\Web\Services\ModernWindowsPackageCreator.cs:line 51 at Microsoft.PWABuilder.Windows.Chromium.Services.WindowAppPackageCreator.CreateModernWindowsPackage(WindowsAppPackageOptions options, ImageGeneratorResult appImages, WebAppManifestContext webManifest) in D:\Dev\pwabuilder-windows-chromium\Web\Services\WindowAppPackageCreator.cs:line 147 at Microsoft.PWABuilder.Windows.Chromium.Services.WindowAppPackageCreator.GenerateZip(WindowsAppPackageOptions options) in D:\Dev\pwabuilder-windows-chromium\Web\Services\WindowAppPackageCreator.cs:line 134 at Microsoft.PWABuilder.Windows.Chromium.Services.WindowAppPackageCreator.CreateAppPackage(WindowsAppPackageOptions options) in D:\Dev\pwabuilder-windows-chromium\Web\Services\WindowAppPackageCreator.cs:line 68 at Microsoft.PWABuilder.Windows.Chromium.Controllers.MsixController.CreateAppPackage(WindowsAppPackageOptions options) in D:\Dev\pwabuilder-windows-chromium\Web\Controllers\MsixController.cs:line 44 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(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|19_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.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.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) HEADERS ======= Accept: */* Accept-Encoding: gzip, deflate, br Accept-Language: en,sv;q=0.9,en-US;q=0.8 Connection: close Content-Length: 2612 Content-Type: application/json Host: pwabuilder-win-chromium-platform.centralus.cloudapp.azure.com Referer: https://www.pwabuilder.com/ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4544.0 Safari/537.36 Edg/93.0.933.1 sec-ch-ua: "Microsoft Edge";v="93", " Not;A Brand";v="99", "Chromium";v="93" dnt: 1 sec-ch-ua-mobile: ?0 origin: https://www.pwabuilder.com sec-fetch-site: cross-site sec-fetch-mode: cors sec-fetch-dest: empty
ghost commented 3 years ago

Hello StrawMonkey, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback šŸ™Œ

jgw96 commented 3 years ago

Thanks for opening an issue with us! I was just able to confirm this issue. After debugging it looks like the front-end is definitely sending the right data , and the manifest url being sent is also correct. @JudahGabriel based on this Im thinking this is a backend issue with our Edge package generator. image

JudahGabriel commented 3 years ago

Hi @StrawMonkey

I've determined the issue: multiple redirects are causing our tooling to be unable to fetch your manifest.

Specifically, we have backend tooling from the Edge team that is having trouble following your redirects, and ultimately, it gives up trying to find your manifest.

Here's how your site is working today:

  1. https://app.timeling.com redirects to
  2. https://app.timeling.com/en-gb which redirects to
  3. https://app.timeling.com/Identity/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dspa%26redirect_uri%3Dhttps%253A%252F%252Fapp.timeling.com%252Fauthentication%252Flogin-callback%26response_type%3Dcode%26scope%3DTimelingAPI%2520openid%2520profile%26state%3D22bf9deddbb8462fa6ee2f2b16f918c8%26code_challenge%3DmQB1j-0Dh38HbZqgJxNgKzclDlatP5LqecLsxD3TciI%26code_challenge_method%3DS256%26response_mode%3Dquery

This double redirect appears to be causing the issue. Our internal tooling gives up and can't find your manifest.

We've opened a bug internally to fix this.

In the meantime, here's a workaround:

In PWABuilder, you can use https://app.timeling.com/en-gb as your URL. With that, you'll be able to generate your package.

I'm leaving this bug opened until we resolve the underlying issue in our internal tooling.

JudahGabriel commented 3 years ago

Note to self: internal bug filed here.

JudahGabriel commented 2 years ago

Hey @StrawMonkey I'm glad to report this issue has been fixed, app.timeling.com correctly works in PWABuilder, including generating a Windows app package for your PWA. šŸ‘