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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved hackmd - Read-Only file system when exporting to PDF

    HedgeDoc
    5
    18
    658
    Loading More Posts
    • 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.
    • rmdes
      rmdes last edited by rmdes

      I had to export a codiMD markdown document into PDF and got this error so I was wondering If I can't specify the export path to another place or if this require a package update ?

      Oct 18 18:06:34 2020-10-18T22:06:34.009Z - error: uncaughtException: EROFS: read-only file system, open '/hackmd/tmp/1603058793964.pdf' date=Sun Oct 18 2020 22:06:34 GMT+0000 (UTC), pid=10, uid=1000, gid=1000, cwd=/hackmd, execPath=/usr/local/node-6.9.5/bin/node, version=v6.9.5, argv=[/usr/local/node-6.9.5/bin/node, /hackmd/app.js], rss=94670848, heapTotal=63012864, heapUsed=55211592, loadavg=[2.4560546875, 2.7568359375, 4.48828125], uptime=1502408, trace=[column=null, file=null, function=Error, line=null, method=null, native=true], stack=[Error: EROFS: read-only file system, open '/hackmd/tmp/1603058793964.pdf', at Error (native)]
      Oct 18 18:06:34 2020-10-18T22:06:34.010Z - error: An uncaught exception has occured.
      Oct 18 18:06:34 2020-10-18T22:06:34.010Z - error: Error: EROFS: read-only file system, open '/hackmd/tmp/1603058793964.pdf'
      Oct 18 18:06:34 at Error (native)
      Oct 18 18:06:34 2020-10-18T22:06:34.011Z - error: Process will exit now.

      1 Reply Last reply Reply Quote 0
      • robi
        robi last edited by

        looks like the problem is /hackmd prefixing /tmp

        Life of Advanced Technology

        1 Reply Last reply Reply Quote 0
        • nebulon
          nebulon Staff last edited by

          Looks like a packaging bug, trying to reproduce this but for some reason I cannot find any kind of pdf export. Do I need to change something in the configs to support that?

          fbartels 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels App Dev @nebulon last edited by fbartels

            @nebulon pdf export was disabled per default a while ago. Therefore you need to enable it manually https://github.com/codimd/server/blob/a160d81fe33044ca8fbb71addd77c40d55b37251/docs/configuration.md#codimd-basics

            Commit disabling it: https://github.com/codimd/server/commit/c1789474020a6d668d616464cb2da5e90e123f65

            1 Reply Last reply Reply Quote 1
            • nebulon
              nebulon Staff last edited by

              Thanks for the info, so from the code it looks like it makes no sense to have it currently enabled? I guess we can revisit this path issue once upstream has fixed this (and then maybe even fixed the path building)

              1 Reply Last reply Reply Quote 1
              • girish
                girish Staff last edited by girish

                @rmdes said in Read-Only file system when exporting to PDF:

                tmp

                I see this - https://github.com/codimd/server/blob/3461993ee05d09106e276e606b143d472908b166/lib/config/index.js#L212

                Can you set tmpPath to /tmp in your config ?

                rmdes 1 Reply Last reply Reply Quote 0
                • rmdes
                  rmdes @girish last edited by rmdes

                  @girish I tried but I may confused I can't find the config for the app ??
                  if I do cp config.json.example config.json I get :
                  cp: cannot create regular file 'config.json': Read-only file system
                  if I go to parent direction, I see the linux tree, I'm confused

                  fbartels 1 Reply Last reply Reply Quote 0
                  • fbartels
                    fbartels App Dev @rmdes last edited by

                    @rmdes you have to edit /app/data/config.json

                    rmdes 1 Reply Last reply Reply Quote 0
                    • rmdes
                      rmdes @fbartels last edited by

                      @fbartels Thats the thing, I don't have any config.json there, I see a build and upload and build directory, if I try to edit the only config.json.example I see at the root hackmd directory it say I cant edit in a read-only filesystem..

                      I'm wondering if this is because the first time I installed this app was a custom build app that I then upgraded to the official cloudron build release..

                      fbartels 1 Reply Last reply Reply Quote 0
                      • fbartels
                        fbartels App Dev @rmdes last edited by fbartels

                        @rmdes that is strange. because the startup script creates this file if it does not exist.

                        Can you post the output of cat /app/code/start.sh?

                        Which version does Cloudron say you have installed? (mine is v1.10.0-1)

                        rmdes 2 Replies Last reply Reply Quote 0
                        • rmdes
                          rmdes @fbartels last edited by

                          @fbartels I'm on v5.6.3
                          I don't have a code/start.sh in the first place, I don't have a code directory.

                          fbartels 1 Reply Last reply Reply Quote 0
                          • rmdes
                            rmdes @fbartels last edited by

                            @fbartels installing now codiMD on another domain, will compare the two apps

                            1 Reply Last reply Reply Quote 0
                            • fbartels
                              fbartels App Dev @rmdes last edited by

                              @rmdes said in Read-Only file system when exporting to PDF:

                              I'm on v5.6.3

                              I was asking about the version of the app, not cloudron itself. In the Cloudron web ui u can click on the "info" button that becomes visible when hovering with the mouse over the Codimd icon.

                              1 Reply Last reply Reply Quote 0
                              • rmdes
                                rmdes last edited by

                                Oh sorry, the one I just installed is Package v1.10.0-1
                                App v1.6.0

                                the one coming from the time this app was called HackMD is Package v0.0.2
                                does not give more details than this..
                                I think I will backup this old app, install CodiMD fresh and restore backup, not sure it will work

                                1 Reply Last reply Reply Quote 0
                                • nebulon
                                  nebulon Staff last edited by

                                  Looks like you have installed and used ever since a version which was not yet published to the app library as stable or even installed it manually via cli.

                                  rmdes 1 Reply Last reply Reply Quote 0
                                  • rmdes
                                    rmdes @nebulon last edited by rmdes

                                    @nebulon Correct this was installed via cli at least 2 years ago, at some point there was an upgrade to the package and that was it, it stopped to evolve because the move to CodiMD
                                    since then we have used it without issue, other than PDF exporting now working.

                                    Now that I have installed CodiMD, I went to the defauld config.json file and enabled PDFexport to True, I'm not seeing PDF in the export choice but that's maybe another issue ?
                                    Screenshot_20201022_064556.jpg

                                    1 Reply Last reply Reply Quote 0
                                    • rmdes
                                      rmdes last edited by rmdes

                                      This is what I see in the dropdown menu when trying to export with PDF enabled to true in the config.json file, I restart the app after making the change to config.json
                                      abeff29e-e69f-4dde-b9c3-b1319ebd2f7a-image.png

                                      1 Reply Last reply Reply Quote 0
                                      • rmdes
                                        rmdes last edited by

                                        I think we can close this since it's irrelevant to the actual codiMD app in the store 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Powered by NodeBB