Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Debugging mode is automatically switched off

Scheduled Pinned Locked Moved Solved Nextcloud
9 Posts 2 Posters 92 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    warg
    wrote on last edited by warg
    #1

    Hello,

    I added the line 'debug' => true, to my config.php file. After saving and restarting the app, the line is kept but it is changed to false instead of true. According to the docs and according to Nextcloud docs, this should work. I'm on NextCloud 27.0.2. Is this some bug in Cloudron? I need this to debug an issue with the Recognize app. For some reason the download of the trained models is broken.

    Best Regards,

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #2

    Right, on package restart the debug value is overwritten to false. I have removed this from the package. Next release should fix it.

    1 Reply Last reply
    1
  • W Offline
    W Offline
    warg
    wrote on last edited by
    #3

    @girish Can you publish the new version of the app please? Then I can check why the download of the models for the Recognize app doesn't work. I think it might be related to some path being read-only.

    1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #4

    @warg published

    1 Reply Last reply
    1
  • W Offline
    W Offline
    warg
    wrote on last edited by warg
    #5

    Could it be that the logging of Nextcloud is just broken within Cloudron? I just noticed and tried a few things but at the end, I don't get any PHP warnings or errors; neither in the container's log nor in the /data/nextcloud.log file. Even what I try might not throw any critical errors or warnings, I bet other stuff would throw some as Nextcloud is quite complex.

    What I tried to make debugging work:

    • add 'debug' => true, as third line of config (first line of the array)
    • changed 'loglevel' => '3', to zero (should be documented that Cloudron has a different default value for it than the standard NextCloud documentation mentions)
    • didn't change much, so I also changed 'logfile' => '/dev/stderr', to //'logfile' => '/dev/stderr', (but it looks like it got reverted?! -> maybe this is the cause why the file /data/nextcloud.log doesn't get updated; last update is 4 month ago; was this changed?)

    So basically I don't get the issue debugged because the debugging is not working.

    EDIT: For some reason I get Aug 19 19:25:31 {"reqId":"Wg5Sh91vaYVjy6qvqFIW","level":3,"time":"2023-08-19T17:25:31+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(/dev/stderr): Failed to open stream: No such file or directory at /app/code/lib/private/Log/File.php#84","userAgent":"--","version":"27.0.2.1","data":{"app":"PHP"}} errors now (I had protocol view of NextCloud open but not at that moment so either it comes from elsewhere or the log is quite delayed). I will have to check this later.

    girishG 1 Reply Last reply
    0
  • W warg marked this topic as a question on
  • girishG Offline
    girishG Offline
    girish Staff
    replied to warg on last edited by
    #6

    @warg said in Debugging mode is automatically switched off:

    didn't change much, so I also changed 'logfile' => '/dev/stderr', to //'logfile' => '/dev/stderr', (but it looks like it got reverted?! -> maybe this is the cause why the file /data/nextcloud.log doesn't get updated; last update is 4 month ago; was this changed?)

    yes, correct, we always configure log to stdout/stderr whenever possible. This is one thing we picked form 12 factor app design - https://12factor.net/logs

    1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    wrote on last edited by
    #7

    If you really want to debug with logging to file:

    • Place app in repair mode
    • Open web terminal and then start the app using /app/pkg/start.sh
    • Feel free to edit the config file as you see fit

    Note that this is only debugging mode. So, if you close the web terminal, the app is not running anymore.

    1 Reply Last reply
    1
  • W Offline
    W Offline
    warg
    wrote on last edited by warg
    #8

    Thanks for the feedback although it's still open why there's a 4 month old logfile if logging was ever done to /dev/stderr.

    Anyway, in the meantime I opened a GitHub issue at their repository and we found further indications what is wrong. I'm awaiting feedback from the dev to see why this should be a general write issue with my NextCloud instance when uploading and editing files works.

    1 Reply Last reply
    1
  • W Offline
    W Offline
    warg
    wrote last edited by
    #9

    Whatever caused this, either a Cloudron update or some self-solving stuck/bug in NextCloud fixed it. It works now.

    1 Reply Last reply
    1
  • girishG girish has marked this topic as solved

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.