tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.23k stars 1.47k forks source link

TDLib data has been corrupted (fatal error) #902

Open idontknowhattodo opened 4 years ago

idontknowhattodo commented 4 years ago

Hello! After today's update on 23 Jan (0.22.4.1270-arm64-v8a) I can't open the app because of the issue on the screenshot below. The app has working accounts and I don't have access to them now. (I don't have a problem with storage and have enough free gigabytes). "Launch App" button and process doesn't help. I can share the error details if it can help anyhow.

Device: Redmi 5 Android: 8.1.0 MIUI: 11.0.2 Global Stable

As far as I understand from #849 the fix with update won't be soon?

TDLib data has been corrupted

UPD after tests: image

levlam commented 4 years ago

The SQLite database was corrupted. If device restart didn't help and there is enough disk space, then the only way to fix this is to delete the SQLite database.

idontknowhattodo commented 4 years ago

The SQLite database was corrupted. If device restart didn't help and there is enough disk space, then the only way to fix this is to delete the SQLite database.

  1. Does it mean that all accounts will be lost? Because I don't even remember phones.
  2. How many free disk space is enough?
levlam commented 4 years ago
  1. Currently, there is no way in Telegram X to delete just affected database, but such way can be added in the future.
  2. If there is > 10 MB, then there should be no problem.
idontknowhattodo commented 4 years ago
  1. Currently, there is no way in Telegram X to delete just affected database, but such way can be added in the future.

Can you please give at least approximate date/month/something when it will be possible in the future?

I'm so confused because it happened after the last update.

vkryl commented 4 years ago

Just added an option to drop database on this screen. Comes in the 0.22.4.1272 beta.

idontknowhattodo commented 4 years ago

Just added an option to drop database on this screen. Comes in the 0.22.4.1272 beta.

  1. Basically, it doesn't change the situation if i.g. I still haven't an acess to phone numbers and this app was only one where I was signed in. Does it?
  2. Moreover, I can't update anyhow from stable to beta version because all I can view is settings of TDLib Logs, Applocation Logs and Testing utilities.
levlam commented 4 years ago

@idontknowhattodo

  1. This shouldn't be related to the update.
  2. You still will be logged in after the database deletion. Only some local data will be lost, like messages in secret chats.
  3. You can join Telegram X Beta program in through Google Play.
krohys commented 4 years ago

@levlam

  1. This shouldn't be related to the update.

  2. You still will be logged in after the database deletion. Only some local data will be lost, like messages in secret chats.

  3. You can join Telegram X Beta program in through Google Play.

I have the same error. Updated to 0.22.4.1272 beta . Cleared the database. Did not help! Please, help. I have very important things there, and the phone has long been lost.

krohys commented 4 years ago

cloned application "telegram x" - it starts, but there are no accounts

buicaocuong95 commented 4 years ago

Sang đây Vào 25-01-2020 05:21, "krohys" notifications@github.com đã viết:

cloned application "telegram x" - it starts, but there are no accounts

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

levlam commented 4 years ago

@krohys Cloning the app is really a bad idea. Are you sure that you have the "Corrupted database" error?

Between, if you cleared application data from the System settings, then no data can be repaired and you need to log in again.

krohys commented 4 years ago

KbmExWtJ2v0 @levlam Yes, the error is as in the screenshot "idontknowhattodo". I have Xiaomi redmi note 4. On miui 11.0.2. There you can clone applications. The main application gives an error, and the clone made starts up (like new, without all contacts). The clone did to use the application while looking for ways to solve the problem. Very urgently needed to restore access to my accounts!

krohys commented 4 years ago

@levlam

Between, if you cleared application data from the System settings, then no data can be repaired and you need to log in again.

I didn’t delete anything system, I just clicked the “delete base and restart” button, as you said. Did not help(

levlam commented 4 years ago

@krohys Share error details with @tdlib_bot.

krohys commented 4 years ago

@levlam @krohys Share error details with @tdlib_bot. This is the first thing I did) do not respond ...

idontknowhattodo commented 4 years ago

@levlam Btw I have this error in the cloned application (by MIUI), in the same time the original one hasn't any errors just because it is using only one account I guess.

How can we solve the issue? Should I send the error details via @tdlib_bot ?

levlam commented 4 years ago

@idontknowhattodo Yes, share error details via @tdlib_bot.

idontknowhattodo commented 4 years ago

@levlam Done. Please check the bot and give the further instructions or recommendations.

levlam commented 4 years ago

@idontknowhattodo @krohys It seems that the database isn't in fact broken and the issue is caused by 100+ accounts trying to launch simultaneously. Telegram X update is required to fix this.

idontknowhattodo commented 4 years ago

Joined Beta and waiting for Update. Hope the update will be in a short time. Thanks @levlam I leave the issue (topic) open just in a cause.

krohys commented 4 years ago

@levlam У друга Redmi note 7, но версия Andoid новее, у него всё работает после обновления январского. 100+ аккаунтов также. может с версией андройд связанно? это для информации, может поможет решить проблемы. Жду срочного обновления.

@levlam A friend has a Redmi note 7, but the Andoid version is newer, everything works after the January update. 100+ accounts as well. Maybe the version of android is connected? this is for information, can help solve problems. I'm waiting for an urgent update

idontknowhattodo commented 4 years ago

Have received an update today on Beta, but still nothing. Can't run the app yet because of the same error. The error details are the same except db.sqlite size (from 525312 to 70656 in this time) and user number in "#" of course.

krohys commented 4 years ago

@idontknowhattodo

Hi, partially solved the problem. I got root rights and deleted the path from the system folder in the error data / data / ... accounts. Left 99 pieces. And it worked.

idontknowhattodo commented 4 years ago

@krohys Hello! Can you tell please in details? My tg username: @whthppnd Contact at any time. I suppose that I can't wait for the updates so long.

idontknowhattodo commented 4 years ago

@levlam Aliaksei, I'm sorry, but do you know update date? I don't ask ETA, just ask about the date of updating.

levlam commented 4 years ago

@idontknowhattodo I don't know when Telegram X will be updated.

idontknowhattodo commented 4 years ago

Today was the 2nd update in beta after the issue appearing, but still nothing, unfortunately.

idontknowhattodo commented 4 years ago

@levlam Aliaksei, the issue appeared more than a month ago. I joined beta and updated almost 10 updates during this time but Telegram X still doesn't have a solution.

diegojs03 commented 4 years ago

La base de datos SQLite estaba dañada. Si el reinicio del dispositivo no ayudó y hay suficiente espacio en disco, entonces la única forma de solucionar esto es eliminar la base de datos SQLite.

I'm having the same problem, how can I delete the SQLite data base?

diegojs03 commented 4 years ago

Screenshot_20200328-111643

levlam commented 4 years ago

@diegojs03 You have a different error, which is not related to the issue. You can "Share error details" to see exact error message, but "External error" is an error caused by your storage/OS misbehaving and usually can't be fixed on the app's side.

diegojs03 commented 4 years ago

@ diegojs03 Tiene un error diferente, que no está relacionado con el problema. Puede "Compartir detalles de error" para ver el mensaje de error exacto, pero "Error externo" es un error causado por el mal comportamiento de su almacenamiento / sistema operativo y, por lo general, no se puede solucionar del lado de la aplicación.

SetTdlibParameters: #400: File "/data/data/org.thunderdog.challegram/files/tdlib134/td.binlog" can't be opened/created for reading and writing

levlam commented 4 years ago

@diegojs03 Giving the number of accounts you have, this could be the same problem.

Sajilck commented 4 years ago

This can be tested in TGX latest beta 0.22.7.1325