electron-userland / electron-windows-store

:package: Turn Electron Apps into Windows AppX Packages
MIT License
677 stars 86 forks source link

UWP packaged app leaves files locked after closing #30

Closed MarshallOfSound closed 7 years ago

MarshallOfSound commented 8 years ago

Not sure if this is somehow an upstream Electron issue that only manifests itself in UWP packaged apps.

Basically I'm packaging my application like so

  const child = spawn(
    path.resolve(__dirname, 'node_modules', '.bin', 'electron-windows-store.cmd'),
    [
      '--input-directory',
      '"dist\\Google Play Music Desktop Player-win32-ia32"',
      '--output-directory',
      'dist\\uwp',
      '--flatten',
      'true',
      '--package-version',
      '1.0.0.0',
      '--package-name',
      'GPMDP',
      '--package-display-name',
      'Google Play Music Desktop Player',
      '--package-executable',
      'Google Play Music Desktop Player.exe'
    ]
  );

  // spit stdout to screen
  child.stdout.on('data', (data) => process.stdout.write(data));

  // Send stderr to the main console
  child.stderr.on('data', (data) => process.stderr.write(data));

  child.on('close', (code) => {
    done();
  });

So pretty standard I think. When I run the application it launches correctly 🎉 And everything appears to work.

However when I close the application and attempt to run the normal non-UWP win32 version I get a load of "resource locked" errors on the shared files that I create while running the app (Settings and generic Data Storage).

locked

Is this a limitation of the appx magic that is happening because I had to reboot my PC to get those files unlocked which is an absolute nightmare when developing 😢

felixrieseberg commented 8 years ago

I assume this is actually not an error inside Electron, but totally with Windows. I hope that Microsoft will get that fixed before Project Centennial launches publically.

felixrieseberg commented 7 years ago

This should now be fixed in Windows itself, so I'm closing this.