-
Notifications
You must be signed in to change notification settings - Fork 640
-
Notifications
You must be signed in to change notification settings - Fork 640
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
Electron v6 and gRPC error #989
Comments
Got the same issue with similar versions. |
Version 1.23.0 is now out with Electron 6 support. Please try that version. |
it works perfectly, thanks :) |
Fixed, thanks for that. |
How can I run the proper commands? I've installed
But I am not having any luck |
How is it failing? |
I'm on OSX 10.14.6 You can see at the start of the command that it tries to build using gRPC 1.22 MacBook-Pro-6:fmullen$ npm rebuild --runtime=electron --target=6.0.0
> [email protected] postinstall /Users/fmullen/code/megabot/node_modules/electron
> node install.js
> [email protected] postinstall /Users/fmullen/code/megabot/node_modules/protobufjs
> node scripts/postinstall
> [email protected] install /Users/fmullen/code/megabot/node_modules/@firebase/firestore/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.22.2/electron-v6.0-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (electron-v6.0 ABI, unknown) (falling back to source compile with node-gyp)
[... lots of *.o files compiling]
In file included from ../deps/grpc/src/boringssl/err_data.c:18:
In file included from /Users/fmullen/Library/Caches/node-gyp/6.0.0/include/node/openssl/err.h:115:
/Users/fmullen/Library/Caches/node-gyp/6.0.0/include/node/openssl/e_os2.h:276:11: error: 'OPENSSL_EXPORT' macro redefined [-Werror,-Wmacro-redefined]
# define OPENSSL_EXPORT extern
[... more errors] There are about ~20 errors regarding I've deleted |
|
Yes, that is correct. I can confirm that I have |
What if you move the package.json file to a new directory and run |
I think I found the issue. Even in a new directory, the script still ran with The problem turned up again when I added firebase (needed for this project). After upgrading from version Thanks for looking into it @murgatroid99 |
for further reference, here is the offending section in "@firebase/firestore": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-1.5.0.tgz",
"integrity": "sha512-apZIwUWfWnIqoYD5QjpDKmZ9H5ghmT5wFJKMQsmniU+uQYaMo4CtQYcmw+WdvwAUXfqRBAaP0l/UErr4aqcn9w==",
"requires": {
"@firebase/firestore-types": "1.5.0",
"@firebase/logger": "0.1.23",
"@firebase/util": "0.2.26",
"@firebase/webchannel-wrapper": "0.2.25",
"@grpc/proto-loader": "^0.5.0",
**"grpc": "1.22.2",**
"tslib": "1.10.0"
}
} |
Hi @felipemullen wondering which versions of Electron and firebase you are using for this. I am having the same issue. I have tried Electron v 6.0.11 & 6.1.0 & 7.0.0 along with Firebase 6.4.2 & 6.5.0 & 7.2.1 It looks like there has been some talk of this on the firebase js repo see: but for the time being the latest version of firebase's lockfile still looks like: |
@nkndy these are the relevant versions listed in my "electron": {
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/electron/-/electron-6.0.6.tgz",
...
},
...
"firebase": {
"version": "6.5.0",
...
"requires": {
"@firebase/app": "0.4.15",
"@firebase/app-types": "0.4.3",
"@firebase/auth": "0.11.8",
"@firebase/database": "0.5.1",
"@firebase/firestore": "1.5.0",
"@firebase/functions": "0.4.16",
"@firebase/installations": "0.2.5",
"@firebase/messaging": "0.4.9",
"@firebase/performance": "0.2.17",
"@firebase/polyfill": "0.3.20",
"@firebase/storage": "0.3.10",
"@firebase/util": "0.2.26"
}
},
"@firebase/firestore": {
"version": "1.5.0",
...
"dependencies": {
"grpc": {
"version": "1.23.3",
"resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz",
"integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==",
"requires": {
"@types/bytebuffer": "^5.0.40",
"lodash.camelcase": "^4.3.0",
"lodash.clone": "^4.5.0",
"nan": "^2.13.2",
"node-pre-gyp": "^0.13.0",
"protobufjs": "^5.0.3"
},
...
}
}
}, I don't remember 100% but I may have actually edited the package-lock file manually in order to make this work. My statement about the upgrade making it work was a false positive, I just forgot to come back here and edit my comment. That's why if you compare what I am currently using with my previous snippet, you will see that the old snippet lists firestore 1.5.0 with grpc 1.22.2 whereas the one here shows the same firestore with a newer grpc |
I'm sorry, Electron 6 support got broken in grpc 1.24.0. But it is fixed in grpc 1.24.1 |
thank you for your advice and how about nested dependencies? |
@Randyshu2018 if you are still having issues with nested dependencies (like firebase) you can try using the I posted an answer here: |
Problem description
We are unable to use gRPC with electron v6.
Reproduction steps
Start with an empty directory. Setup electron and grpc:
Re-buliding grpc for electron returns an error:
Environment
Additional context
Traceback:
The text was updated successfully, but these errors were encountered: