Comments (11)
Status update: did not forget about this, it just got a lot hairier than I initially thought. This is due to the new @electron/get
module, which is likely going to be used elsewhere in the future too, and which doesn't seem to have any proper caching support which is...fun.
from flatpak-builder-tools.
from flatpak-builder-tools.
@x80486 Huh, electron-chromedriver
is not chromedriver itself but a node.js module for (downloading?) it.
from flatpak-builder-tools.
this is going to be fun to work around.
I really have no idea how to proceed from here. What can be done to mitigate this issue?
from flatpak-builder-tools.
You could try running yarn with --ignore-scripts
to create node_modules without running the scripts, then swap out download-chromedriver.js with a stub that e.g. copies it from an already downloaded file elsewhere, then run yarn again.
from flatpak-builder-tools.
I found a solution here electron/chromedriver#28
He basically patches the electron-chromedriver-package, to add a cache option:
diff --git a/download-chromedriver.js b/download-chromedriver.js
index 4614a66..0ed8eae 100644
--- a/download-chromedriver.js
+++ b/download-chromedriver.js
@@ -6,6 +6,7 @@ var extractZip = require('extract-zip')
var versionSegments = require('./package').version.split('.')
electronDownload({
+ cache: '/run/build/sideka-app/chromedriver-cache',
version: versionSegments[0] + '.' + versionSegments[1] + '.0',
chromedriver: true,
platform: process.env.npm_config_platform,
He than patches the electron-chromedriver
from the generated-sources.json
like this.
"generated-sources.json",
{
"type": "patch",
"path": "electron-chromedriver.patch",
"dest": "electron-chromedriver-1.7.1"
},
https://github.com/flathub/id.sideka.App/blob/master/id.sideka.App.json#L100-L103
My electron-chromedriver
-package is version 3.0.0. Other than that it seems quite similar.
function download (version, callback) {
electronDownload({
version,
chromedriver: true,
platform: process.env.npm_config_platform,
// ...
I have no idea on how to create a patch like that though. I will ask him.
from flatpak-builder-tools.
You could try running yarn with
--ignore-scripts
to create node_modules without running the scripts, then swap out download-chromedriver.js with a stub that e.g. copies it from an already downloaded file elsewhere, then run yarn again.
This is a great second option If I cannot figure out how to do it with a .patch
-file. Thanks @refi64 👍 But wouldn't I miss a lot of other scripts then?
from flatpak-builder-tools.
Exactly the same issue with a different application:
Running: yarn --cwd /run/build/standardnotes/main/ --offline
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "eslint-config-standard@^13.0.1".
[4/4] Building fresh packages...
[5/6] ⠠ electron
[-/6] ⠠ waiting...
[3/6] ⠠ electron-chromedriver
[-/6] ⠠ waiting...
error /run/build/standardnotes/main/node_modules/electron-chromedriver: Command failed.
Exit code: 1
Command: node ./download-chromedriver.js
Arguments:
Directory: /run/build/standardnotes/main/node_modules/electron-chromedriver
Output:
/run/build/standardnotes/main/node_modules/electron-chromedriver/download-chromedriver.js:19
if (err != null) throw err
^
Error: getaddrinfo EAI_AGAIN github.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) {
errno: 'EAI_AGAIN',
code: 'EAI_AGAIN',
Error: module standardnotes: Child process exited with code 1
from flatpak-builder-tools.
@x80486 Is chromedriver present in generated-sources.json
at all?
from flatpak-builder-tools.
Yes, @gasinvein, I can see it. Here is the repository: https://github.com/x80486/flathub/tree/org.standardnotes.standardnotes/ ...specifically: https://github.com/x80486/flathub/blob/org.standardnotes.standardnotes/generated-sources.json#L2340
from flatpak-builder-tools.
I think you might be on the right track, because if I provide chromedriver-v8.0.0-linux-x64.zip
manually in the manifest I don't get that error 🙄 ...but that's super-inconvenient.
from flatpak-builder-tools.
Related Issues (20)
- npm-generator: url content data makes flatpak-builder crash HOT 7
- node-generator: assert (package.lockfile.parent / source.path / 'package.json').is_file() AssertionError HOT 3
- [node] npm provider's `generated-sources.json` missing many packages (ENOTCACHED)
- pip generator does not collect build dependencies
- [node] NotImplementedError: Git sources in lockfile v2 format are not supported yet HOT 1
- Add support for pnpm in flatpak-node-generator HOT 1
- cargo: TomlDecodeError when attempting to parse Cargo.lock for rustdesk
- flatpak-node-generator HOT 1
- flatpak-pip-generator doesn't consider python_version HOT 1
- [node] NotImplementedError: Don't know how to handle package in package-lock.json HOT 5
- macOS wheels may be picked by Poetry generator
- aarch64 wheels may be picked by Poetry generator
- [cargo] KeyError in latest commit HOT 1
- Node generator don't create symlink to SHASUMS256.txt, electron/get gets cache miss HOT 5
- error with cargo generator, fail to find a file HOT 14
- Playwright firefox error HOT 1
- npm: Cached dependencies can be found under node18, but not node20
- flatpak-pip-generator balks on requirements-parser HOT 2
- flatpak-dotnet-generator doesn't create nuget-sources dir
- Cargo: The following files not tracked in the working copy would be overwritten by the extraction: HOT 2
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 flatpak-builder-tools.