Closed SamaelChen closed 7 years ago
+1 for Windows 10 x64 running atom 1.14.1x64
I'm quite shocked because it looks like my autocompletion sends some kind of metrics somewhere about what I autocomplete(?). Even when I disable the "cloud powered autocomplete engine" the code path to telemetry/metrics.js
is hit. I have atom telemetry collection disabled in my core settings and I would expect this package to respect that setting.
Had similar problem since last 2 updates on Linux steps to reproduce:
Atom: 1.14.1 x64 Electron: 1.3.13 OS: Linux Mint Thrown From: autocomplete-python package 1.8.50
Uncaught TypeError: crypto.randomBytes is not a function
At /home/marc/.atom/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:26
TypeError: crypto.randomBytes is not a function
at distinctID (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:26:32)
at track (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:35:18)
at Object.trackEvent (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:59:5)
at Object.track (/packages/autocomplete-python/lib/main.coffee:371:21)
at Object.trackUsedSuggestion (/packages/autocomplete-python/lib/main.coffee:361:12)
at AutocompleteManager.autocompleteManager.confirm (/packages/autocomplete-python/lib/main.coffee:286:10)
at /app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:254:16
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at SuggestionList.confirm (/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:135:27)
at /app.asar/node_modules/autocomplete-plus/lib/suggestion-list-element.js:326:27)
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at SuggestionList.confirmSelection (/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:140:27)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
at /app.asar/src/window-event-handler.js:3:59)
2x -3:06.6.0 autocomplete-plus:confirm (input.hidden-input)
-2:09.1.0 settings-view:uninstall-packages (a.)
-0:07.4.0 autocomplete-plus:activate (input.hidden-input)
-0:05.9.0 autocomplete-plus:confirm (input.hidden-input)
autocomplete-python 1.8.50
formatter 2.12.3
hyperclick 0.0.40
[Enter steps to reproduce:]
Exactly as Pyrestone commented above
Atom: 1.14.1 x64 Electron: 1.3.13 OS: elementary OS (Ubuntu 16.04) Thrown From: autocomplete-python package 1.8.50
Uncaught TypeError: crypto.randomBytes is not a function
At /home/daniel/.atom/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:26
TypeError: crypto.randomBytes is not a function
at distinctID (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:26:32)
at track (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:35:18)
at Object.trackEvent (/packages/autocomplete-python/node_modules/kite-installer/ext/telemetry/metrics.js:59:5)
at Object.track (/packages/autocomplete-python/lib/main.coffee:371:21)
at Object.trackUsedSuggestion (/packages/autocomplete-python/lib/main.coffee:361:12)
at AutocompleteManager.autocompleteManager.confirm (/packages/autocomplete-python/lib/main.coffee:286:10)
at /app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:254:16
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at SuggestionList.confirm (/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:135:27)
at /app.asar/node_modules/autocomplete-plus/lib/suggestion-list-element.js:326:27)
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
at SuggestionList.confirmSelection (/app.asar/node_modules/autocomplete-plus/lib/suggestion-list.js:140:27)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
at /app.asar/src/window-event-handler.js:3:59)
-2:23.7.0 core:move-right (input.hidden-input)
4x -2:21.6.0 editor:move-to-beginning-of-word (input.hidden-input)
-2:18.3.0 editor:select-to-beginning-of-word (input.hidden-input)
-2:16.4.0 editor:move-to-end-of-word (input.hidden-input)
-2:15.8.0 editor:select-to-end-of-word (input.hidden-input)
-2:14.1.0 editor:move-to-end-of-word (input.hidden-input)
3x -2:13.7.0 core:move-right (input.hidden-input)
-2:12.2.0 editor:newline (input.hidden-input)
2x -2:03.8.0 core:move-right (input.hidden-input)
-2:00.0 core:save (input.hidden-input)
-1:43.8.0 core:move-right (input.hidden-input)
2x -1:43.4.0 core:select-left (input.hidden-input)
-1:39.2.0 autocomplete-plus:confirm (input.hidden-input)
-1:37.4.0 core:backspace (input.hidden-input)
3x -1:26.7.0 core:move-down (input.hidden-input)
-1:25.7.0 autocomplete-plus:confirm (input.hidden-input)
api-docs 0.0.6
atom-beautify 0.29.17
atom-clock 0.1.3
atom-django 0.3.2
atom-elixir 0.2.2
atom-jinja2 0.6.0
atom-material-syntax 1.0.2
atom-material-ui 1.3.9
autocomplete-elixir 1.5.14
autocomplete-python 1.8.50
browser-plus 0.0.87
file-icons 2.0.15
hyperclick 0.0.40
language-babel 2.54.1
language-elixir 0.17.0
linter 1.11.21
linter-csslint 1.3.3
linter-elixirc 1.1.11
linter-erlc 0.3.0
linter-htmlhint 1.3.1
linter-js-yaml 1.2.6
linter-jscs 4.1.1
linter-markdown 3.1.0
linter-pycodestyle 2.0.0
linter-scss-lint 3.0.4
linter-write-good 0.8.0
linter-xmllint 1.4.0
merge-conflicts 1.4.4
minimap 4.26.8
minimap-linter 1.6.0
minimap-pigments 0.2.2
minimap-split-diff 0.3.3
nucleus-dark-ui 0.10.22
pigments 0.39.0
script 3.14.1
split-diff 1.1.2
svg-preview 0.11.0
Add in you metrics.js file this line: var crypto = require('crypto');
Worked for me.
Should be fixed in v1.8.51. Very sorry about this.
I still had this issue on 1.8.63. I solved it by changing the metrics.js line
const crypto = require('crypto');
to
var crypto = require('crypto');
as above.
[Enter steps to reproduce below:]
Atom Version: 1.13.1 Electron Version: 1.3.13 System: Ubuntu 16.04.1 Thrown From: autocomplete-python package, v1.8.48
Stack Trace
Uncaught TypeError: crypto.randomBytes is not a function
Commands
Config
Installed Packages