zadam / trilium

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

Router not found for request /app/wdigets/backlinks.js | Cannot login remotely #3054

Open L44RS opened 2 years ago

L44RS commented 2 years ago

Trilium Version

0.54.2

What operating system are you using?

Other Linux

What is your setup?

Server access only

Operating System Version

Docker 20.10.16

Description

I cannot login to or use Trilium when connected via Nginx reverse proxy. Locally, directly via IP address and port works fine, but when trying to connect through Nginx reverse proxy, the password keeps getting rejected. When disabling the password in the config, the screen stays grey.

Trilium logs show the following:

Error: Router not found for request /app/widgets/backlinks.js

    at /usr/src/app/src/app.js:77:17

    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)

    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)

    at /usr/src/app/node_modules/express/lib/router/index.js:286:9

    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)

    at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)

    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:91:12)

    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)

    at /usr/src/app/node_modules/express/lib/router/index.js:286:9

    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12) {

  status: 404

This corresponds to the messages in the browser console. What is going wrong here?

sigaloid commented 2 years ago

Could it possibly be a browser caching issue? There was a backlinks.js file that was recently renamed to a more random filename due to issues with adblockers and the title "backlinks.js":

https://github.com/zadam/trilium/blob/master/src/public/app/widgets/floating_buttons/zpetne_odkazy.js#L1-L3

If your browser hasn't reloaded the new version yet it still may be caching and trying to load the new filename.