Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.deb file is not opening after install #187

Closed
vishakhag6 opened this issue Apr 12, 2019 · 7 comments
Closed

.deb file is not opening after install #187

vishakhag6 opened this issue Apr 12, 2019 · 7 comments

Comments

@vishakhag6
Copy link

I am using electron-installer-debian - v1.1.1, node - v11.8.0, npm - 6.9.0, ubuntu- 18.04

Creating my build like:

  1. npm run electron-packager . app --platform linux --arch x64 --out dist/
  2. npm run electron-installer-debian --src dist/app-linux-x64/ --dest dist/installers/ --arch amd64

In my dist folder package is getting created with the name "app_0.0.0_amd64.deb" and it is installed successfully but it is not getting open and showing the size of 0 bytes also.

@malept
Copy link
Member

malept commented Apr 12, 2019

Can you compile the example app successfully?

In order to debug your problem further, we need a minimal testcase to reproduce your problem. Using the electron-quick-start repository as a base, could you please create a minimal Electron app that illustrates the issue you described, and post a link to it here?

@vishakhag6
Copy link
Author

My project is in angular 7 and with the help of electron, I was creating the desktop app.
I am following this article to create my desktop app.

https://medium.com/@murshidhassen/angular-7-electron-web-desktop-love-2995349e8e61

My main.js file looks like this:
`const { app, BrowserWindow } = require('electron');
let win;
function createWindow() {

// Create the browser window.
win = new BrowserWindow({ width: 800, height: 600 });

// If you want to give full screen
// win = new BrowserWindow({ fullscreen: true })

// and load the index.html of the app.
win.loadFile('../dist/app/index.html');

// Open the DevTools.
win.webContents.openDevTools();

// Emitted when the window is closed.
win.on('closed', () => {
win = null
})
};

// This method will be called when the Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {

// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') { app.quit() }
});

app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) { createWindow() }
}); `

and I am following this article to create packages for Linux:
https://www.npmjs.com/package/electron-installer-debian

According to this, I am having dist/installers/app_0.0.1_amd64.deb (Which is the last step to create a package at your machine according to the environment, mine is Linux 18.04)

But after install, Not opening up. Not getting any error nothing.

@JesuisOriginal
Copy link

same here, the package .deb is built, but does not open.

@fcastilloec
Copy link
Collaborator

This is more of an error on the app itself rather than this module. We simply just used the files created by electron-packager, together with the configuration the user provides.
If it doesn't open, it's highly likely that it also doesn't work after packaging it with electron-packager

@malept
Copy link
Member

malept commented May 24, 2019

Closing as there's not enough information to confirm that electron-installer-debian is indeed the culprit.

If someone can give a GitHub link to a minimal Electron app with the exact commands run to generate the unusable .deb file, we might be able to find a bug, but as @fcastilloec said, it's more likely that it's the app code that's at fault.

@malept malept closed this as completed May 24, 2019
@pauloorm
Copy link

try it, pls:
cd /usr/lib/
sudo chmod -R 777 app_folder/
sudo chmod +x appClient

@kapytanhook
Copy link

try it, pls: cd /usr/lib/ sudo chmod -R 777 app_folder/ sudo chmod +x appClient

This actually worked for me, was such a long struggle, would be nice if the installer set the permissions right

@electron-userland electron-userland locked as resolved and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants