teldrive icon indicating copy to clipboard operation
teldrive copied to clipboard

App crashes immediately after launching

Open BoredKevin opened this issue 2 years ago • 7 comments

  • Issue Type: Bug Report
  • Description: Teldrive launches but doesn't display any functionality or errors. This only happens when the database configuration in config.toml is correct. When the configuration is incorrect, an error message is displayed as expected. It seems that after launching the app it tries to connect to the database as I see a small increase in network activity (shown on the screenshot below), but proceeds to crash anyway.
  • Steps to Reproduce:
    1. Ensure the database configuration in config.toml is correct (e.g., valid connection details).
    2. Launch the application.
    3. App launches but doesn't display anything and closes abruptly.
  • Version:
teldrive 1.2.1
- os/type: windows
- os/arch: amd64
- go/version: go1.22.2
  • Additional Information:
    • The config.toml file
[db]
  data-source = "postgresql://xxx:[email protected]/tcsdb?sslmode=require"
  log-level = 1

  [db.migrate]
    enable = true

  [db.pool]
    max-idle-connections = 25
    max-lifetime = "10m"
    max-open-connections = 25

[jwt]
  allowed-users = [""]
  secret = "YYxxx"
  session-time = "30d"

[log]
  development = true
  level = -1

[server]
  graceful-shutdown = "15s"
  port = 25580

[tg]
  app-hash = "e93exxx"
  app-id = 230xxx
  app-version = "4.6.3 K"
  bg-bots-limit = 5
  device-model = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0"
  disable-stream-bots = false
  lang-code = "en"
  lang-pack = "webk"
  rate = 100
  rate-burst = 5
  rate-limit = true
  session-file = ""
  system-lang-code = "en-US"
  system-version = "Win32"

  [tg.uploads]
    encryption-key = ""
    retention = "7d"
    threads = 16

Screenshots:

When launched in windows image

When launched in a debian container image

BoredKevin avatar Apr 19 '24 16:04 BoredKevin

same thing is happening with me except i'm trying to install it on a linux arm64 machine with docker. the docker container keeps restarting. i tried contacting them via discord but am unable to

https://github.com/divyam234/teldrive/issues/189

WilderDrone avatar Apr 19 '24 23:04 WilderDrone

Hmm...I noticed this line: session-file = ""

I think the reason teldrive isn't running because the session file isn't set, so set it like so: session-file = "./session.db"

and maybe it'll work? This is from my windows config, not sure if you'll need to change the "./" to something else on linux. Hope this helps!

Linden10 avatar Apr 20 '24 03:04 Linden10

Thanks for your suggestion @Linden10

Unfortunately I did this and there was no change, same output, same temporary spike in network and cpu usage, maybe @divyam234 will look into this sometime?

BoredKevin avatar Apr 21 '24 13:04 BoredKevin

Hmm…is your config file in the same directory as teldrive? If so and it’s still not working…

Do you have a vpn on? It yes, try turning it off and test it. If not, can you login into neondb and double check everything since it has to do with the network connection and all…

Oh! Is the session.db file in your teldrive directory? If not, try creating it and see if it works then!

Oh btw teldrive was just updated yesterday (same version number but updated still) so try updating first before doing anything above, yup!

Linden10 avatar Apr 22 '24 07:04 Linden10

Try a fresh install, if it work, your database is broken.

ben-ba avatar Apr 26 '24 18:04 ben-ba

just fyi for anyone having a similar issue as I too was facing app shutting down immediately - in my case at least it turned out to be a issue with the neon db url in config.toml. i had created a custom user in neondb but for whatever reason teldrive was not communicating with that, as soon as i changed it to the default neondb user the app worked. will suggest trying with a local db config first if you are facing a similar issue.

WilderDrone avatar May 03 '24 19:05 WilderDrone

Alright after weeks of trying to find a solution, @WilderDrone is right. I tried deleting my database and creating one again under the default owner and it worked.

I hope @divyam234 fix this in a future update, once again thank you to @WilderDrone for finding the temporary solution.

BoredKevin avatar May 04 '24 13:05 BoredKevin