nextcloud / logreader

📜 Log reader for Nextcloud
56 stars 27 forks source link

Error opening log in 24 #699

Closed nickvergessen closed 2 days ago

nickvergessen commented 2 years ago

Steps to reproduce

  1. Open log in a 24 instance
  2. See log for some milliseconds
  3. See log disappearing

Expected behaviour

Log is visible

Actual behaviour

Error: Minified React error #188; visit https://reactjs.org/docs/error-decoder.html?invariant=188 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    findDOMNode React
    transition CSSTransitionGroupChild.js:129
    componentWillEnter CSSTransitionGroupChild.js:97
    performEnter TransitionGroup.js:83
    componentDidUpdate TransitionGroup.js:192
    componentDidUpdate TransitionGroup.js:191
    React 2
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 6
    mt App.js:160
    emit events.js:153
    e LogProvider.js:466
    c runtime.js:63
    _invoke runtime.js:294
    w runtime.js:119
    Babel 6
    value LogProvider.js:484
    e App.js:212
    c runtime.js:63
    _invoke runtime.js:294
    w runtime.js:119
    Babel 14
    value App.js:229
    React 2
    unstable_runWithPriority scheduler.production.min.js:18
    React 9
    _t index.js:17
    _t index.js:28
    <anonymous> index.js:23
    <anonymous> index.js:23
    <anonymous> index.js:23
react-dom.production.min.js:216:199
nickvergessen commented 2 years ago

Still happening btw

arnowelzel commented 2 years ago

Also see #719 - the behaviour is similar but caused by log files which are too big.

rotdrop commented 2 years ago

From reading here

https://github.com/facebook/react/issues/20131 pointing to https://reactjs.org/warnings/invalid-hook-call-warning.html

and running

 $ npm ls react-dom
logreader@ /var/www/localhost/htdocs/nextcloud-git-next/apps/logreader
├─┬ react-addons-css-transition-group@15.6.2
│ └─┬ react-transition-group@1.2.1
│   └── react-dom@16.14.0
└── react-dom@17.0.2

I somehow got the impression that this might be caused by pulling in multiple copies of react-dom?

CarlSchwan commented 2 years ago

We might want to replace this react addon's since it's dead https://www.npmjs.com/package/react-addons-css-transition-group

nickvergessen commented 2 years ago

Or someone makes a greater journey and moves it to vue if that is better?

Valdnet commented 2 years ago

Any news?

The bug is a bit of a pain in the ass 😬.

wiswedel commented 2 years ago

still no logs in 24.0.3 :-(

arnowelzel commented 2 years ago

The reason is the amount of log data. If you delete the old log data/nextcloud.log you should be able to see new log entries again. However if the file contains more than about 20.000 entries, the log viewer seems to get a problem.

victoraroyo commented 2 years ago

I too have this from a few nextcloud versions and I'm not so sure it is the 20000 entries limit/problem. Even with empty/clean log file mine does not shows. And the error in the console is the react one pointed above.

rotdrop commented 2 years ago

I too have this from a few nextcloud versions and I'm not so sure it is the 20000 entries limit/problem. Even with empty/clean log file mine does not shows. And the error in the console is the react one pointed above.

You could look at my merge request #746 and see whether it works for you. The bugfix just replaces the outdated react library with the current one and adjust the corresponding API calls in order to make it work. So this is a kind of minimal approach (no porting to Vue etc. attempted, just update the outdated react library).

victoraroyo commented 2 years ago

Thanks, I'm doing it now. After reading about this in react discussions I guess it will work. Hope this will be in next releases till waiting for vue solution.

Antreesy commented 2 days ago

Last version of Logreader written in react is Nextcloud 27.1.11 (End of life was at 2024-06-25)