andrewbanchich / shreddit

Delete your Reddit data.
MIT License
235 stars 10 forks source link

Error when deleting GDPR comments from private subs #64

Closed RIKIKU closed 1 year ago

RIKIKU commented 1 year ago

I am getting an error when I run shreddit using the GDPR option. My account is very old and many of the comments I've made are in subs that are now private due to the protests that are currently underway.

The error back trace is as follows:


thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/shreddit-0.7.3/src/things/comment.rs:249:76
stack backtrace:
   0:     0x556aedd31cda - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x556aedd31cda - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x556aedd31cda - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x556aedd31cda - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x556aedd5713e - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x556aedd2ed15 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x556aedd31aa5 - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x556aedd31aa5 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x556aedd3325f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x556aedd32f9b - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x556aedd33808 - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x556aedd336c2 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:581:13
  12:     0x556aedd32146 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x556aedd33412 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x556aed9b54b3 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  15:     0x556aed9b554d - core::panicking::panic::h9533b2fee90b999e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:114:5
  16:     0x556aeda33882 - <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::hab9937b163fa2b04
  17:     0x556aeda1ae1e - <shreddit::things::comment::Comment as shreddit::things::Shred>::edit::{{closure}}::h7aed6537b0fcfb67
  18:     0x556aeda1e1a1 - shreddit::things::Shred::shred::{{closure}}::h9fb2f0c134e931a9
  19:     0x556aed9ec3fb - shreddit::main::{{closure}}::he58d28c40c55f4fb
  20:     0x556aeda259b1 - tokio::runtime::scheduler::current_thread::Context::enter::h1d86d3b4c3025ac0
  21:     0x556aeda2d4a2 - tokio::macros::scoped_tls::ScopedKey<T>::set::h8437cc472f971a7e
  22:     0x556aeda255f8 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::hbaabf4d71ca16121
  23:     0x556aed9e79e4 - tokio::runtime::runtime::Runtime::block_on::h9cefbe9cd38fe03d
  24:     0x556aed9bf625 - shreddit::main::h88e05cec64268fda
  25:     0x556aed9df323 - std::sys_common::backtrace::__rust_begin_short_backtrace::h84502011dbeb2ff9
  26:     0x556aed9d6539 - std::rt::lang_start::{{closure}}::hf169e3327e059a2e
  27:     0x556aedd2a2bc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd6efcd3bec896f2c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287:13
  28:     0x556aedd2a2bc - std::panicking::try::do_call::hce04e543bb1f4cbb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  29:     0x556aedd2a2bc - std::panicking::try::h3342dd4e1f680968
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  30:     0x556aedd2a2bc - std::panic::catch_unwind::h148ce1e59ac0cee7
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  31:     0x556aedd2a2bc - std::rt::lang_start_internal::{{closure}}::h25f9dda2057a67fe
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:48
  32:     0x556aedd2a2bc - std::panicking::try::do_call::h7caaaeaf9401650b
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487:40
  33:     0x556aedd2a2bc - std::panicking::try::he7d15285746cbbc2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451:19
  34:     0x556aedd2a2bc - std::panic::catch_unwind::h89fb4f50c0301fe0
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140:14
  35:     0x556aedd2a2bc - std::rt::lang_start_internal::h078acd489417d3c1
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148:20
  36:     0x556aed9bf705 - main
  37:     0x7f592dc5bd0a - __libc_start_main
  38:     0x556aed9b5afa - _start
  39:                0x0 - <unknown>
andrewbanchich commented 1 year ago

One a subreddit goes private, you no longer have access to it, including your own posts. The only way around this is to ask a mod to grant you access.

RIKIKU commented 1 year ago

Hi @andrewbanchich , I guess the point i was trying to make here was that the application doesn't handle this scenario and crashes. Would it be better for the application to skip these rather than break?

andrewbanchich commented 1 year ago

Oh I see. Yeah, it should not be crashing on these. I'll work on a fix.

andrewbanchich commented 1 year ago

@RIKIKU Could you confirm 0.8.1 resolves this please?

RIKIKU commented 1 year ago

Had a go with the latest version, I think it's better, but a comment from a sub that was banned threw this error:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/things/comment.rs:251:79
stack backtrace:
   0:     0x55d409f0cb5a - std::backtrace_rs::backtrace::libunwind::trace::h9a6b80bbf328ba5d
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55d409f0cb5a - std::backtrace_rs::backtrace::trace_unsynchronized::hd162ec543a11886b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55d409f0cb5a - std::sys_common::backtrace::_print_fmt::h78a5099be12f51a6
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x55d409f0cb5a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha1c5390454d74f71
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55d409f321df - core::fmt::write::h9ffde816c577717b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/fmt/mod.rs:1254:17
   5:     0x55d409f09895 - std::io::Write::write_fmt::h88186074961638e4
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/io/mod.rs:1698:15
   6:     0x55d409f0c925 - std::sys_common::backtrace::_print::h184198273ed08d59
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x55d409f0c925 - std::sys_common::backtrace::print::h1b4d8e7add699453
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x55d409f0dfce - std::panicking::default_hook::{{closure}}::h393bcea75423915a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:269:22
   9:     0x55d409f0dd75 - std::panicking::default_hook::h48c64f31d8b3fd03
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:288:9
  10:     0x55d409f0e52e - std::panicking::rust_panic_with_hook::hafdc493a79370062
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:691:13
  11:     0x55d409f0e3e2 - std::panicking::begin_panic_handler::{{closure}}::h0a64bc82e36bedc7
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:580:13
  12:     0x55d409f0cfc6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc203444fb7416a16
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x55d409f0e182 - rust_begin_unwind
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
  14:     0x55d409b873b3 - core::panicking::panic_fmt::h0f6ef0178afce4f2
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
  15:     0x55d409b8744d - core::panicking::panic::h0ead933cb8f56d66
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:117:5
  16:     0x55d409bf6df0 - <shreddit::things::comment::Comment as shreddit::things::Shred>::edit::{{closure}}::{{closure}}::h9f807b552174265e
  17:     0x55d409bf455e - <shreddit::things::comment::Comment as shreddit::things::Shred>::edit::{{closure}}::h78c34d931b465c5a
  18:     0x55d409bf7baa - shreddit::things::Shred::shred::{{closure}}::h49fccb4aa3c1854a
  19:     0x55d409babffe - shreddit::main::{{closure}}::hbfb0ac708679fffc
  20:     0x55d409bfff2d - tokio::runtime::scheduler::current_thread::Context::enter::hd2272f92da791519
  21:     0x55d409c11752 - tokio::macros::scoped_tls::ScopedKey<T>::set::he109a36d81dc0148
  22:     0x55d409bffb78 - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::h34f70ebbaab5811a
  23:     0x55d409bde665 - tokio::runtime::runtime::Runtime::block_on::h907764f1f639babb
  24:     0x55d409bc39cd - shreddit::main::h8ce8a24c1e5c62ea
  25:     0x55d409bbaf23 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1ff99fc76b98a2f7
  26:     0x55d409bbb3f9 - std::rt::lang_start::{{closure}}::hdb59ebbd011c1b44
  27:     0x55d409f051ee - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb1327dc2ef3fecdf
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287:13
  28:     0x55d409f051ee - std::panicking::try::do_call::h4044173225fe83dd
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  29:     0x55d409f051ee - std::panicking::try::hd8a722c09d156a53
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  30:     0x55d409f051ee - std::panic::catch_unwind::hd2ca07971cf0119b
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  31:     0x55d409f051ee - std::rt::lang_start_internal::{{closure}}::h26d89d595cf47b70
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:48
  32:     0x55d409f051ee - std::panicking::try::do_call::hf47aa1aa005e5f1a
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485:40
  33:     0x55d409f051ee - std::panicking::try::h73d246b2423eaf4e
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449:19
  34:     0x55d409f051ee - std::panic::catch_unwind::hbaaeae8f1b2f9915
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140:14
  35:     0x55d409f051ee - std::rt::lang_start_internal::h76f3e81e6b8f13f9
                               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148:20
  36:     0x55d409bcb385 - main
  37:     0x7f050f7d009b - __libc_start_main
  38:     0x55d409b87a4a - _start
  39:                0x0 - <unknown>
baduhai commented 1 year ago

Any updates on this? July 1st is coming up, and I don't know how this tool is gonna be affected by the new API rules. I imagine there will need to be some crazy delays in order to stay under the API quotas.

andrewbanchich commented 1 year ago

I've been really busy lately so haven't had the chance to address this. I'm open to PRs though.

I don't believe Shreddit will be affected by the API changes. Someone else clarified in another discussion that Shreddit should still be able to continue working as is.

baduhai commented 1 year ago

That's encouraging to hear. Thank you for this tool!

andrewbanchich commented 1 year ago

You're welcome! I'll try to address this as soon as I have the time.

andrewbanchich commented 1 year ago

@RIKIKU @baduhai Can you see if 0.9.1 fixes this please?

baduhai commented 1 year ago

That seems to have fixed the issue, thanks! The program was now able to delete all my comments without crashing halfway through.

andrewbanchich commented 1 year ago

Great! Thanks for the feedback.