linuxserver / docker-hedgedoc

GNU General Public License v3.0
42 stars 7 forks source link

Internal Server Error - SyntaxError: missing ) after argument list in /opt/hedgedoc/public/views/index.ejs while compiling ejs #13

Closed 825i closed 3 years ago

825i commented 3 years ago

linuxserver.io

Tried to open my hedgedoc instance today and got the following. External mapped URL and internal URL do not work and each gives their own error. All I did yesterday was create a few notes with tags.


Expected Behavior

The frontend should open

Current Behavior

I get "Internal server error"

Steps to Reproduce

https://hedgedoc.zeptinune.download

Environment

Unraid Docker

## Docker logs
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass `async: true` as an option.
at new Function (<anonymous>)
at Template.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:662:12)
at Object.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:396:16)
at handleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:233:18)
at tryHandleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:272:16)
at View.exports.renderFile [as engine] (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:489:10)
at View.render (/opt/hedgedoc/node_modules/express/lib/view.js:135:8)
at tryRender (/opt/hedgedoc/node_modules/express/lib/application.js:640:10)
at Function.render (/opt/hedgedoc/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/opt/hedgedoc/node_modules/express/lib/response.js:1012:7)
at showIndex (/opt/hedgedoc/lib/response.js:47:9)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/hedgedoc/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/opt/hedgedoc/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at /opt/hedgedoc/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/opt/hedgedoc/node_modules/express/lib/router/index.js:335:12)
at next (/opt/hedgedoc/node_modules/express/lib/router/index.js:275:10)
at Function.handle (/opt/hedgedoc/node_modules/express/lib/router/index.js:174:3)
at router (/opt/hedgedoc/node_modules/express/lib/router/index.js:47:12)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/opt/hedgedoc/node_modules/express/lib/router/index.js:317:13)
2021-05-05T10:49:50.409Z info: 172.19.0.1 - - [05/May/2021:10:49:50 +0000] "GET / HTTP/1.1" 500 148 "https://zeptinune.download/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"

SyntaxError: missing ) after argument list in /opt/hedgedoc/public/views/index.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:

https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass `async: true` as an option.
at new Function (<anonymous>)
at Template.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:662:12)
at Object.compile (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:396:16)
at handleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:233:18)
at tryHandleCache (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:272:16)
at View.exports.renderFile [as engine] (/opt/hedgedoc/node_modules/ejs/lib/ejs.js:489:10)
at View.render (/opt/hedgedoc/node_modules/express/lib/view.js:135:8)
at tryRender (/opt/hedgedoc/node_modules/express/lib/application.js:640:10)
at Function.render (/opt/hedgedoc/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/opt/hedgedoc/node_modules/express/lib/response.js:1012:7)
at showIndex (/opt/hedgedoc/lib/response.js:47:9)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/hedgedoc/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/opt/hedgedoc/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at /opt/hedgedoc/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/opt/hedgedoc/node_modules/express/lib/router/index.js:335:12)
at next (/opt/hedgedoc/node_modules/express/lib/router/index.js:275:10)
at Function.handle (/opt/hedgedoc/node_modules/express/lib/router/index.js:174:3)
at router (/opt/hedgedoc/node_modules/express/lib/router/index.js:47:12)
at Layer.handle [as handle_request] (/opt/hedgedoc/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/opt/hedgedoc/node_modules/express/lib/router/index.js:317:13)
2021-05-05T10:49:56.348Z info: 192.168.1.38 - - [05/May/2021:10:49:56 +0000] "GET / HTTP/1.1" 500 148 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"

SyntaxError: missing ) after argument list in /opt/hedgedoc/public/views/index.ejs while compiling ejs`

I have not changed or modified the docker container at all, just installed and registered an account and made some notes.

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

TheSilkky commented 3 years ago

I'm experiencing the same issue. SyntaxError: missing ) after argument list in /opt/hedgedoc/public/views/index.ejs while compiling ejs

Internal server error: https://hedgedoc.silkky.cloud/

tobbenb commented 3 years ago

If you look in #12 you can see that it happens when updating to 1.8.0. So looks like it's an upstream issue as we don't touch that file. Look here for file making the issue https://github.com/linuxserver/docker-hedgedoc/issues/12#issuecomment-832107084

tobbenb commented 3 years ago

Can you guys test if it works when using the below image. Please do a backup before testing it. lspipepr/hedgedoc:amd64-1.8.0-pkg-1837b0ef-pr-14 There was some symlinks that was copying some files from inside the container to /config and symlinked back to the container resulting in those files to never get updated. Not sure why it was done. From my limited testing nothing bad happened by removing that logic.

TheSilkky commented 3 years ago

Can you guys test if it works when using the below image. Please do a backup before testing it. lspipepr/hedgedoc:amd64-1.8.0-pkg-1837b0ef-pr-14 There was some symlinks that was copying some files from inside the container to /config and symlinked back to the container resulting in those files to never get updated. Not sure why it was done. From my limited testing nothing bad happened by removing that logic.

Your image worked for me, i didn't observe any issues or data loss.

825i commented 3 years ago

The above image works perfectly. No data loss suffered at all, thank you! I will stay on this for a while until they fix their issues upstream.

tobbenb commented 3 years ago

Thanks for confirming. I'll merge the fix later today, so you can switch back to the normal linuxserver/hedgedoc after the new version is pushed. It's not an upstream issue. We have copied som files to the /config path and then symlinked them inside the app folder again, so they would never be updated if hedgedoc updated them, unless you set up a new container without an existing config. Why it was done this way I don't know. Might have been something that was needed before, but is now obsolete.

Roxedus commented 3 years ago

Fixed with #14