Comments (12)
This is the list of the previous versions retrieved from the GitHub api and it is correct.
To point out that it is a private repository, but as answered in another topic (Issue#5), I set the GitHub token and it is accessible.
[
{
version: 'v0.0.1',
url: 'https://github.com/.../package.exe'
}
]
Here the full log.
latestReleaseFile C:\...\package-0.0.2.exe
Current release info {
latestReleaseFile: 'C:\\...\\package-0.0.2.exe',
latestVersion: undefined,
latestReleaseFileName: 'package-0.0.2'
}
Downloading file C:\...\package.exe from https://github.com/.../releases/download/v0.0.1/package-0.0.1.exe
Cache exists: C:\...\.electron-delta\data\package-0.0.1.exe
Extracting C:\...\.electron-delta\data\package-0.0.1.exe
Start extracting to C:\...\.electron-delta\data\0.0.1
Error: 7-zip exited with code 2
7-Zip (a) 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 0 bytes
Extracting archive: C:\...\.electron-delta\data\package-0.0.1.exe
ERROR: C:\...\.electron-delta\data\package-0.0.1.exe
Can not open the file as archive
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0
at run (C:\package\node_modules\7zip-min\index.js:54:22)
at Object.unpack (C:\package\node_modules\7zip-min\index.js:20:9)
at C:\package\node_modules\@electron-delta\builder\src\utils.js:48:12
at new Promise (<anonymous>)
at extract7zip (C:\package\node_modules\@electron-delta\builder\src\utils.js:45:48)
at createAllDeltas (C:\package\node_modules\@electron-delta\builder\src\create-all-deltas.js:89:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at build (C:\package\node_modules\@electron-delta\builder\src\index.js:41:33)
at exports.default (C:\package\.erb\scripts\electron-delta.ts:50:31)
at C:\package\node_modules\app-builder-lib\src\index.ts:80:36
at Object.executeFinally (C:\package\node_modules\builder-util\src\promise.ts:12:14)
⨯ Error: 7-zip exited with code 2
7-Zip (a) 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 0 bytes
Extracting archive: C:\...\.electron-delta\data\package-0.0.1.exe
ERROR: C:\...\.electron-delta\data\package-0.0.1.exe
Can not open the file as archive
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0
failedTask=build stackTrace=Error: Error: 7-zip exited with code 2
7-Zip (a) 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 0 bytes
Extracting archive: C:\...\.electron-delta\data\package-0.0.1.exe
ERROR: C:\...\.electron-delta\data\package-0.0.1.exe
Can not open the file as archive
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0
at C:\package\node_modules\@electron-delta\builder\src\utils.js:51:14
at C:\package\node_modules\7zip-min\index.js:86:12
at ChildProcess.<anonymous> (C:\package\node_modules\7zip-min\index.js:68:9)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
from electron-delta.
- Ok, now I set also the
latestVersion
variable and it is no longerundefined
, but nothing has changed. - I will send to your private email [email protected] my package with WeTransfer.
- The
target
is set tonsis
. These are mywin
andnsis
configuration in package.json:
"win": {
"target": [
"nsis"
],
"publish": [
{
"provider": "github",
"private": true,
"owner": "xxx",
"repo": "xxx",
"token": "xxx",
"releaseType": "release"
}
]
},
"nsis": {
"oneClick": true,
"perMachine": false,
"allowElevation": true,
"runAfterFinish": true,
"differentialPackage": true,
"createDesktopShortcut": "always",
"deleteAppDataOnUninstall": true,
"artifactName": "${productName}-${version}.${ext}",
"uninstallDisplayName": "${productName}",
"installerIcon": "./assets/icon.ico",
"installerHeaderIcon": "./assets/icon.ico",
"uninstallerIcon": "./assets/icon.ico"
},
from electron-delta.
@sandeep1995 I have just invited you as collaborator to my repo. The branch is delta-updater
. Thanks
from electron-delta.
@luigigargioni I will look into your app this weeked. Sorry for the delayed response.
from electron-delta.
Thank you for using electron-delta.
- Please make sure that each download url is accessible.
- You need to return URLs to the previously released versions. It should be a link to the full installer. It can be exe or zip.
To further assist you, can you
- paste the full log from the console
- share me the download link of the old version app and I will check if 7zip is able to extract it or not
from electron-delta.
-
latestVersion
seems to be undefined for your case. Make sure you execute your script usingnpm
so it auto-populates the latestVersion -
Please share the file using https://wetransfer.com/ as I can not access the URL.
-
What's your Windows target?
from electron-delta.
On my mac and windows, the provided exe was successfully extracted without any issue. I wrote a small script to check.
const { extract7zip } = require('@electron-delta/builder/src/utils');
const fileName = 'Gestionale-FP-0.0.1.exe';
extract7zip(fileName, './0.0.1/');
Internally https://github.com/onikienko/7zip-min is being used to unzip the installer. Can you check if 7zip is able to unzip the exe on your pc using this mentioned library?
I made a new release upgrading 7zip-min hoping it can unzip the exe in your pc. https://github.com/electron-delta/electron-delta/releases/tag/v0.1.12
from electron-delta.
With the new releases 0.1.11
and 0.1.12
I have this error:
• electron-builder version=23.0.3 os=10.0.19044
• loaded configuration file=package.json ("build" field)
• writing effective config file=release\build\builder-effective-config.yaml
• installing production dependencies platform=win32 arch=x64 appDir=C:\...\release\app
• packaging platform=win32 arch=x64 electron=18.2.4 appOutDir=release\build\win-unpacked
• building target=nsis file=release\build\package-0.0.2.exe archs=x64 oneClick=true perMachine=false
• building block map blockMapFile=release\build\package-0.0.2.exe.blockmap
• publishing publisher=Github (owner: luigigargioni, project: xxx, version: 0.0.2)
• uploading file=xxx-0.0.2.exe.blockmap provider=github
• uploading file=xxx-0.0.2.exe provider=github
⨯ require() of ES Module C:\...\node_modules\@electron-delta\builder\node_modules\env-paths\index.js from C:\...\node_modules\@electron-delta\builder\src\delta-installer-builder\index.js not supported.
Instead change the require of C:\...\node_modules\@electron-delta\builder\node_modules\env-paths\index.js in C:\...\node_modules\@electron-delta\builder\src\delta-installer-builder\index.js to a dynamic import() which is available in all CommonJS modules. failedTask=build stackTrace=Error [ERR_REQUIRE_ESM]: require() of ES Module C:\...\node_modules\@electron-delta\builder\node_modules\env-paths\index.js from C:\...\node_modules\@electron-delta\builder\src\delta-installer-builder\index.js not supported.
Instead change the require of C:\...\node_modules\@electron-delta\builder\node_modules\env-paths\index.js in C:\...\node_modules\@electron-delta\builder\src\delta-installer-builder\index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (C:\...\node_modules\@electron-delta\builder\src\delta-installer-builder\index.js:4:18)
at Object.<anonymous> (C:\...\node_modules\@electron-delta\builder\src\create-all-deltas.js:5:31)
at Object.<anonymous> (C:\...\node_modules\@electron-delta\builder\src\index.js:2:25)
at Object.<anonymous> (C:\...\.erb\scripts\electron-delta.ts:1:19)
at Object.resolveFunction (C:\...\node_modules\app-builder-lib\out\platformPackager.js:597:15)
at C:\...\node_modules\app-builder-lib\out\index.js:50:58
at async Object.executeFinally (C:\...\node_modules\builder-util\out\promise.js:14:18)
from electron-delta.
I have also tried to implement the extract7zip
function with the 7zip-min
library (copying from your code), and when I try to extract my file I have this error:
Error: spawn C:\...\node_modules\electron\dist\resources\electron.asar\renderer\win\x64\7za.exe ENOENT
at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
at __node_internal_errnoException (node:internal/errors:594:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I think it is not finding the file, because even typing another name gives me the same error
from electron-delta.
⨯ require() of ES Module
It should be fixed now with the latest new release https://github.com/electron-delta/electron-delta/releases/tag/v0.1.13
It's pretty weird that extract zip is not working due to missing 7za.exe.
Feel free to add me as the outside collaborator for your repo.
Do you have this env set in your pc USE_SYSTEM_7ZA
?
from electron-delta.
Now ⨯ require() of ES Module
is fixed.
I have tried to implement a simple button that launch the extract7zip
function and I still have this error
I have also tried to print the USE_SYSTEM_7ZA
env variable and it is undefined
. Honestly I don't know which value it needs to have to be right.
Instead, when I try to publish on GitHub I have the same previous error
The last thing I can think of is that I have 7-zip installed as software on my pc, I don't think so, but maybe it interferes.
from electron-delta.
@luigigargioni The file (in ~/.electron-delta/
) was 0 bytes because the previous request to download it failed.
but since the file still existed we didn’t try to download it again
it just kept trying to unarchive the 0-byte file
To resolve the issue please delete the cache at ~/.electron-delta/
or override the cache location like the following
const path = require('path');
const options = {
productIconPath: path.join(__dirname, "icon.ico"),
productName: "electron-sample-app",
cache: path.join(__dirname, './cache'),
getPreviousReleases: async () => {
return [
];
},
sign: async (filePath) => {
// sign each delta executable
},
};
from electron-delta.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-delta.