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]: Encrypted And Non-Encrypted Files Fail to Play with 400 ERROR After Upgrading to 1.6.5/1.6.6, Works on 1.6.4 #430

Closed
ViktorsBaikers opened this issue Jan 15, 2025 · 16 comments
Labels
bug Something isn't working

Comments

@ViktorsBaikers
Copy link

ViktorsBaikers commented Jan 15, 2025

Describe the bug

Some of the encrypted files after upgrading to 1.6.5/6 are not functioning, leading to a 400 ERROR message in the logs. I am uncertain if any changes are required and what the cause might be, but following a restart of Docker, some of the encrypted files began to play, while others failed to do so, and after a second restart, the files that were playing previously now do not play again. This problem is not present in version 1.6.4.

In version 1.6.6, even some non-encrypted files fail to play, displaying the same error message in the logs. I’ve indeed created a new storage.db file and linked the Docker container to it.

Repoduction

Not entirely certain if you can accomplish that. Attempt with previously encrypted files that were uploaded some time ago.

Expected behavior

I was unable to replicate that issue on versions 1.6.4 and earlier.

Version

1.6.5 and 1.6.6

Which Platform are you using?

Linux (Docker)

Additional context

15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50891", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000086853, "time": "2025-01-15T14:03:26Z"}
15/01/2025 02:03 PM	INFO	[DB] github.com/tgdrive/teldrive/pkg/services/file.go:388
[10.097ms] [rows:1] SELECT *,(select get_path_from_file_id as path from teldrive.get_path_from_file_id(id)) FROM "teldrive"."files" WHERE id = 'HIDDEN'
15/01/2025 02:03 PM	INFO		{"status": 200, "method": "GET", "path": "/api/files/HIDDEN", "query": "", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.010286299, "time": "2025-01-15T14:03:26Z"}
15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000134853, "time": "2025-01-15T14:03:27Z"}
15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000125104, "time": "2025-01-15T14:03:28Z"}
15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000164849, "time": "2025-01-15T14:03:29Z"}
15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000129533, "time": "2025-01-15T14:03:30Z"}
15/01/2025 02:03 PM	ERROR		{"status": 400, "method": "GET", "path": "/api/files/HIDDEN/file.mkv", "query": "hash=HIDDEN", "ip": "HIDDEN:50890", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "latency": 0.000129874, "time": "2025-01-15T14:03:31Z"}
@ViktorsBaikers ViktorsBaikers added the bug Something isn't working label Jan 15, 2025
@ViktorsBaikers ViktorsBaikers changed the title [Bug]: Encrypted Files Fail to Play with 400 ERROR After Upgrading to 1.6.5/1.6.6, Works on 1.6.4 [Bug]: Encrypted And Non-Encrypted Files Fail to Play with 400 ERROR After Upgrading to 1.6.5/1.6.6, Works on 1.6.4 Jan 15, 2025
@doomwithdon
Copy link

Working fine for me post upgrade to 1.6.6. Non encrypted files play just fine.

@aniel300
Copy link

aniel300 commented Jan 16, 2025

i experienced this as well and had to revert to 1.6.4

@ViktorsBaikers
Copy link
Author

On 1.6.10 version the issue still exists.

@aniel300
Copy link

aniel300 commented Jan 28, 2025

am .9 and will update to .10 just now. and am not experiencing this issue. make sure to update the db name etc. there was some breaking changes few updates back

@ViktorsBaikers
Copy link
Author

I kinda mentioned, that i've created new storage.db file and followed the release comments :)

@ViktorsBaikers
Copy link
Author

msgpack: invalid code=82 decoding string/bytes length This error appears see when I'm visiting the path from the error message via browser tab.

@ViktorsBaikers
Copy link
Author

@aniel300 Just to double-check,

  1. You have removed the old session.db file and just created a new empty storage.db, right?
  2. Can you drop your config.toml file? Might something be in there?

This issue is quite awkward. Since 1.65.5, most of the files are failing to play.

@aniel300
Copy link

u trying to play them direcly or via rclone?

@ViktorsBaikers
Copy link
Author

u trying to play them direcly or via rclone?

Directly, the same situation would be with rclone.

@aniel300
Copy link

is ur db coming from an old version of tgdrive?

@ViktorsBaikers
Copy link
Author

is ur db coming from an old version of tgdrive?

Yep, I'm on PostgreSQL 16. Using Teldrive since 1.4 / 1.5, can't really remember.

@aniel300
Copy link

are u using his db container or the official one?

@ViktorsBaikers
Copy link
Author

are u using his db container or the official one?

ghcr.io/tgdrive/postgres:16-alpine, so teldrive container.

@aniel300
Copy link

ohh man hopefully ur db is not corrupted or somehting, i cant help on this becuase it is outside of my skillset. someone smarter than me tried to help me with something similar. try to get in touch with him to see if he can help u or try tg discord server

@ViktorsBaikers
Copy link
Author

Found issue, it was redis cache. After i've cleared it, everything works.

@aniel300
Copy link

ohh bro am glad for u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants