Skip to content

Error parsing array: M_UNKNOWN_TOKEN returned #132

@NightEule5

Description

@NightEule5

Bug description

Downloading rooms fails because Reddit returns an M_UNKNOWN_TOKEN error, resulting in this output from Rexit:

thread 'main' panicked at src/ReAPI/rooms.rs:58:10:
Error parsing array; likely error with login
stack backtrace:
   0:     0x55c5aebea602 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h02fa31b9d8cef683
   1:     0x55c5aec13f83 - core::fmt::write::h95e30a17c3d7d930
   2:     0x55c5aebe5fe3 - std::io::Write::write_fmt::h2447d4278ce5a227
   3:     0x55c5aebea452 - std::sys::backtrace::BacktraceLock::print::headc5841a9aa64f7
   4:     0x55c5aebeb842 - std::panicking::default_hook::{{closure}}::h3e8172e4a877a122
   5:     0x55c5aebeb645 - std::panicking::default_hook::h0a7d57cc63374946
   6:     0x55c5aebec262 - std::panicking::rust_panic_with_hook::he2fcc0f110c4d509
   7:     0x55c5aebebfea - std::panicking::begin_panic_handler::{{closure}}::hc2c1290e9d2fc530
   8:     0x55c5aebeaaf9 - std::sys::backtrace::__rust_end_short_backtrace::h594e6478825ce120
   9:     0x55c5aebebc7d - __rustc[ec3606f4b1ae7141]::rust_begin_unwind
  10:     0x55c5aec12280 - core::panicking::panic_fmt::ha159237b3cadc48c
  11:     0x55c5aec1225b - core::option::expect_failed::h2a737534d1895a67
  12:     0x55c5ae840593 - rexit::ReAPI::rooms::download_rooms::{{closure}}::hfd87ad32445f2f5c
  13:     0x55c5ae846696 - rexit::main::{{closure}}::h76bc69dfb63ac3f5
  14:     0x55c5ae83a364 - tokio::runtime::park::CachedParkThread::block_on::hc4e4f58587eada4d
  15:     0x55c5ae88b9fa - tokio::runtime::context::runtime::enter_runtime::he756c4a63be08df5
  16:     0x55c5ae88329c - tokio::runtime::runtime::Runtime::block_on::h3f1cc9a1a723e1be
  17:     0x55c5ae8ae3a3 - rexit::main::he5389e1d6f6ccbda
  18:     0x55c5ae8a87a3 - std::sys::backtrace::__rust_begin_short_backtrace::h30e184a33b710631
  19:     0x55c5ae898b99 - std::rt::lang_start::{{closure}}::h6eef2bfa5cdc4b66
  20:     0x55c5aebdc490 - std::rt::lang_start_internal::he3149bc29a8af748
  21:     0x55c5ae8ae475 - main
  22:     0x7fa2f675efce - __libc_start_call_main
  23:     0x7fa2f675f089 - __libc_start_main_alias_2
  24:     0x55c5ae833945 - _start
  25:                0x0 - <unknown>

I have confirmed (by modifying the source code to print the token) that the token matches exactly with the one I got from Reddit, so I didn't enter it wrong.

  • Would you like to work on a fix? [y/n] N

To Reproduce

Steps to reproduce the behavior:

  1. Run rexit messages -t
  2. Enter bearer token obtained from Dev Tools

Expected behavior

Screenshots

Environment

  • OS: NixOS 25.05
  • {{project-name}} version: 2.0.1

Additional context

rexit.log:

2025-06-04 08:35 - TRACE: Bearer token auth flow
2025-06-04 08:35 - INFO: Login Successful
2025-06-04 08:35 - INFO: Initializing Image Log
2025-06-04 08:35 - DEBUG: starting new connection: https://matrix.redditspace.com/
2025-06-04 08:35 - DEBUG: downloadRoomsResponse: Object {"errcode": String("M_UNKNOWN_TOKEN"), "error": String("Authorization token is expired or not valid")}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions