suurjaak / Skyperious

Skype chat history tool
Other
350 stars 36 forks source link

Local version of Skype has more messages than cloud version, but there is no readable `.db` #118

Closed jpmvferreira closed 1 year ago

jpmvferreira commented 1 year ago

Hi there,

I'm running Skype on Linux and I have a lot of messages locally than I don't have on the web. Leaving it running for quite some time (≈ 3 minutes) shows very little messages, whereas locally I have plenty more.

I've tried looking for .db files in my home folder, revealing the following relevant entry:

$ find . -type f -name "*.db"
./.config/skypeforlinux/databases/Databases.db

Trying to open up this database using Skyperious on Windows (because installing this on Linux revealed some issues, although it worked I decided to try this on Windows instead) says something along the lines:

Skype user: (not recognized as a Skype database)
Conversations: Error text: OperationalError: (no such table: Messages)

This also showed on my version of Skyperious of Linux, if I remember correctly.

So my question is, if my messages are neither online, or at least they don't sync when Skyperious is being used, nor in the single .db I could find, where are all of my messages?

This doesn't seem to be addressed in the FAQ and that's why I'm asking it here.

suurjaak commented 1 year ago

The local databases that the Skype official client produces, no longer contain message history. Skype does keep some history locally, but where and how is something only Microsoft knows.

So the only sources that Skyperious can use, are either old local databases from 5+ years ago, or what it can sync from the Skype online servers. You said you did try the online sync in Skyperious - what was the result of that?

Out of curiosity, what where the issues with installing Skyperious on Linux?

jpmvferreira commented 1 year ago

The local databases that the Skype official client produces, no longer contain message history. Skype does keep some history locally, but where and how is something only Microsoft knows. That's a shame, I suppose I can back this folder up and hope that eventually somebody figures out how to extract the messages from it.

You said you did try the online sync in Skyperious - what was the result of that? It synced only some of the messages and then it stayed there, always saying that it was syncing.

Out of curiosity, what where the issues with installing Skyperious on Linux? That was probably miss-leading of me to say it, because it was due to one of its dependencies, wxpython, not Skyperious itself. I ended up solving it by creating a virtual environment and installing it from conda-forge, instead of relying on pip. If you are interested, I can try to replicate the issue.

Thank you for the reply, given that the issue is clarified I will mark this as closed. If you wish for me to replicate the issue and report it, I will use this thread to avoid creating a new one, as once again I don't think the issue was Skyperious directly.

suurjaak commented 1 year ago

It synced only some of the messages and then it stayed there, always saying that it was syncing.

That sounds like a bug in Skyperious. Can you try the sync again and then copy-paste the log messages here or in a new issue (log can be seen from menu Help -> Show log window).

I ended up solving it by creating a virtual environment and installing it from conda-forge, instead of relying on pip. If you are interested, I can try to replicate the issue.

Ah yes, getting wxpython installed on Linux can be a job and a half. No need to replicate this.

Btw, on Ubuntu Skyperious can also be installed via Snap.

jpmvferreira commented 1 year ago

Here it is:

2023-03-30 13:27:25.757 Started application.
2023-03-30 13:27:45.968 Logging in to Skype online service as 'o0undercover0o'.
2023-03-30 13:27:48.812 Creating new Skype database file C:\Users\undercover\Desktop\skypeforlinux\databases\o0undercover0o.main.db from Skype online for user 'o0undercover0o'.
2023-03-30 13:27:49.387 Opened C:\Users\undercover\Desktop\skypeforlinux\databases\o0undercover0o.main.db (0 bytes).
2023-03-30 13:27:50.541 Synchronizing database account profile from live.
2023-03-30 13:27:50.610 Starting to sync 'C:\Users\undercover\Desktop\skypeforlinux\databases\o0undercover0o.main.db' from Skype online service as 'o0undercover0o'.
2023-03-30 13:27:50.612 Synchronized account.
2023-03-30 13:27:53.737 Synchronized messages in chat with victor da fonseca: 7 new.
2023-03-30 13:27:55.239 Synchronized messages in chat with Clara: 10 new.
2023-03-30 13:27:57.551 Synchronized messages in chat with E G: 16 new.
2023-03-30 13:27:58.453 Synchronized messages in group chat "o0undercover0o": 25 new.
2023-03-30 13:27:59.705 Synchronized messages in chat with Francisco Madruga: 3 new.
2023-03-30 13:28:01.957 Synchronized messages in chat with ana respicio: 10 new.
2023-03-30 13:28:03.057 Synchronized messages in chat with Nelson  Nunes: 5 new.
2023-03-30 13:28:04.261 Synchronized messages in group chat "tmbarreiro, o0undercover0o, zp.mimoso, alentyefixe": 10 new.
2023-03-30 13:28:09.756 Error calling <bound method SkypeChat.getMsgs of SkypeSingleChat(id='8:gradleandro', alerts=True, userId='gradleandro')>.

            Traceback (most recent call last):
              File "skyperious\live.py", line 243, in request
              File "skpy\chat.py", line 71, in getMsgs
              File "skpy\conn.py", line 261, in syncStateCall
              File "skpy\conn.py", line 237, in __call__
            skpy.core.SkypeApiException: ('400 response from GET https://azeus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:gradleandro/messages', <Response [400]>)

2023-03-30 13:28:11.952 Error calling <bound method SkypeChat.getMsgs of SkypeSingleChat(id='8:gradleandro', alerts=True, userId='gradleandro')>.

            Traceback (most recent call last):
              File "skyperious\live.py", line 243, in request
              File "skpy\chat.py", line 71, in getMsgs
              File "skpy\conn.py", line 261, in syncStateCall
              File "skpy\conn.py", line 237, in __call__
            skpy.core.SkypeApiException: ('400 response from GET https://azeus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:gradleandro/messages', <Response [400]>)

2023-03-30 13:28:13.936 Error calling <bound method SkypeChat.getMsgs of SkypeSingleChat(id='8:gradleandro', alerts=True, userId='gradleandro')>.

            Traceback (most recent call last):
              File "skyperious\live.py", line 243, in request
              File "skpy\chat.py", line 71, in getMsgs
              File "skpy\conn.py", line 261, in syncStateCall
              File "skpy\conn.py", line 237, in __call__
            skpy.core.SkypeApiException: ('400 response from GET https://azeus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:gradleandro/messages', <Response [400]>)

2023-03-30 13:30:18.073 Error calling <bound method SkypeChat.getMsgs of SkypeSingleChat(id='8:manuelini.fixe', alerts=True, userId='manuelini.fixe')>.

            Traceback (most recent call last):
              File "skyperious\live.py", line 243, in request
              File "skpy\chat.py", line 71, in getMsgs
              File "skpy\conn.py", line 261, in syncStateCall
              File "skpy\conn.py", line 237, in __call__
            skpy.core.SkypeApiException: ('400 response from GET https://azeus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:manuelini.fixe/messages?syncState=4510000000383a6d616e75656c696e692e666978650150ea04a97f010000364c7f328701000000&startTime=0&pageSize=30&view=supportsExtendedHistory|msnp24Equivalent|supportsMessageProperties', <Response [400]>)

2023-03-30 13:30:20.028 Error calling <bound method SkypeChat.getMsgs of SkypeSingleChat(id='8:manuelini.fixe', alerts=True, userId='manuelini.fixe')>.

            Traceback (most recent call last):
              File "skyperious\live.py", line 243, in request
              File "skpy\chat.py", line 71, in getMsgs
              File "skpy\conn.py", line 261, in syncStateCall
              File "skpy\conn.py", line 237, in __call__
            skpy.core.SkypeApiException: ('400 response from GET https://azeus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:manuelini.fixe/messages?syncState=4510000000383a6d616e75656c696e692e666978650150ea04a97f010000364c7f328701000000&startTime=0&pageSize=30&view=supportsExtendedHistory|msnp24Equivalent|supportsMessageProperties', <Response [400]>)
suurjaak commented 1 year ago

Hmm, not seeing any real show-stopping errors in the log..

Does the sync process in Skyperious still remain spinning forever?

jpmvferreira commented 1 year ago

Okay has it turns our, it stops syncing about after 15 minutes. Unfortunately, it doesn't recover the chat messages that are available in my Linux machine that don't seem to be available on the web. I'm running this on my Windows machine tho, but as you mentioned, the format with which they are stored is unknown so I suppose running this on my Linux machine would make no difference.

suurjaak commented 1 year ago

Yes, running the sync on Linux should make no difference, as all the content comes from Skype online servers.

Good to hear that the sync is at least working as much as it can be expected to.