apcshields / autocomplete-bibtex

Adds Pandoc-style BibTeX citation key autocompletion to autocomplete+ for Atom.
MIT License
44 stars 17 forks source link

Failed to activate the autocomplete-bibtex package #99

Open fbroeren opened 6 years ago

fbroeren commented 6 years ago

I'm getting this error as soon as I open Atom. The file does exist and the error persists when I change the path to start with a tilde.

Atom: 1.24.0 x64 Electron: 1.6.16 OS: Ubuntu 17.10 Thrown From: autocomplete-bibtex package 1.2.0

Stack Trace

Failed to activate the autocomplete-bibtex package

At watch /home/fbroeren/Documents/Bibtex/library.bib ENOSPC

Error: watch /home/fbroeren/Documents/Bibtex/library.bib ENOSPC
    at exports._errnoException (util.js:1022:11)
    at FSWatcher.start (fs.js:1316:19)
    at Object.fs.watch (fs.js:1341:11)
    at BibtexReader.watchFile (/packages/autocomplete-bibtex/lib/abstract-reader.js:81:21)
    at BibtexReader.AbstractReader (/packages/autocomplete-bibtex/lib/abstract-reader.js:33:10)
    at /packages/autocomplete-bibtex/lib/bibtex-reader.js:10:34)
    at ReferenceProvider.registerReferenceFiles (/packages/autocomplete-bibtex/lib/provider.js:183:32)
    at ReferenceProvider.reload (/packages/autocomplete-bibtex/lib/provider.js:57:10)
    at /packages/autocomplete-bibtex/lib/provider.js:87:10)
    at Object.activate (/packages/autocomplete-bibtex/lib/main.js:57:21)
    at Package.activateNow (/usr/share/atom/resources/app/src/package.js:230:33)
    at measure (/usr/share/atom/resources/app/src/package.js:206:33)
    at Package.measure (/usr/share/atom/resources/app/src/package.js:88:25)
    at activationPromise.Promise (/usr/share/atom/resources/app/src/package.js:200:20)
    at Package.activate (/usr/share/atom/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (/usr/share/atom/resources/app/src/package-manager.js:670:36)
    at Config.module.exports.Config.transactAsync (/usr/share/atom/resources/app/src/config.js:367:24)
    at PackageManager.activatePackages (/usr/share/atom/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (/usr/share/atom/resources/app/src/package-manager.js:647:50)
    at loadStatePromise.loadState.then (/usr/share/atom/resources/app/src/atom-environment.js:841:27)

Commands

Non-Core Packages

autocomplete-bibtex 1.2.0 
autocomplete-paths 2.12.2 
autocomplete-python 1.10.5 
busy-signal 1.4.3 
ex-mode 0.18.0 
Hydrogen 2.2.3 
intentions 1.1.5 
language-latex 1.1.1 
latex 0.49.0 
latex-plus 0.9.1 
latextools 0.8.5 
linter 2.2.0 
linter-flake8 2.3.0 
linter-spell 0.15.0 
linter-spell-latex 0.11.0 
linter-ui-default 1.6.10 
markdown-preview-plus 2.5.5 
pdf-view 0.65.0 
vim-mode-plus 1.29.0 
wordcount 2.10.4 
mangecoeur commented 6 years ago

Do you see this after a fresh reboot? ENOSPC refers to there being too many watched files, so possibly the file tracking is is not being correctly cleaned up. Would you mind disabling other packages and see if you still get the error? (in case it is some interaction between autocomplete bibtex and other packages)?

fbroeren commented 6 years ago

I just disabled all packages apart from markdown-preview-plus and autocomplete-bibtex but the error is still there. I restarted atom and checked that all processes called atom were closed.

mangecoeur commented 6 years ago

Ok I will have a look when I can, it might take a while before I can get round to it i'm afraid :( Most likely due to too many file watches (it can also be if you are low on disk space, but i assume you are not). No idea why though, might be a linux-specific bug.

There may be a workaround by changing the max watches for nodejs, something like $ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p (although whether this will work for Atom's embedded node i do not know).

fbroeren commented 6 years ago

Thank you, the workaround did the job! I now enabled all packages again and bibtex autocompletion works as before.