Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Bug report) Always error connecting to sync server after wrong DNS configuration once #558

Open
renyuneyun opened this issue Nov 5, 2024 · 3 comments

Comments

@renyuneyun
Copy link

TriliumNext Version

0.90.4

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

Archlinux

Description

I have my own sync server, and set up syncing in my Trilium desktop app. It all worked great, until I made a mistake in DNS set up.
In short, the problematic set up was: Infinite redirect loop using status code 301. (It was due to an incorrect configuration of cloudflare by myself.)
The resulting behaviour is: trilium always fails to connect to sync server; on "sync" configuration page, clicking "test sync" will lead to an immediate popup saying "... too many redirects".

I can bypass the issue with commandline switch --disable-http-cache, and trilium will resort to sync. However, I have to enable this switch everytime when starting trilium, otherwise the problem re-occurs.

This has been an issue since original Trilium. It looks like clearing the DNS cache would resolve the issue, but I cannot find a way to do this. Hopefully this can be added as a button in "advanced" options page.

Error logs

No response

@renyuneyun renyuneyun changed the title (Bug report) Error connecting to sync server after wrong DNS configuration (Bug report) Always error connecting to sync server after wrong DNS configuration once Nov 5, 2024
@SiriusXT
Copy link

SiriusXT commented Nov 6, 2024

I'm not sure, but clearing the Electron cache might solve the problem.
path: ~/.config/<app_name>

@renyuneyun
Copy link
Author

Hi @SiriusXT , Thanks for the quick reply.
It seems to work, by only deleting ~/.config/TriliumNext Notes/Cache/. The upper-case name made this directory invisible in my previous search (it's lower-case in other places, e.g. ~/.local/share/trilium-data/).

But this not only happens for Linux desktop, but also on MacOS. The same directory does not exist on that location, and I don't have a clue on how to guess.

In fact, it is exactly because the issue happens on all platforms (well, I only have Linux and MacOS, but no reason it's different on Windows or elsewhere) that I raised this as a bug report.

@SiriusXT
Copy link

SiriusXT commented Nov 6, 2024

Mac: ~/Library/Application Support/<app_name>/Cache
Windows: C:\Users<username>\AppData\Roaming<app_name>\Cache
This location is managed by electron's Chromium engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants