mage2tv / magento-cache-clean

A faster drop in replacement for bin/magento cache:clean with file watcher
BSD 3-Clause "New" or "Revised" License
528 stars 61 forks source link

Cache clean watch crashes more often than not #27

Closed amenk closed 5 years ago

amenk commented 5 years ago

Not yet fully reproducible...

Do you know anything about that?

For example it seems to happen when deleting lots of files, moving stuff around and/or composer reinstalling ...

Vinai commented 5 years ago

Interesting, thanks for the report. This is not something I've experienced. Can you please give me more details, such as the OS you are using and the node version (node -v).

Thanks!

amenk commented 5 years ago
$ node -v
v8.10.0
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
Vinai commented 5 years ago

Thank you. Is there a stacktrace when the program crashes? If so, could you add that to this post please?

amenk commented 5 years ago
/usr/bin/node /home/amk/.composer/vendor/bin/cache-clean.js -w
Sponsored by https://www.mage2.tv

Hot-keys for manual cache cleaning:
[c]onfig [b]lock_html [l]ayout [t]ranslate [f]ull_page [v]iew [a]ll

Hot-keys for cleaning static content areas:
[F]rontend [A]dminhtml

Watcher initialized (Ctrl-C to quit)
/home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:289
function Sf(a){a:for(var b=a;;)if(b=M(b))b=F(b);else break a;return a}function Tf(a,b){if("string"===typeof b)return a=a.exec(b),null==a?null:1===R(a)?E(a):Pe(a);throw new TypeError("re-find must match against a string.");}
                                                                                                                                                              ^

TypeError: re-find must match against a string.
    at Tf (/home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:289:169)
    at sk (/home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:396:125)
    at /home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:397:101
    at d (/home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:322:135)
    at FSWatcher.<anonymous> (/home/amk/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:321:138)
    at emitTwo (events.js:126:13)
    at FSWatcher.emit (events.js:214:7)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1364:12)

Process finished with exit code 1

Happend when switchting to a quite outdated branch

Vinai commented 5 years ago

Thanks, that's helpful!

Vinai commented 5 years ago

I've released 0.0.33 which guards against non-string file names in case of the removal of a whole directory tree under inotify Linux. Please let me know if this helps.

amenk commented 5 years ago

Okay, will check

Vinai commented 5 years ago

Any difference?

amenk commented 5 years ago

No more crashes so far. Thank you

Vinai commented 5 years ago

Great! Let me know if that changes somehow.