zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.97k stars 1.89k forks source link

(Bug report) Cannot login, alway in the login page #3077

Open Cumuloniumbus opened 2 years ago

Cumuloniumbus commented 2 years ago

Trilium Version

0.52.3

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

x86_64 GNU/Linux synology_apollolake_918+

Description

Hi, I am running my trilium docker in my synology machine. I can normally setup my trilium and then it goes to the login page. The weird thing is, after I input the right password, it won't jump to the edit page, it will remain the login page like forever. Could you help me? Here is the requests and logs. Thank you very much!

Requests: image image

Logs: 16:14:43.379 Slow query took 92ms: SELECT entityName, entityId, hash FROM entity_changes WHERE isSynced = 1 AND entityName != 'note_reordering' 16:14:43.449 Content hash computation took 162ms 16:14:43.451 Content hash checks PASSED 16:14:43.451 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":9100} 16:15:43.174 Nothing to push 16:15:43.211 Finished pull 16:15:43.212 Nothing to push 16:15:43.424 Slow query took 54ms: SELECT entityName, entityId, hash FROM entity_changes WHERE isSynced = 1 AND entityName != 'note_reordering' 16:15:43.453 Content hash computation took 83ms 16:15:43.454 Content hash checks PASSED 16:15:43.454 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":9100} 16:16:43.172 Nothing to push 16:16:43.206 Finished pull 16:16:43.207 Nothing to push 16:16:43.393 Slow query took 69ms: SELECT entityName, entityId, hash FROM entity_changes WHERE isSynced = 1 AND entityName != 'note_reordering' 16:16:43.425 Content hash computation took 101ms 16:16:43.426 Content hash checks PASSED 16:16:43.426 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":9100} 16:17:43.192 Nothing to push 16:17:43.223 Finished pull 16:17:43.223 Nothing to push 16:17:43.380 Slow query took 58ms: SELECT entityName, entityId, hash FROM entity_changes WHERE isSynced = 1 AND entityName != 'note_reordering' 16:17:43.412 Content hash computation took 90ms 16:17:43.413 Content hash checks PASSED 16:17:43.413 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":9100} 16:18:43.203 Nothing to push 16:18:43.235 Finished pull 16:18:43.237 Nothing to push 16:18:43.401 Slow query took 58ms: SELECT entityName, entityId, hash FROM entity_changes WHERE isSynced = 1 AND entityName != 'note_reordering' 16:18:43.430 Content hash computation took 87ms 16:18:43.431 Content hash checks PASSED 16:18:43.431 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":9100}

sigaloid commented 2 years ago

I had the same symptom; it turned out there was not permission for Docker/Podman to write to the sessions/folder. When you logged in, it would not save the new valid cookie so it would kick you back to the login screen.

Are you sure that the server has permission to write to the sessions folder? And can you delete/move the existing logs and upload just the logs around the time that the login fails (looks to be 16:12, which the logs you posted don't go far back enough to show)?

Cumuloniumbus commented 2 years ago

Thank you for your reply. After inputting the right password, I tried to enter the url "192.168.50.4:18003"(I mapped the 8080 port to the 18003 port) without the "/login" suffix and it worked. I can successfully go to the edit page. Looks like the server cannot help me jump to the edit page after I input the password? For the questions you mentioned, I'm pretty sure that the server has the permission to the sessions folder. I go inside the docker and find that there are already 2 files in the sessions folder created by the server. I have also tried to create a new file in this folder and it worked. I also use chmod to change the session folder's priority to the 777, but the login problem still remains. image The logs in 16:12 are the same as what I attached cuz I've tried loggin for several times later.

Anyway I can use my triliums finally, thank you for your brilliant work. The login problem might be a bug or something?

holoword commented 1 year ago

Are you sure that the server has permission to write to the sessions folder? And can you delete/move the existing logs and upload just the logs around the time that the login fails (looks to be 16:12, which the logs you posted don't go far b

Did you find any way to fix it? I had the same symptom, with the ip:port can reach the note, while domain login all the time.

Cumuloniumbus commented 1 year ago

Are you sure that the server has permission to write to the sessions folder? And can you delete/move the existing logs and upload just the logs around the time that the login fails (looks to be 16:12, which the logs you posted don't go far b

Did you find any way to fix it? I had the same symptom, with the ip:port can reach the note, while domain login all the time.

Input your password once, and then go to the "ip:port" url without suffix "/login", you can reach the note page. This symptom automatically went away after several days. I basiclly did nothing.

holoword commented 1 year ago

Input your password once, and then go to the "ip:port" url without suffix "/login", you can reach the note page. This symptom automatically went away after several days. I basiclly did nothing.

Yeah, I can also login via ip:port, but cannot login via domain. pretty wired. hope the problem went away automatly.