pwa-builder / PWABuilder-CLI

Node.js tool for App Generation
Other
1.62k stars 142 forks source link

mismatch between directory structure generated by generate command and expected by run command for windows10 #351

Closed MilosRasic closed 3 years ago

MilosRasic commented 4 years ago

Describe the bug generate command generates windows10/appxmanifest/appxmanifest.xml

run command expect windows10/manifest/appxmanifest.xml, so it fails

To Reproduce

  1. In a temp directory, run pwabuilder -p windows10 [your favorite test website url]
  2. run pwabilder run windows10

Expected behavior Generate and expected directory structure is the same and run command works.

Screenshots generated error

Desktop (please complete the following information): Tested on Linux and Windows 10.

Additional context This was reproduced with a website with no manifest.json so pwabuilder generated one locally. Did not try with a real PWA.

Did some debugging and I believe the problem is in pwabuilder-lib or pwabuilder-windows10. Tried to write my own script that uses pwabuilder-lib directly and there's no trace of CLI code causing the above.

ghost commented 4 years ago

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

JudahGabriel commented 4 years ago

Does it still fail for a website with a manifest?

MilosRasic commented 4 years ago

Didn't try. I'm trying to create a package for a self-hosted web app for CE devices which we are porting to Xbox One. Since it's optimized for spatial/directional navigation and 10-foot experience, there's no much sense in providing a manifest.json and turning it into a real PWA for the browser and all the other platforms supported by pwabuilder.

I'll give it a try though and let you know, but I think I've found the root cause. Line 309 in platform.js in pwabuilder-windows10

var sourcePath = path.join(platformDir, 'manifest');

if I change it to

var sourcePath = path.join(platformDir, 'appxmanifest');

run command goes through but fails because my Windows 10 is not in dev mode.

JudahGabriel commented 4 years ago

@lee-leonardo can you have a look at this?

lee-leonardo commented 3 years ago

@MilosRasic has this issue been resolved for you? If not please unclose the issue, but since we haven't heard anything in 2 months I'm considering it closed for now