Open leijurv opened 6 years ago
Note: this PR is built on top of #87 and includes the changes there
Right now I am running this new version and waiting for it to finish redownloading ~120,000 messages. I checked, and the number of messages it's redownloading is exactly equal to the number of messages where has_media=1 and api_layer=53.
Once that completes, I'll be able to see if updating this dependency fixes the DC_ID_INVALID error from before. At least until then, this should definitely not be merged because I have no idea what the other effects of updating this dependency might be.
Never mind on this, layer 66 has introduced many new things that appear to not work.
java.lang.RuntimeException: Unexpected com.github.badoualy.telegram.tl.api.TLMessageMediaGame
at de.fabianonline.telegram_backup.mediafilemanager.AbstractMediaFileManager$Companion.throwUnexpectedObjectError(AbstractMediaFileManager.kt:97)
at de.fabianonline.telegram_backup.mediafilemanager.FileManagerFactory.getFileManager(FileManagerFactory.kt:69)
at de.fabianonline.telegram_backup.Database.saveMessages(Database.kt:352)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.kt:296)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages$default(DownloadManager.kt:242)
at de.fabianonline.telegram_backup.DownloadManager._downloadMedia(DownloadManager.kt:347)
at de.fabianonline.telegram_backup.DownloadManager.downloadMedia(DownloadManager.kt:318)
at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.kt:138)
at de.fabianonline.telegram_backup.CommandLineRunnerKt.main(CommandLineRunner.kt:40)
java.lang.RuntimeException: Exception shown above happened.
at de.fabianonline.telegram_backup.Database.saveMessages(Database.kt:436)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.kt:296)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages$default(DownloadManager.kt:242)
at de.fabianonline.telegram_backup.DownloadManager._downloadMedia(DownloadManager.kt:347)
at de.fabianonline.telegram_backup.DownloadManager.downloadMedia(DownloadManager.kt:318)
at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.kt:138)
at de.fabianonline.telegram_backup.CommandLineRunnerKt.main(CommandLineRunner.kt:40)
13:06:58.205 ERROR CommandLineController.<init> : Exception caught!
java.lang.RuntimeException: Exception shown above happened.
at de.fabianonline.telegram_backup.Database.saveMessages(Database.kt:436)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.kt:296)
at de.fabianonline.telegram_backup.DownloadManager.downloadMessages$default(DownloadManager.kt:242)
at de.fabianonline.telegram_backup.DownloadManager._downloadMedia(DownloadManager.kt:347)
at de.fabianonline.telegram_backup.DownloadManager.downloadMedia(DownloadManager.kt:318)
at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.kt:138)
at de.fabianonline.telegram_backup.CommandLineRunnerKt.main(CommandLineRunner.kt:40)
----- EXIT -----
Problem also is: As soon as I update the Kotlogram version to another one with newer api_layer, I can't ever use the old message objects in the database again. (I don't mean "read the values from the table", but "use the binary data to reconstruct the original message object".) I want to keep this option to be able to later maybe get data from messages that right now doesn't seem to be important. I think the right way to do this is by converting the message objects to JSON and storing that in the database instead of the raw message objects...
@fabianonline i'm at message ID 997,004 so time is running out =)
Initial attempt to update telegram api layer and dependency.
Version
1.0.0-RC2
seems to work with minimal changes, and seems the most promising for fixing my error. Going beyond that (1.0.0-RC3
and1.0.0-RC4
) cause many dependency errors.Goal is to fix this error:
Note: running this version requires a redownload of every media message due to the API layer being too old. This updates the api_layer for every entry in the messages table (where has_media=1) from 53 to 66.
I'm not sure if some data is being lost in this transition...
@fabianonline what needs to change when updating the telegram api layer? Maybe new columns need to be added to the messages database. It's redownloading but nothing's changed, I think it's missing something.