question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

app.getVersion() getting electron lib version and don't updating

See original GitHub issue

Hello guys , i’m using electron-updater for auto update my app and it’s don’t work very well , in the console shows image

Although my application is in version 0.0.1 in package.json

image

why this happen ?

I think de app.getVersion is getting electron lib version , have some configuration to set in electron-updater or in the electron-core lib ?

  • Node version:8.1.3
  • NPM version:5.0.3
  • Operating System: win10 x64

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
liederivativecommented, May 14, 2018

@SimulatedGREG Actually you can test updates in development, you just need to mock the app.getVersion function before importing the ‘electron-updater’ package. Something like:

import {version} from './package.json';
app.getVersion = ()=> version;
const { autoUpdater } = require("electron-updater");
7reactions
danmocommented, Oct 16, 2017

It’s a known “issue”. I’m using the following to grab the app version const appVersion = require('./package.json').version;

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron does not get valid version data through the app ...
At first I thought the error is from electron version is so low. But I read 3.1.X document there is app.getVersion() method and...
Read more >
Updating Applications - Electron
Once you've deployed your update server, you can instrument your app code to receive and apply the updates with Electron's autoUpdater module. Step...
Read more >
How to use the electron-updater.autoUpdater.channel function ...
To help you get started, we've selected a few electron-updater. ... console.log(`Current version of the app is ${autoUpdater. ... getVersion(), result.
Read more >
Auto update Electron Apps using Github Releases - Medium
TLDR. If you don't want to manually clone the repo for deployment then go to Hazel repo and click on the Deploy button....
Read more >
electron-builder
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found