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.75k stars 284 forks source link

Error generating windows package #2113

Closed sparkktv closed 3 years ago

sparkktv commented 3 years ago

I received the following error when generating a package for https://www.sparkk.tv

Error: Error generating Windows package Error: Failed. Status code 500, Error: Internal Server 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://www.sparkk.tv" --target="D:\Temp\pwabuilder\modernpackage-fea00e60-9b9c-46b0-b99c-5169a9b91e65" --version="3.1.0.0" --publisher="CN=9E4AB047-D49F-492E-A9BF-FBA557171E94" --package-id-name="27061SparkkOnlineTVNetwor.SparkkTV-OfficialApp" --launch-args=" --windows-store-app" --display-name="Sparkk TV" --publisher-display-name="Sparkk Online TV Network" --images="D:\Temp\pwabuilder\app-images-3369306e-50bf-4e46-a0f9-ec83d5cf7a10" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --display-mode="standalone" --signed-app

Standard output:

Standard error: [1001/020050.002:WARNING:resource_bundle.cc(430)] locale_file_path.empty() for locale [1001/020052.014:INFO:pwa_headless_manifest_handler.cc(197)] Found manifest at https://www.sparkk.tv/manifest.json [1001/020055.164:ERROR:appx_package_builder.cc(265)] Error -2146958844: Could not close file stream. [1001/020055.164:ERROR:pwa_package_builder.cc(101)] Package creation failed.

Output directory: D:\Temp\pwabuilder\modernpackage-fea00e60-9b9c-46b0-b99c-5169a9b91e65

Msix options: --url="https://www.sparkk.tv" --target="D:\Temp\pwabuilder\modernpackage-fea00e60-9b9c-46b0-b99c-5169a9b91e65" --version="3.1.0.0" --publisher="CN=9E4AB047-D49F-492E-A9BF-FBA557171E94" --package-id-name="27061SparkkOnlineTVNetwor.SparkkTV-OfficialApp" --launch-args=" --windows-store-app" --display-name="Sparkk TV" --publisher-display-name="Sparkk Online TV Network" --images="D:\Temp\pwabuilder\app-images-3369306e-50bf-4e46-a0f9-ec83d5cf7a10" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --display-mode="standalone" --signed-app

Standard output: Standard error: [1001/020050.002:WARNING:resource_bundle.cc(430)] locale_file_path.empty() for locale

[1001/020052.014:INFO:pwa_headless_manifest_handler.cc(197)] Found manifest at https://www.sparkk.tv/manifest.json

[1001/020055.164:ERROR:appx_package_builder.cc(265)] Error -2146958844: Could not close file stream.

[1001/020055.164:ERROR:pwa_package_builder.cc(101)] Package creation failed.

---> 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://www.sparkk.tv" --target="D:\Temp\pwabuilder\modernpackage-fea00e60-9b9c-46b0-b99c-5169a9b91e65" --version="3.1.0.0" --publisher="CN=9E4AB047-D49F-492E-A9BF-FBA557171E94" --package-id-name="27061SparkkOnlineTVNetwor.SparkkTV-OfficialApp" --launch-args=" --windows-store-app" --display-name="Sparkk TV" --publisher-display-name="Sparkk Online TV Network" --images="D:\Temp\pwabuilder\app-images-3369306e-50bf-4e46-a0f9-ec83d5cf7a10" --pri="C:\inetpub\wwwroot\Resources\resources.pri" --resource-language="EN-US" --display-mode="standalone" --signed-app

Standard output:

Standard error: [1001/020050.002:WARNING:resource_bundle.cc(430)] locale_file_path.empty() for locale

[1001/020052.014:INFO:pwa_headless_manifest_handler.cc(197)] Found manifest at https://www.sparkk.tv/manifest.json

[1001/020055.164:ERROR:appx_package_builder.cc(265)] Error -2146958844: Could not close file stream.

[1001/020055.164:ERROR:pwa_package_builder.cc(101)] Package creation failed.

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.g__Awaited|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.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_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.Routing.EndpointMiddleware.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-US,en;q=0.5

Connection: close

Content-Length: 937

Content-Type: application/json

Host: pwabuilder-win-chromium-platform.centralus.cloudapp.azure.com

Te: trailers

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0

origin: https://www.pwabuilder.com

sec-fetch-dest: empty

sec-fetch-mode: cors

sec-fetch-site: cross-site

Stack trace: U/<@https://www.pwabuilder.com/index-783ae374-0f07ad79.js:1:11068

ghost commented 3 years ago

Hello sparkktv, 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 🙌

davrous commented 3 years ago

Hello, sorry for the inconvenience. I've managed to generate Windows packages using your provided URL: https://sparkk.tv. Are you still experiencing the issue?

sparkktv commented 3 years ago
Screen Shot 2021-10-04 at 2 01 06 PM

Yes this is still happening. It doesn't happen if I don't sign the package but then I'm unable to update my app and Microsoft won't accept it unsigned with my info.

sparkktv commented 3 years ago

So to sum it up, this happens when you press Store Package and put in your information. But if you press Test Package, that works fine but then you are unable to submit or update your app in the Microsoft Dev Center. Can someone please say if a fix is in the works, I see many people here posting the same issue.

davrous commented 3 years ago

Sorry I can't still reproduce. I've sent you a DM on Twitter so you can share the exact values you're using, it probably comes from here. Thanks!

davrous commented 3 years ago

Ok, my bad, I'm reproducing with your values. I don't know why with my own publisher info it works but with yours, it fails. Pinging @JudahGabriel, our backend expert on this service.

sparkktv commented 3 years ago

Thank you, hopefully this can be fixed soon...

JudahGabriel commented 3 years ago

Hi @sparkktv investigating now. I'll post an update today.

JudahGabriel commented 3 years ago

@sparkktv I'd like to confirm: are you certain this is your package ID?

27061SparkkOnlineTVNetwor.SparkkTV-OfficialApp

Investigating the issue, we've found that a Microsoft SDK tool called makeappx.exe rejects creating your app package because your package ID is longer than 39 characters.

If 27061SparkkOnlineTVNetwor.SparkkTV-OfficialApp is indeed your package ID as issued from Partner Center, then we have a bug in a Windows SDK tool. Can you confirm this is indeed your package ID?

You can find this information in Partner Center -> [your app name] -> Product management -> Product Identity: image

JudahGabriel commented 3 years ago

Update: we've determined the cause of the issue and are working on a fix.

JudahGabriel commented 3 years ago

More updates: we're tracking this bug internally, and we expect to have a fix soon, rough estimate next week.

smatoox commented 3 years ago

Hi @JudahGabriel Any update for a fix ?

I haven't posted a new issue because I have exactly same logs.

The common points :

JudahGabriel commented 3 years ago

Yes: we have a fix internally that we are waiting for code review and merge. It's Friday here, so the fix will likely be pushed out Monday or Tuesday.

smatoox commented 3 years ago

Hi,

Thanks for informations, it was friday here too, I totally understand :grin:

JudahGabriel commented 3 years ago

Hey @smatoox

I'm glad to report this bug has been fixed. Thanks for reporting it!

I've generated a Windows package with your URL and publisher details, and it successfully worked.

Please feel free to reopen this issue if you have any more trouble.