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

Problem with Auto-Update (downgrade is disallowed) #3917

Closed
50l3r opened this issue May 22, 2019 · 8 comments
Closed

Problem with Auto-Update (downgrade is disallowed) #3917

50l3r opened this issue May 22, 2019 · 8 comments

Comments

@50l3r
Copy link

50l3r commented May 22, 2019

  • Electron builder version: 20.19.2
  • Electron updater version: 4.0.6
  • Electron version: 3.1.9
  • Target: Win x64

Hi guys,

I have an error trying to update my app in development environment:

This is my feed url:

autoUpdater.setFeedURL({
    provider: 'github',
    repo: 'gestios-native',
    owner: '50l3r',
    private: true,
    token: 'XXXXXXXXXXXXXXXXXXX'
});
autoUpdater.checkForUpdates();

And i listen all events and send to ipcrenderer:

const sendStatusToWindow = (text) => {
	if(mainWindow){
		mainWindow.webContents.send('message', text);
	}
};

autoUpdater.on('checking-for-update', () => {
	sendStatusToWindow('Checking for update...');
});

autoUpdater.on('update-available', () => {
	sendStatusToWindow('Update available');
});

autoUpdater.on('update-available', () => {
	sendStatusToWindow('Update not available');
});

autoUpdater.on('error', err => {
	sendStatusToWindow(`Error updating: ${err.toString()}`);
});

autoUpdater.on('download-progress', progressObj => {
	sendStatusToWindow(`Download speed: ${progressObj.bytesPerSecond} - Download ${progressObj.percent}%`);
});

autoUpdater.on('update-downloaded', () => {
	sendStatusToWindow(`Update downloaded: Installing...`);

	autoUpdater.quitAndInstall();
});

I have only one release:

But when i execute npm run dev i recieve this error:

Update for version 3.1.9 is not available (latest version: 0.0.1, downgrade is disallowed).

3.1.9 its my electron version. ¿Why can detect the electron version instead of my app?

@zaherg
Copy link

zaherg commented May 22, 2019

When running your development code the version which electron will pick is electron app not your app, you should build your app and try it as a production app.

@50l3r
Copy link
Author

50l3r commented May 23, 2019

When running your development code the version which electron will pick is electron app not your app, you should build your app and try it as a production app.

There not exist an option to test in development?

@zaherg
Copy link

zaherg commented May 23, 2019

not out of the box, one of the possible ways is to use minio check #3053 for more info

@50l3r
Copy link
Author

50l3r commented May 26, 2019

Much thanks. I'l try in production

@50l3r 50l3r closed this as completed May 26, 2019
@Skriptach
Copy link

@linuxjuggler "not out of the box"
Then what purpose of dev-app-update.yml?

@zaherg
Copy link

zaherg commented Aug 12, 2019

@Skriptach for me I use this file dev-app-update.yml to separate my local update dev server information from the production one.

@Skriptach
Copy link

@linuxjuggler That's it! And I supposed to use it too.
But I got same issue as topic starter.

@zaherg
Copy link

zaherg commented Aug 12, 2019

@Skriptach Short answer, when using electron-updater you should not use setFeedURL.

My long answer can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants