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

KeyError: 'conversationId' when exporting #162

Open
rothos opened this issue Feb 8, 2025 · 8 comments
Open

KeyError: 'conversationId' when exporting #162

rothos opened this issue Feb 8, 2025 · 8 comments

Comments

@rothos
Copy link

rothos commented Feb 8, 2025

Desktop (please complete the following information):

  • OS and version: MacOS 14.6.1
  • Terminal/shell used: Ghostty, zsh

Describe the bug
Last week sigexport was working for me. This week I get this error:

Exporting Signal data to /Users/me/.tmp/signal-export-2025-02-08
╭──────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────────────────╮
│ /opt/homebrew/lib/python3.12/site-packages/sigexport/main.py:74 in main                                                                                                                                           │
│                                                                                                                                                                                                                   │
│    71 │   │   secho(f"Error: config.json not found in directory {source_dir}")                 ╭────────────────────────────────── locals ──────────────────────────────────╮                                     │
│    72 │   │   raise Exit(code=1)                                                               │             _ = None                                                       │                                     │
│    73 │                                                                                        │         chats = ''                                                         │                                     │
│ ❱  74 │   convos, contacts = data.fetch_data(                                                  │           ctx = <click.core.Context object at 0x103101b80>                 │                                     │
│    75 │   │   source_dir,                                                                      │          dest = PosixPath('/Users/me/.tmp/signal-export-2025-02-08')       │                                     │
│    76 │   │   password=password,                                                               │   html_output = True                                                       │                                     │
│    77 │   │   key=key,                                                                         │ include_empty = False                                                      │                                     │
│                                                                                                │   json_output = True                                                       │                                     │
│                                                                                                │           key = None                                                       │                                     │
│                                                                                                │    list_chats = False                                                      │                                     │
│                                                                                                │           old = None                                                       │                                     │
│                                                                                                │     overwrite = False                                                      │                                     │
│                                                                                                │      paginate = 100                                                        │                                     │
│                                                                                                │      password = None                                                       │                                     │
│                                                                                                │        source = None                                                       │                                     │
│                                                                                                │    source_dir = PosixPath('/Users/me/Library/Application Support/Signal')  │                                     │
│                                                                                                │       verbose = False                                                      │                                     │
│                                                                                                ╰────────────────────────────────────────────────────────────────────────────╯                                     │
│                                                                                                                                                                                                                   │
│ /opt/homebrew/lib/python3.12/site-packages/sigexport/data.py:79 in fetch_data                                                                                                                                     │
│                                                                                                                                                                                                                   │
│    76 │   │   │   if res.get("type") in ["keychange", "profile-change"]:                                                                                                                                          │
│    77 │   │   │   │   continue                                                                                                                                                                                    │
│    78 │   │   │   con = models.RawMessage(                                                                                                                                                                        │
│ ❱  79 │   │   │   │   conversation_id=res["conversationId"],                                                                                                                                                      │
│    80 │   │   │   │   id=res["id"],                                                                                                                                                                               │
│    81 │   │   │   │   type=res.get("type"),                                                                                                                                                                       │
│    82 │   │   │   │   body=res.get("body", ""),                                                                                                                                                                   │
│                                                                                                                                                                                                                   │

... (many lines of output) ...

KeyError: 'conversationId'

I'm upgraded to the latest version (v3.2.2).

Maybe Signal changed something?

@carderne
Copy link
Owner

Thanks for reporting.

If anyone can investigate what is going on here that would be great.

It'll likely be a little while before I get the time to properly look into this.

@yarko
Copy link

yarko commented Feb 11, 2025

@carderne - see #144 (comment)

and the following comments from me.

This issue seems to confirm that it is due to a change in Signal (updated a few days ago).

I'll submit a pull request for this error shortly.

@yarko
Copy link

yarko commented Feb 11, 2025

@carderne Pull request to address this (and possibly #144) made.

@yarko yarko mentioned this issue Feb 11, 2025
@pro-sumer
Copy link

Also getting this error now.

Looking forward to a new release with the PR merged!

@coppolab
Copy link

After updating to version 3.4.1, the error has disappeared (everything runs fine to the end) BUT there are missing data.
Every conversation is missing the most recent messages. Probably, those very ones since the error initially appeared.

@yarko
Copy link

yarko commented Feb 18, 2025

@coppolab - can you provide some details:

  • what operating system;
  • which python version;
  • what command line are you using when you get to this realization

I have not delved into if recent messages are missing before this or not... but will try to cut out some time later this week to dig into it.

@coppolab
Copy link

@yarko thanks for your additional effort, here is the requested info:

  • macOS 13.6.4
  • Python 3.12.4
  • $ pipenv run sigexport -j -h -p 0 -v ~/Documents/ExportDir

@pro-sumer
Copy link

pro-sumer commented Feb 19, 2025

Also running into this.

  • macOS Sequoia 15.3.1
  • Python 3.13.2
  • sigexport output

Last messages seem to be from early February (2025).

I'm running Signal 7.42.0 on this Mac.

Also see #164 and #165?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants