linuxserver / docker-codimd

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

Can't login after latest update #14

Closed AlexKalopsia closed 2 years ago

AlexKalopsia commented 4 years ago

Expected Behavior

I should be able to sign in and access my notes

Current Behavior

I just updated my image and now I can reach the landing page, but clicking on Login nothing happens (seems like there's not even a link working). I can open a guest note, but to the right it says OFFLINE and I can't edit anything.

Steps to Reproduce

Environment

OS: Synology NAS + Docker
CPU architecture: x86_64
How docker service was installed:

Command used to create docker container (run/create/compose/screenshot)

codimd:
    container_name: codimd
    image: linuxserver/codimd:latest
    volumes:
      - /volume1/docker/codimd/config:/config
    environment:
      - DB_HOST=${IP}
      - DB_NAME=${CODIMD_DB}
      - DB_USER=${CODIMD_USER}
      - DB_PASS=${CODIMD_PSW}
      - DB_PORT=3306
      - PGID=1027
      - PUID=100
      - TZ=${TZ}
    ports:
      - 3001:3000
    depends_on:
      - mariadb
    restart: unless-stopped

Docker logs

https://pastebin.com/dRMEP4sB

moqmar commented 4 years ago

Same issue here, the browser console shows that the build files couldn't be found. It's looking for files like example.b556a03bc640595bd534.js, but the ID is wrong - the files exist in the container, but with another version hash.

CHBMB commented 4 years ago

@AlexKalopsia @moqmar Can you try the tag 1.4.0-ls11 and see if that works please?

UNOPARATOR commented 4 years ago

I had a similar issue with the latest (which is 1.6.0-ls29 I believe), and a previous (1.6.0-ls28) release. There was an error (not the ones mentioned above, something like invalid character) on the console (when I opened the developer tools) after I clicked login. It was fixed when I stepped down to 1.5.0-ls27 release. If you want me to I can try the 1.6.0 ls29 or ls28 again, to provide the actual error. Or open a seperate issue if you like.

P.S.: I'm using unRAID (v6.8.2). Nothing suspicious was shown in the logs by the way.

Edit: Just installed the new latest version (1.6.0-ls30) and the error is still there. At least I can share the error message with you now. (index):1 Uncaught SyntaxError: Unexpected token '<' image image

Also, I tried with several browsers and the result is the same. (Chrome, Edge (chromium), Firefox)

Edit2: Going through the release notes, I believe this error is the result of useCDN=false being the new default. I'll check in a few minutes and report back.

Edit3: Adding CMD_USECDN=true as environment variable fixes login popup appearing and I could successfully login, but now the rest doesn't work. It gives a HTTP 404 error trying to get GET https://mysubdomain.duckdns.org/build/index.ca1250d7a1aedaeba200.js

lbesnard commented 4 years ago

same here

ghost commented 4 years ago

Exact same issue here 👎

ghost commented 4 years ago

I was frustrated with this today and invested some time trying different things:

I'm unsure if this had any effect actually, but adding the env var

CMD_CSP_ENABLE=false Seemed to have solved a few of my 404's

Also, I was accessing codimd through Traefik https/ssl yet codimd was serving the scripts through http and so I had to add

CMD_PROTOCOL_USESSL=true as well

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

apiening commented 4 years ago

I had to set the two vars CMD_DOMAIN=my.domain.com and CMD_PROTOCOL_USESSL=true in my docker-compose.yml in order to get login to work. An explanation on the vars could be found here: https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration#Server-Resource-URL

I can't find anything on the var CMD_CSP_ENABLE that @EfficientSetting mentioned. Please can you tell where it comes from / or what it actually does?