FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 640 forks source link

Unhandled rejection ERR_FEATURE_NOT_AVAILABLE_ON_PLATFORM (recursive watch) #1389

Closed Anonymous-BCFED closed 4 years ago

Anonymous-BCFED commented 4 years ago

I receive the following exception when running Ungit on my desktop Ubuntu 20.04 environment. This doesn't appear to actually break anything, so I guess it's a warning of a very noisy kind? Changes to the FS do seem to go unnoticed until you manually refresh, though.

$ ungit
## Ungit started ##

Took 499ms to start server.
stderr: Unhandled rejection TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
    at Object.watch (fs.js:1441:11)
    at /usr/lib/node_modules/ungit/source/git-api.js:69:28
    at tryCatcher (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._settlePromise (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:617:21)
    at Promise._settlePromise0 (/usr/lib/node_modules/ungit/node_modules/bluebird/js/release/promise.js:649:10)

Environment Info

$ ungit --version
1.5.7

$ node --version
v14.4.0

$ npm --version
6.14.5

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:        20.04
Codename:       focal

$ uname -srvmpio
Linux 5.4.0-37-generic #41-Ubuntu SMP Wed Jun 3 18:57:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
jung-kim commented 4 years ago

Ah yes.... so Ungit uses nodes fs.watch() and it is famously doesn't support linux and yes this is just a warning.

If I remember correctly, ungit will not be able to detect some of the file changes correctly when you see this message and relies on period automatic reload ungit does

SuddenGunter commented 4 years ago

same on arch linux worked fine before, but now it's broken. I haven't noticed which update broke ungit, maybe related to latest nodejs update?

❯ ungit --version
1.5.12

❯ node --version
v15.0.1

❯ npm --version

6.14.7

❯ lsb_release -a

LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:    rolling
Codename:   n/a

❯ uname -srvmpio
Linux 5.9.1-arch1-1 #1 SMP PREEMPT Sat, 17 Oct 2020 13:30:37 +0000 x86_64 unknown unknown GNU/Linux

This doesn't appear to actually break anything|

For me it breaks ungit on any git repo completely. Can open folder which is not git repo, but if .git folder exists - ungit crashes :c

Took 309ms to start server.
Navigate to http://localhost:8448/#/repository?path=%2Fhome%2Fgunter%2FProjects%2Fevg%2Fevg.test.bidding
2020-10-26T11:27:31.436Z - error: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
    at new NodeError (node:internal/errors:258:15)
    at watch (node:fs:1525:11)
    at /home/gunter/.npm-global/lib/node_modules/ungit/source/git-api.js:73:25
Stopped keeping ungit alive