Comments (21)
Hi, I am fixing this issue soon. This is because I used my own babel
version in development, but since N1 has upgraded its Babel version, I no
longer need it. I will upload a fix later today. If you would like to fix
it in the meantime, remove the whole devDependencies section in
package.json, delete the node_modules folder where cypher is installed and
rerun npm install --production.
Sorry that I am writing this via email.
On Wed, May 25, 2016 at 8:42 AM Artem Hluvchynskyi [email protected]
wrote:
Tried installing the plugin on latest N1. This fails with an error message:
Running apm install failed to install package dependencies.The console shows this:
Failed to activate package named 'cypher' ReferenceError: Unknown plugin "transform-class-properties" specified in "/home/ahluvchynskyi/.nylas/packages/cypher/.babelrc" at 0, attempted to resolve relative to "/home/ahluvchynskyi/.nylas/packages/cypher"
at /usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:17
at Array.map (native)
at Function.normalisePlugins (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:196:20)
at OptionManager.mergeOptions (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:317:36)
at OptionManager.addConfig (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:248:10)
at OptionManager.findConfigs (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:454:16)
at OptionManager.init (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/options/option-manager.js:502:12)
at File.initOptions (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:243:89)
at new File (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/file/index.js:159:72)
at Pipeline.transform (/usr/local/share/nylas/resources/app.asar/node_modules/babel-core/lib/transformation/pipeline.js:49:16)
at Object.exports.compile (/usr/local/share/nylas/resources/app.asar/src/compile-support/babel.js:50:16)
at compileFileAtPath (/usr/local/share/nylas/resources/app.asar/src/compile-cache.js:86:44)
at Object.defineProperty.value as .es6
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Package.module.exports.Package.requireMainModule (/usr/local/share/nylas/resources/app.asar/src/package.js:527:27)
at Package.module.exports.Package.activateConfig (/usr/local/share/nylas/resources/app.asar/src/package.js:276:12)
at Package.module.exports.Package.activateNow (/usr/local/share/nylas/resources/app.asar/src/package.js:255:14)
at /usr/local/share/nylas/resources/app.asar/src/package.js:245:26
at Package.module.exports.Package.measure (/usr/local/share/nylas/resources/app.asar/src/package.js:165:15)
at Package.module.exports.Package.activate (/usr/local/share/nylas/resources/app.asar/src/package.js:242:14)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/local/share/nylas/resources/app.asar/src/package-manager.js:560:21)
at /usr/local/share/nylas/resources/app.asar/src/package-manager.js:419:19
at /usr/local/share/nylas/resources/app.asar/src/config.js:287:20
at Function.module.exports.Emitter.simpleDispatch (/usr/local/share/nylas/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/usr/local/share/nylas/resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
at Config.module.exports.Config.emitChangeEvent (/usr/local/share/nylas/resources/app.asar/src/config.js:399:29)
at Config.module.exports.Config.updateSettings (/usr/local/share/nylas/resources/app.asar/src/config.js:256:19)
at Config.updateSettings (/usr/local/share/nylas/resources/app.asar/src/config.js:3:61)
at Config.module.exports.Config.load (/usr/local/share/nylas/resources/app.asar/src/config.js:108:19)
at Config.module.exports.Config.setRawValue (/usr/local/share/nylas/resources/app.asar/src/config.js:413:19)
at Config.module.exports.Config.set (/usr/local/share/nylas/resources/app.asar/src/config.js:159:12)
at Config.module.exports.Config.removeAtKeyPath (/usr/local/share/nylas/resources/app.asar/src/config.js:216:12)
at Package.module.exports.Package.enable (/usr/local/share/nylas/resources/app.asar/src/package.js:150:30)
at PackageManager.module.exports.PackageManager.enablePackage (/usr/local/share/nylas/resources/app.asar/src/package-manager.js:147:14)
at Store.listenTo.pkg (/usr/local/share/nylas/resources/app.asar/internal_packages/plugins/lib/packages-store.js:98:27)
at EventEmitter.eventHandler (/usr/local/share/nylas/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)
at EventEmitter.emit (/usr/local/share/nylas/resources/app.asar/node_modules/reflux/node_modules/eventemitter3/index.js:72:35)
at Function.module.exports.trigger (/usr/local/share/nylas/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)
at Object.functor as enablePackage
at Package._onEnablePackage (/usr/local/share/nylas/resources/app.asar/internal_packages/plugins/lib/package.js:26:32)
at Object.invokeGuardedCallback (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactErrorUtils.js:26:12)
at executeDispatch (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/EventPluginUtils.js:87:21)
at Object.executeDispatchesInOrder (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/EventPluginUtils.js:110:5)
at executeDispatchesAndRelease (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/EventPluginHub.js:42:22)
at executeDispatchesAndReleaseTopLevel (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/EventPluginHub.js:53:10)
at Array.forEach (native)
at forEachAccumulated (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/forEachAccumulated.js:24:9)
at Object.EventPluginHub.processEventQueue (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/EventPluginHub.js:215:7)
at runEventQueueInBatch (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactEventEmitterMixin.js:18:18)
at Object.ReactEventEmitterMixin.handleTopLevel as _handleTopLevel
at handleTopLevelImpl (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactEventListener.js:73:24)
at ReactDefaultBatchingStrategyTransaction.Mixin.perform (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/Transaction.js:136:20)
at Object.ReactDefaultBatchingStrategy.batchedUpdates (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactDefaultBatchingStrategy.js:63:19)
at Object.batchedUpdates (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactUpdates.js:97:20)
at ReactEventListener.dispatchEvent (/usr/local/share/nylas/resources/app.asar/node_modules/react/lib/ReactEventListener.js:150:20)This is on Fedora Linux 23. Tried running npm install --production on the
plugin but this doesn't help. Any pointers?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#15
from cypher.
Thanks but this didn't help. It's still pointing to an issue with .babelrc
. As far as I can tell from the log it seems to be looking in the N1 packaged Babel but can't find this "transform-class-properties" plugin there.
from cypher.
Oh. Sorry, forgot about that. Delete the .babelrc file and restart N1.
On Thu, May 26, 2016 at 2:18 PM Artem Hluvchynskyi [email protected]
wrote:
Thanks but this didn't help. It's still pointing to an issue with .babelrc.
As far as I can tell from the log it seems to be looking in the N1 packaged
Babel but can't find this "transform-class-properties" plugin there.—
You are receiving this because you commented.Reply to this email directly or view it on GitHub
#15 (comment)
from cypher.
This did the trick. Thank you!
from cypher.
However I'm not able to decrypt an email (trying it on an encrypted Facebook notification). It asks me to select a key, I select it (the one exchanged with FB), then there's an error:
Logger.es6 [sm]:19 [DecryptionRequest] Error: channel closed
at ChildProcess.target.send (internal/child_process.js:523:16)
at WorkerFrontend.decrypt (worker-frontend.es6:36:17)
at tryCatcher (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/promise.js:505:31)
at Promise._settlePromiseAt (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/promise.js:581:18)
at Promise._settlePromises (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/share/nylas/resources/app.asar/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:534:15)
at processImmediate [as _immediateCallback] (timers.js:514:5)
Not sure if it's related though.
from cypher.
Is there any other ouput from before that message? Specifically a GPG error? What is the path of GPG on your computer?
You said your key showed up in the dialog box. Did it show a key in your keychain?
from cypher.
No errors before this one. Here's the console output in between retries:
[PGPStore] Told to retry decrypt Message {clientId: "<redacted>", pluginMetadata: Array[0], subject: "Encrypted Notification from Facebook [<redacted>]", to: Array[1], cc: Array[0]…}
Logger.es6 [sm]:19 [PGPStore] Attachments: 2
Logger.es6 [sm]:19 [PGPStore] Using file[1] = File {clientId: undefined, serverId: "<redacted>", accountId: "<redacted>", filename: "encrypted.asc", size: 5347…}
Logger.es6 [sm]:19 [DownloadWatcher] Read attachment from disk
GPG path is:
$ which gpg
/usr/bin/gpg
You said your key showed up in the dialog box. Did it show a key in your keychain?
It showed a fingerprint of a key in my keychain. I've also logged in to keybase.io in the plugin settings if this matters.
from cypher.
Hmm. In N1's developer console, what is the value of process.env.PATH
. I have a feeling an error occurred while launching.
from cypher.
process.env.PATH
"/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/ahluvchynskyi/workspace/go/bin:/home/ahluvchynskyi/.local/bin:/home/ahluvchynskyi/bin"
from cypher.
Encryption seems to be working fine though.
from cypher.
Hmm, this is odd. I've reset the N1 theme to default (from Berend) and now it's not throwing an error but hangs at "Waiting for GPG..." indefinitely after selecting the key.
from cypher.
That is probably because GPG failed or something. I should enhance the
logging, but I thought I did that already.
On Fri, May 27, 2016 at 4:07 AM Artem Hluvchynskyi [email protected]
wrote:
Hmm, this is odd. I've reset the N1 theme to default (from Berend) and now
it's not throwing an error but hangs at "Waiting for GPG..." indefinitely
after selecting the key.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#15 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABNTbYonoojGYF85Jp1hNd9WLm5VFKyzks5qFqYzgaJpZM4ImflW
.
from cypher.
What version of GPG do you have?
I have:
gpg (GnuPG) 2.1.12
libgcrypt 1.7.0
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
from cypher.
If you download the attachment and run gpg --decrypt encrypted.asc
, what do you get?
from cypher.
The code is failing somewhere in:
const deferred = Promise.defer();
const child = childProcess.spawn('gpg', ['--decrypt']);
child.stdout.on('data', (data) => stdout.push(data));
child.stderr.on('data', (data) => stderr.push(data));
child.on('close', (code) => {
// GPG throws code 2 when it cannot verify one-pass signature packet
// inside armored message
if (code !== 0 && code !== 2) {
return deferred.reject(new Error(`GPG decrypt failed with code ${code}`));
}
this.notify(null);
const elapsed = process.hrtime(startTime);
const output = Buffer.concat(stdout);
const error = Buffer.concat(stderr);
const literals = [output];
log(error.toString('utf8'));
deferred.resolve({ literals, elapsed });
});
child.stdin.write(armored);
child.stdin.end();
from cypher.
The default Fedora gnupg package provides this:
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
However there's also gnupg2 (with gpg2 exec):
$ gpg2 --version
gpg (GnuPG) 2.1.11
libgcrypt 1.6.4
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Both decrypt the email fine when used manually but interestingly gpg asks for the key's passphrase (as a console input), while gpg2 somehow doesn't.
from cypher.
Apparently the difference in asking for the passphrase is due to gpg-agent and Gnome's keyring actually using GPG v2, thus not requiring to re-enter it after automatically "unlocking" at login. But does it make a difference for cypher?
from cypher.
Okay, so that was it. I symlinked gpg2 into /usr/local/bin/gpg (which takes precedence in the PATH) and cypher is working fine. Sorry for this!
from cypher.
However it might strike other users, whose systems still rely on GPG v1 in the same way.
from cypher.
Hmm. I am going to rework the encryption engine to move in-process. Currently, it is multi-process to separate decryption from UI to lower security risks.
Though, I have had so many headaches with state tracking.
from cypher.
I will just make it store the value in the Nylas config. Thank you for your help debugging this!
from cypher.
Related Issues (15)
- v0.1.0
- missing prerequirements windows 7 HOT 6
- Where to start? HOT 12
- Error: Running apm HOT 11
- Can't see Keys – GPG Tools on OS X installed HOT 1
- Installation instructions HOT 6
- Decrypted non-ASCII chars aren't displayed properly HOT 1
- Plugin fails to start: Error: Couldn't find preset "es2015" relative to directory "/home/gableroux" HOT 2
- How to digitally sign an email HOT 2
- PGP/Inline support HOT 10
- Use Mailvelopes "keyserver" HOT 1
- S/MIME Support
- Need help? HOT 11
- License 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 cypher.