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 CodiMD error (since 1.4.0?)

    HedgeDoc
    codimd
    4
    21
    1309
    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.
    • yusf
      yusf last edited by girish

      I'm getting Internal Server Error whenever I try to view/edit a CodiMD document. I notice that the app was updated 1.4.0 recently, which seem to coincide with this issue. Please advice.

      Here's the log output of the error:

      Jun 10 07:45:00 2019-06-10T07:45:00.329Z info: deserializeUser: 113677e7-8064-499a-90ba-11d6511808f6
      Jun 10 07:45:00 SyntaxError: /app/code/public/views/codimd.ejs:10
      Jun 10 07:45:00 8| <body>
      Jun 10 07:45:00 9| <%- include codimd/header %>
      Jun 10 07:45:00 >> 10| <%- include codimd/body %>
      Jun 10 07:45:00 11| <%- include codimd/footer %>
      Jun 10 07:45:00 12| <%- include codimd/foot %>
      Jun 10 07:45:00 13| </body>
      Jun 10 07:45:00
      Jun 10 07:45:00 /app/code/public/views/codimd/body.ejs:251
      Jun 10 07:45:00 249| <%- include ../shared/refresh-modal %>
      Jun 10 07:45:00 250| <%- include ../shared/signin-modal %>
      Jun 10 07:45:00 >> 251| <%- include ../shared/help-modal %>
      Jun 10 07:45:00 252| <%- include ../shared/revision-modal %>
      Jun 10 07:45:00 253|
      Jun 10 07:45:00
      Jun 10 07:45:00 /app/code/public/views/shared/help-modal.ejs:20
      Jun 10 07:45:00 18| <a href="https://community.codimd.org" target="_blank"><i class="fa fa-users fa-fw"></i> <%= __('Join the community') %></a>
      Jun 10 07:45:00 19| <br>
      Jun 10 07:45:00 >> 20| <a href="https://riot.im/app/#/room/#codimd:matrix.org" target="_blank"><i class="fa fa-hashtag fa-fw"></i> <%= __('Meet us on %s', 'Matrix') %></a>
      Jun 10 07:45:00 21| <br>
      Jun 10 07:45:00 22| <a href="https://github.com/codimd/server/issues" target="_blank"><i class="fa fa-tag fa-fw"></i> <%= __('Report an issue') %></a>
      Jun 10 07:45:00 23| <br>
      Jun 10 07:45:00
      Jun 10 07:45:00 [sprintf] unexpected placeholder
      Jun 10 07:45:00 at sprintf_parse (/app/code/node_modules/sprintf-js/src/sprintf.js:202:23)
      Jun 10 07:45:00 at sprintf (/app/code/node_modules/sprintf-js/src/sprintf.js:26:31)
      Jun 10 07:45:00 at vsprintf (/app/code/node_modules/sprintf-js/src/sprintf.js:30:24)
      Jun 10 07:45:00 at postProcess (/app/code/node_modules/i18n/i18n.js:547:13)
      Jun 10 07:45:00 at Object.i18nTranslate (/app/code/node_modules/i18n/i18n.js:234:12)
      Jun 10 07:45:00 at eval (eval at compile (/app/code/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:609:26)
      Jun 10 07:45:00 at eval (eval at compile (/app/code/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:723:10)
      Jun 10 07:45:00 at eval (eval at compile (/app/code/node_modules/ejs/lib/ejs.js:618:12), <anonymous>:754:10)
      Jun 10 07:45:00 at returnedFn (/app/code/node_modules/ejs/lib/ejs.js:653:17)
      Jun 10 07:45:00 at tryHandleCache (/app/code/node_modules/ejs/lib/ejs.js:251:36)
      Jun 10 07:45:00 at View.exports.renderFile [as engine] (/app/code/node_modules/ejs/lib/ejs.js:482:10)
      Jun 10 07:45:00 at View.render (/app/code/node_modules/express/lib/view.js:135:8)
      Jun 10 07:45:00 at tryRender (/app/code/node_modules/express/lib/application.js:640:10)
      Jun 10 07:45:00 at Function.render (/app/code/node_modules/express/lib/application.js:592:3)
      Jun 10 07:45:00 at ServerResponse.render (/app/code/node_modules/express/lib/response.js:1012:7)
      Jun 10 07:45:00 at responseCodiMD (/app/code/lib/response.js:104:7)
      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        This looks like one of the built-in templates fails. Did you by any chance added/removed/adjusted values in /app/data/config.json?

        The default values are:

        {
          "production": {
            "allowAnonymous": false,
            "allowAnonymousEdits": false,
            "allowEmailRegister": false,
            "allowFreeUrl": true,
            "allowPdfExport": false,
            "debug": false,
            "defaultPermission": "private",
            "email": false,
            "sessionSecret": "<secret>"
          }
        }
        
        1 Reply Last reply Reply Quote 0
        • yusf
          yusf last edited by yusf

          Possibly. Iโ€™d need to check. To complicate things, it still works on mobile currently.

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

            What differs in my config is
            allowAnonymousEdits": true instead of false
            documentmaxlength": 1000000 instead of whatever default is.

            Default settings makes no difference, neither a fresh install.

            The published read-pnly version of a doc works, still. It's the editor view that crashes.

            I've tried in Firefox (macOS), Safari (macOS) and Safari (iOS).

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

              @yusf said in CodiMD error (since 1.4.0?):

              allowAnonymousEdits": true

              I have this set to true as well and for me the app continues to work after the 1.4.0 update.

              @yusf said in CodiMD error (since 1.4.0?):

              Default settings makes no difference, neither a fresh install.

              So do I understand that right that even if you install the app completely new you still have the crashes of the editor? Did you reinstall to the same domain? I would use a new domain name just to rule out a caching issue (and also try to open the editor in incognito mode).

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

                @fbartels said in CodiMD error (since 1.4.0?):

                So do I understand that right that even if you install the app completely new you still have the crashes of the editor? Did you reinstall to the same domain? I would use a new domain name just to rule out a caching issue (and also try to open the editor in incognito mode).

                Yes. New domain, fresh browser session, still Internal Server Error.

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

                  @fbartels Do you have any other customizations?

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

                    @yusf just to be on the same page, you are installing codimd from your Cloudron's appstore view, not building the app on your own or so?

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

                      @nebulon Correct, itโ€™s the regular App Store version.

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

                        Please advice ๐Ÿ™‡

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

                          @yusf sorry don't know enough about node and codimd development to give any additional insight. Maybe the codimd issue tracker in GitHub would be able to give more insights?

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

                            @fbartels Thanks, I'll bring it up with them.

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

                              Huh. "Them" turned out to be confusing:

                              Currently, there are two active repositories/softwares named "CodiMD": This one and codimd/server. Both are actively maintained, but by different people. Especially for someone new to CodiMD/HackMD it's almost impossible to understand what's what.

                              From reading other issues it seems like HackMD is making some structural changes which prompts Cloudron to make a choice which project to use. codimd/server is the "libre" and AGPL continuation of the project so probably favorable.

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

                                @yusf Does this error happens only when opening a specific document or all the time? Not really sure how to debug this, can you ping me on chat?

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

                                  @girish I got help in tracking the issue down. A typo in the language file for my specific language caused the error. Not sure when I get a fix for it though. Iโ€™ll probably build it manually with the fix for now.

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

                                    @yusf Is there a related github issue ?

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

                                      @girish https://github.com/codimd/server/issues/117

                                      1 Reply Last reply Reply Quote 1
                                      • yusf
                                        yusf last edited by

                                        Can you make a new release? @girish

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

                                          Yes, but 1.4.1 isn't released yet.

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

                                            @girish Oh, okay then! ๐Ÿ˜Š

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

                                              CodiMD was updated to 1.5.0. So this issue is most likely fixed there.

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