out-of-cheese-error / gooseberry

A command line utility to generate a knowledge base from Hypothesis annotations
Apache License 2.0
152 stars 8 forks source link

Error: Make sure input fields are valid #66

Closed almereyda closed 3 weeks ago

almereyda commented 3 years ago

Bug description

When trying to synchronise the local knowledge base, an error is thrown:

Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /home/runner/work/gooseberry/gooseberry/src/gooseberry/mod.rs:201

To Reproduce

  1. goosebery config authorize
  2. goosebery config kb all
  3. gooseberry sync

Expected behavior

The sync is performed and a subsequent make run can finish.

Ninjani commented 3 years ago

Hmm, this happens when either the username or the Hypothesis group ID can't be found. Since the authorize command worked, it seems to be the group ID that's causing the issue. How did you create/select the group?

Ninjani commented 3 years ago

I took another look - could you let me know which version of gooseberry you're running? On the latest v0.6.0 this line of code is not touched by any of the commands listed in the "To Reproduce" section, so I'm a bit mystified now!

ngirard commented 3 years ago

Heya, I'm experiencing the (seemingly) same problem. Using latest precompiled binary on Ubuntu 20.04

gooseberry sync
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /home/runner/work/gooseberry/gooseberry/src/gooseberry/mod.rs:126

I'm very excited in advance by Gooseberry, so I'd be glad to help you solve this. Cheers

ngirard commented 3 years ago

How did you create/select the group?

I used your dialoguer interface, which stored hypothesis_group = 'VEeoyDkE' in the config file.

When I replaced the group id by the group name, i.e. hypothesis_group = 'ngirard', no error was reported during the sync:

gooseberry sync
  Done!
Everything up to date!

but the resulting database seems empty, judging by the output of gooseberry search.

Hope that helps

Ninjani commented 3 years ago

Hi, thanks for reaching out! I believe the problem here is that you're using the group name instead of the ID. The ID is the <code> part in the group URL: https://hypothes.is/groups/<code>/<name>. Another easier option is to run gooseberry config group and then select the "Use an existing Hypothesis group" option, it should list all your groups along with their IDs there and you can select the one you want.

ngirard commented 3 years ago

Thanks for your feedback.

I believe the problem here is that you're using the group name instead of the ID. (...)

Unfortunately, that's what I did in the first place. This leads to the error which OP reported and I'm experiencing.

Ninjani commented 3 years ago

Ah I see, sorry for the misunderstanding! Hmm, then indeed it seems like there's something going wrong with the Hypothesis call. Do you think you could clone the repo and run with backtrace? Also, does it only fail with this group? (for e.g if you create a new group and add an annotation there does the sync work?)

ngirard commented 3 years ago

Alright, so creating a new group and annotating into it worked fine.

ngirard commented 3 years ago

Here's your backtrace:

RUST_BACKTRACE=1 /home/ngirard/soft/gooseberry.git.git/target/debug/gooseberry sync
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason:                                                                                                                         

Location:
   /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:126

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: color_eyre::config::EyreHook::default::h39a8a16bab443ec5
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/color-eyre-0.5.10/src/config.rs:1016
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h963abafd467e63f6
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/color-eyre-0.5.10/src/config.rs:1070
   3: eyre::capture_handler::h42552ffa394ea914
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/lib.rs:551
   4: eyre::error::<impl eyre::Report>::from_std::h97ff5b653810ceee
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/error.rs:90
   5: eyre::error::<impl core::convert::From<E> for eyre::Report>::from::hda66eece24228332
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/error.rs:464
   6: gooseberry::gooseberry::Gooseberry::sync::{{closure}}::h87630861eca82208
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:126
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8d3b0f5ae982d0c8
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
   8: gooseberry::gooseberry::Gooseberry::run::{{closure}}::h78c45f41d877ab88
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:76
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h99ebc36d09450fd1
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  10: gooseberry::gooseberry::Gooseberry::start::{{closure}}::h1fbdbc3586a80ffa
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:69
  11: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hfaedb37eed8fdda3
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  12: gooseberry::main::{{closure}}::h43ad353beddc155e
      at /home/ngirard/soft/gooseberry.git.git/src/main.rs:12
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h44d9fae1883c0494
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  14: tokio::park::thread::CachedParkThread::block_on::{{closure}}::h69037d85255f46ce
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/park/thread.rs:263
  15: tokio::coop::with_budget::{{closure}}::h2771a91be4e4e07c
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:106
  16: std::thread::local::LocalKey<T>::try_with::he98e8df5219a720d
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:272
  17: std::thread::local::LocalKey<T>::with::he2c435ca27ec6e3d
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:248
  18: tokio::coop::with_budget::h9ac9f06d103e5597
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:99
  19: tokio::coop::budget::h50b2d7e3983a686f
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:76
  20: tokio::park::thread::CachedParkThread::block_on::h6a4f5b578d4091b4
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/park/thread.rs:263
  21: tokio::runtime::enter::Enter::block_on::h8cbcb8c5966c23ac
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/enter.rs:151
  22: tokio::runtime::thread_pool::ThreadPool::block_on::h07eb11ad4077d372
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/thread_pool/mod.rs:71
  23: tokio::runtime::Runtime::block_on::h1639fabaf649b6c4
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/mod.rs:452
  24: gooseberry::main::h08aebbe651464277
      at /home/ngirard/soft/gooseberry.git.git/src/main.rs:6
  25: core::ops::function::FnOnce::call_once::h5382d4da34be7663
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
  26: std::sys_common::backtrace::__rust_begin_short_backtrace::hbc865c9e88802db5
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125
  27: std::rt::lang_start::{{closure}}::h5e0ac3460cf843c2
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66
  28: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h78040f802d89ccdc
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/ops/function.rs:259
  29: std::panicking::try::do_call::h6853cad536dd09a1
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:379
  30: std::panicking::try::h827495f03a9fbb9a
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:343
  31: std::panic::catch_unwind::h4bdf17571090eb17
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panic.rs:396
  32: std::rt::lang_start_internal::h2f319c33bb013f29
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/rt.rs:51
  33: std::rt::lang_start::h3ece3ab7c6568856
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65
  34: main<unknown>
      at <unknown source file>:<unknown line>
  35: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  36: _start<unknown>
      at <unknown source file>:<unknown line>
Ninjani commented 3 years ago

I'm trying to figure out what could be special about this group to cause the issue. The search that gooseberry does with the hypothesis API is hypothesis annotations search --user "acct:<username>@hypothes.is" --group "<group_id>" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc. Would you be up for grabbing the binary from here and trying this command? You'd have to set the HYPOTHESIS_NAME and HYPOTHESIS_KEY environment variables to get it to run.

ngirard commented 3 years ago

Sure. So , should I both put my username into HYPOTHESIS_NAME and replace <username> with it in your command ? Here's the result:

hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --group "VEeoyDkE" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order ascError: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /home/runner/work/rust-hypothesis/rust-hypothesis/src/cli.rs:226

Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
ngirard commented 3 years ago
RUST_BACKTRACE=full hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --group "VEeoyDkE" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /home/runner/work/rust-hypothesis/rust-hypothesis/src/cli.rs:226

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Ninjani commented 3 years ago

Very confusing!

Ninjani commented 3 years ago

Okay, one last idea - could you search for your group on https://jonudell.info/h/facet/ and see if it comes through without errors?

ngirard commented 3 years ago

I'm afraid it doesn't appear -- unless I'm misusing that tool. Screenshot_20210413_142032

Ninjani commented 3 years ago

Even after adding the API token? There should be an option to add it near the bottom of the page

ngirard commented 3 years ago

Choosing the "public" group doesn't make it work any better

❯ /home/ngirard/soft/gooseberry.git.git/target/debug/gooseberry config group                         
✔ Where should gooseberry take annotations from? · Use an existing Hypothesis group
✔ Which group should gooseberry use? · __world__: Public

~/soft via ☕ v11.0.10 took 6s 
❯ RUST_BACKTRACE=1 /home/ngirard/soft/gooseberry.git.git/target/debug/gooseberry sync
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason:                                                                                                                         

Location:
   /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:126

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: color_eyre::config::EyreHook::default::h39a8a16bab443ec5
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/color-eyre-0.5.10/src/config.rs:1016
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::h963abafd467e63f6
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/color-eyre-0.5.10/src/config.rs:1070
   3: eyre::capture_handler::h42552ffa394ea914
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/lib.rs:551
   4: eyre::error::<impl eyre::Report>::from_std::h97ff5b653810ceee
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/error.rs:90
   5: eyre::error::<impl core::convert::From<E> for eyre::Report>::from::hda66eece24228332
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/eyre-0.6.5/src/error.rs:464
   6: gooseberry::gooseberry::Gooseberry::sync::{{closure}}::h87630861eca82208
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:126
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8d3b0f5ae982d0c8
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
   8: gooseberry::gooseberry::Gooseberry::run::{{closure}}::h78c45f41d877ab88
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:76
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h99ebc36d09450fd1
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  10: gooseberry::gooseberry::Gooseberry::start::{{closure}}::h1fbdbc3586a80ffa
      at /home/ngirard/soft/gooseberry.git.git/src/gooseberry/mod.rs:69
  11: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hfaedb37eed8fdda3
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  12: gooseberry::main::{{closure}}::h43ad353beddc155e
      at /home/ngirard/soft/gooseberry.git.git/src/main.rs:12
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h44d9fae1883c0494
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  14: tokio::park::thread::CachedParkThread::block_on::{{closure}}::h69037d85255f46ce
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/park/thread.rs:263
  15: tokio::coop::with_budget::{{closure}}::h2771a91be4e4e07c
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:106
  16: std::thread::local::LocalKey<T>::try_with::he98e8df5219a720d
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:272
  17: std::thread::local::LocalKey<T>::with::he2c435ca27ec6e3d
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:248
  18: tokio::coop::with_budget::h9ac9f06d103e5597
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:99
  19: tokio::coop::budget::h50b2d7e3983a686f
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/coop.rs:76
  20: tokio::park::thread::CachedParkThread::block_on::h6a4f5b578d4091b4
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/park/thread.rs:263
  21: tokio::runtime::enter::Enter::block_on::h8cbcb8c5966c23ac
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/enter.rs:151
  22: tokio::runtime::thread_pool::ThreadPool::block_on::h07eb11ad4077d372
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/thread_pool/mod.rs:71
  23: tokio::runtime::Runtime::block_on::h1639fabaf649b6c4
      at /home/ngirard/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/mod.rs:452
  24: gooseberry::main::h08aebbe651464277
      at /home/ngirard/soft/gooseberry.git.git/src/main.rs:6
  25: core::ops::function::FnOnce::call_once::h5382d4da34be7663
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
  26: std::sys_common::backtrace::__rust_begin_short_backtrace::hbc865c9e88802db5
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125
  27: std::rt::lang_start::{{closure}}::h5e0ac3460cf843c2
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:66
  28: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h78040f802d89ccdc
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/ops/function.rs:259
  29: std::panicking::try::do_call::h6853cad536dd09a1
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:379
  30: std::panicking::try::h827495f03a9fbb9a
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:343
  31: std::panic::catch_unwind::h4bdf17571090eb17
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panic.rs:396
  32: std::rt::lang_start_internal::h2f319c33bb013f29
      at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/rt.rs:51
  33: std::rt::lang_start::h3ece3ab7c6568856
      at /home/ngirard/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/rt.rs:65
  34: main<unknown>
      at <unknown source file>:<unknown line>
  35: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  36: _start<unknown>
      at <unknown source file>:<unknown line>
Ninjani commented 3 years ago

Oh! That adds some more information. Could you try hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc? (i.e. without the group)

ngirard commented 3 years ago

Even after adding the API token? There should be an option to add it near the bottom of the page

Dit it. No luck.

ngirard commented 3 years ago

Could you try hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc? (i.e. without the group)

There you are

RUST_BACKTRACE=full hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /home/runner/work/rust-hypothesis/rust-hypothesis/src/cli.rs:226

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
Ninjani commented 3 years ago

Okay! This possibly means that the authorization didn't work at all since this is my output for the same command:

hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc
{"id":"AVRynMV8FtPwhMO7DdSv","created":"2016-05-02T17:55:57.436225Z","updated":"2016-05-02T17:55:57.436237Z","user":"acct:Nicolas_Girard@hypothes.is","uri":"http://dansheffler.com/pdfs/A-Complex-Eternity.pdf","text":"public","tags":[],"group":"__world__","permissions":{"read":["group:__world__"],"delete":["acct:Nicolas_Girard@hypothes.is"],"admin":["acct:Nicolas_Girard@hypothes.is"],"update":["acct:Nicolas_Girard@hypothes.is"]},"target":[{"source":"http://dansheffler.com/pdfs/A-Complex-Eternity.pdf","selector":[{"type":"TextPositionSelector","start":129,"end":162},{"type":"TextQuoteSelector","exact":" the contemporary discussion, the","prefix":"tionship betweenGod and time. In","suffix":" issue is framed between the two"}]}],"links":{"html":"https://hypothes.is/a/AVRynMV8FtPwhMO7DdSv","incontext":"https://hyp.is/AVRynMV8FtPwhMO7DdSv/dansheffler.com/pdfs/A-Complex-Eternity.pdf","json":"https://hypothes.is/api/annotations/AVRynMV8FtPwhMO7DdSv"},"hidden":false,"flagged":false,"references":[],"user_info":{"display_name":null}}

I'm going to search through the official hypothesis API issues to see if this has happened before

ngirard commented 3 years ago

Great, thanks in advance ! Is it worth compiling your hypothesis cli and running it with RUST_BACKTRACE=full ?

Ninjani commented 3 years ago

No, I don't think so as it's failing while parsing the JSON output returned by Hypothesis. One option would be to add a print just above the line and inspect the raw output.

ngirard commented 3 years ago

Alright, could you point me to the right line, please ?

Ninjani commented 3 years ago

That would be line 406 in hypothesis/src/lib.rs - and the variable is text, (i.e.println!("{:?}", text))

ngirard commented 3 years ago

There you are.

../target/debug/hypothesis annotations search --user "acct:Nicolas_Girard@hypothes.is" --search-after "1900-01-01T00:00:00.000Z" --offset 0 --limit 200 --sort updated --order asc > out

Just let me know if I need to reset my API key afterwards.

out.zip

Ninjani commented 3 years ago

Thank you, this is perfect! I'll attempt parsing each annotation with the library and see which one breaks the parser.

Ninjani commented 3 years ago

@ngirard I believe this should be fixed now on the main branch, the issue was that Hypothesis is now using more w3 selectors than I was aware of. Could you try pulling the changes and seeing if everything works? If it does, I'll release a new version.

Just let me know if I need to reset my API key afterwards.

The key isn't exported with the annotations so no need for this

ngirard commented 3 years ago

Yup, working like a charm ! Nice work !

ngirard commented 3 years ago

How about turning that println into a debug printout, just in case ?

Ninjani commented 3 years ago

How about turning that println into a debug printout, just in case ?

Good idea, I'll add it to the error message so it's less cryptic. Glad it's working, thanks for the help! I'll make a new release

Ninjani commented 3 years ago

Added the above fix to the new release (v0.8.0) so I'm closing this issue. @almereyda if your issue is still not fixed please reopen.

daraul commented 1 month ago

I think this problem is back. I tried getting an ST with the command below, but I may need to clone 😄

Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /Users/runner/work/gooseberry/gooseberry/src/gooseberry/mod.rs:168

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   2: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   3: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
redacted@redactedcomputer .task % 

I'm on version 0.10.0, OSX:

redacted@redactedcomputer rs.gooseberry % brew upgrade gooseberry 
==> Downloading https://formulae.brew.sh/api/formula.jws.json
#=#=-#                                                                                 
==> Downloading https://formulae.brew.sh/api/cask.jws.json
#=#=-#                                                                                 
Warning: out-of-cheese-error/gooseberry/gooseberry 0.10.0 already installed
daraul commented 1 month ago

Here's an ST:

(renv) (venv) daraul@computer gooseberry % RUST_BACKTRACE=1 target/debug/gooseberry sync  
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /Users/daraul/Projects/gooseberry/src/gooseberry/mod.rs:168

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::backtrace::libunwind::trace::hd3f2266719f4defd
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/backtrace/libunwind.rs:105
   2: backtrace::backtrace::trace_unsynchronized::hb7037d058da0f4e5
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/backtrace/mod.rs:66
   3: backtrace::backtrace::trace::h3e99c775bae16cd7
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/backtrace/mod.rs:53
   4: backtrace::capture::Backtrace::create::h50c22392d4bff6c7
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/capture.rs:193
   5: backtrace::capture::Backtrace::new::ha2a5c5a9a8f0d4dc
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.71/src/capture.rs:158
   6: color_eyre::config::EyreHook::default::hccb7ade02a569afa
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/color-eyre-0.6.3/src/config.rs:1051
   7: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hd2a05df50ce64866
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/color-eyre-0.6.3/src/config.rs:1101
   8: eyre::capture_handler::h17f74f522b86c599
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/eyre-0.6.12/src/lib.rs:601
   9: eyre::error::<impl eyre::Report>::from_std::h5b2846e68d74da42
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/eyre-0.6.12/src/error.rs:90
  10: eyre::error::<impl core::convert::From<E> for eyre::Report>::from::hff53eab17c257d70
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/eyre-0.6.12/src/error.rs:496
  11: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual::h4eecf8be550d4c49
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/result.rs:1987
  12: gooseberry::gooseberry::Gooseberry::sync::{{closure}}::h4fe5b249e38e1e60
      at /Users/daraul/Projects/gooseberry/src/gooseberry/mod.rs:168
  13: gooseberry::gooseberry::Gooseberry::run::{{closure}}::h6f694e67a13bb964
      at /Users/daraul/Projects/gooseberry/src/gooseberry/mod.rs:89
  14: gooseberry::gooseberry::Gooseberry::start::{{closure}}::h818087d94a5f3c47
      at /Users/daraul/Projects/gooseberry/src/gooseberry/mod.rs:82
  15: gooseberry::main::{{closure}}::h9e46fa90f2d524e1
      at /Users/daraul/Projects/gooseberry/src/main.rs:12
  16: <core::pin::Pin<P> as core::future::future::Future>::poll::h7e6029066fe0fb26
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/future/future.rs:123
  17: tokio::runtime::park::CachedParkThread::block_on::{{closure}}::h3e1aa6b052d0c057
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/park.rs:281
  18: tokio::runtime::coop::with_budget::h85354e136e0b0cdb
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:107
  19: tokio::runtime::coop::budget::h9e167e1a3b314767
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/coop.rs:73
  20: tokio::runtime::park::CachedParkThread::block_on::h70c23278b84b3e8b
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/park.rs:281
  21: tokio::runtime::context::blocking::BlockingRegionGuard::block_on::h4291aabf5d185667
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/blocking.rs:66
  22: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}::hc16f7416c443514c
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/mod.rs:87
  23: tokio::runtime::context::runtime::enter_runtime::h53d141ef4b039e0b
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/context/runtime.rs:65
  24: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h523b213aa698655c
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/scheduler/multi_thread/mod.rs:86
  25: tokio::runtime::runtime::Runtime::block_on_inner::h176e2e47e5e19763
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:363
  26: tokio::runtime::runtime::Runtime::block_on::h103fd7c5dbcdc0ed
      at /Users/daraul/Projects/gooseberry/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.40.0/src/runtime/runtime.rs:333
  27: gooseberry::main::h9407be992aa67272
      at /Users/daraul/Projects/gooseberry/src/main.rs:13
  28: core::ops::function::FnOnce::call_once::h15161f3671704097
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:250
  29: std::sys::backtrace::__rust_begin_short_backtrace::hbef3025f6d0af1b8
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:154
  30: std::rt::lang_start::{{closure}}::h82e2330c53965ab9
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:164
  31: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hf77a1752ba39c45f
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:284
  32: std::panicking::try::do_call::hf02556a6b145ecfc
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:554
  33: std::panicking::try::h2bb23dba91be7e3b
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:518
  34: std::panic::catch_unwind::h1844bc6507215052
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panic.rs:345
  35: std::rt::lang_start_internal::{{closure}}::ha90e2c319598814e
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:143
  36: std::panicking::try::do_call::h7de69f625a47132a
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:554
  37: std::panicking::try::h2198f44c68c232f7
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:518
  38: std::panic::catch_unwind::h40a34eeb64f44ac6
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panic.rs:345
  39: std::rt::lang_start_internal::h9e88109c8deb8787
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:143
  40: std::rt::lang_start::h5582a3e3424c84f0
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/rt.rs:163
  41: _main<unknown>
      at <unknown source file>:<unknown line>
daraul commented 4 weeks ago

@Ninjani do you need a hand? I'd happily contribute, but I don't know where I should focus my attention.

Ninjani commented 3 weeks ago

@daraul thanks! It sounds like the same kind of issue, basically that hypothesis is using a w3 selector that is not yet covered here. They recently added 2 more which I'd already added in 0.10 but can't immediately find another issue like that to see if there's something new.

Do you have an idea of which annotation is causing the issue? Could you try cloning the API repo and searching for that annotation to see what the issue is?

I'll have time in the weekend to take a deeper look.

daraul commented 3 weeks ago

Well I tried syncing with an empty test group and still got the error, so I don't think it's a particular annotation causing the issue, but I could be wrong.

I'll take another stab at it with your reference point and see if I can find the problem.

daraul commented 3 weeks ago

I tried syncing with an empty test group and still got the error

Correction -- this isn't what I was doing! I double checked my configuration, and found that I was syncing against a custom group I had for a while. I'll try searching using the API to see if I can narrow down the problematic annotation. I think you can close this, @Ninjani. Sorry for the bother.

Ninjani commented 3 weeks ago

Would be good to know what the issue is so I can update the API repo to handle the failing annotation!

daraul commented 3 weeks ago

I was able to reproduce the problem in the API repository, at this line. I thought about using a try-catch block to catch the exception, and print something to help me identify the annotation, but my nonexistent rust experience let me down 😆. Do you have any pointers for me?

edit: I was even able to narrow down the exact second that the annotation was created, but have no way to find it's ID because the command below throws the exception:

(renv) daraul@CAMPST-US-CUB1-ST4-PC rust-hypothesis % RUST_BACKTRACE=1 target/debug/hypothesis annotations search --group Ygj1XLy8 --order asc --limit 1 --search-after "2024-10-20T23:49:21.000Z"   
Error: 
   0: Make sure input fields are valid
   1: Status: 
      Reason: 

Location:
   /Users/daraul/Projects/rust-hypothesis/src/cli.rs:223

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 10 frames hidden ⋮                              
  11: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual::h03aa9890b8df2d28
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/result.rs:1987
  12: hypothesis::cli::HypothesisCLI::run::{{closure}}::hb56c7773d120696a
      at /Users/daraul/Projects/rust-hypothesis/src/cli.rs:223
  13: hypothesis::main::{{closure}}::h2e8c6cbe0b2ceeb7
      at /Users/daraul/Projects/rust-hypothesis/src/main.rs:18
  14: tokio::runtime::park::CachedParkThread::block_on::{{closure}}::he8b3903674138e18
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/park.rs:282
  15: tokio::runtime::coop::with_budget::hecf1ebed6731a20a
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/coop.rs:107
  16: tokio::runtime::coop::budget::hfb5efc66cb39efd9
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/coop.rs:73
  17: tokio::runtime::park::CachedParkThread::block_on::hc4518518886f698c
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/park.rs:282
  18: tokio::runtime::context::blocking::BlockingRegionGuard::block_on::h475523aed0b3e7b9
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/context/blocking.rs:66
  19: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}::h71bf32f582e6af67
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/scheduler/multi_thread/mod.rs:87
  20: tokio::runtime::context::runtime::enter_runtime::he3d00f504a4b327e
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/context/runtime.rs:65
  21: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h62797224f1377b61
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/scheduler/multi_thread/mod.rs:86
  22: tokio::runtime::runtime::Runtime::block_on::h9f110dfc093d8242
      at /Users/daraul/Projects/rust-hypothesis/renv/rust/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/runtime/runtime.rs:350
  23: hypothesis::main::hd731662eebcfee5a
      at /Users/daraul/Projects/rust-hypothesis/src/main.rs:19
  24: core::ops::function::FnOnce::call_once::h9f9752a38949306f
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:250
  25: std::sys::backtrace::__rust_begin_short_backtrace::h2ae270baafbba3ec
      at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/sys/backtrace.rs:154
                                ⋮ 12 frames hidden ⋮                              

That doesn't help me much because the hypothesis interface doesn't let me search by the date. Maybe I'll try to do the same query in postman, and see what I get.

daraul commented 3 weeks ago

I think I found the problematic annotation, but the problem doesn't immediately jump out at me. It's below, in case you're able to spot any problems.

{
    "total": 1524,
    "rows": [
        {
            "id": "7WoahI89Ee-hmz8OsW_qzA",
            "created": "2024-10-20T23:49:21.049599+00:00",
            "updated": "2024-10-20T23:49:21.049599+00:00",
            "user": "acct:daraul@hypothes.is",
            "uri": "https://www.youtube.com/watch?v=az0dO6XLXPw",
            "text": "",
            "tags": [],
            "group": "Ygj1XLy8",
            "permissions": {
                "read": [
                    "acct:daraul@hypothes.is"
                ],
                "admin": [
                    "acct:daraul@hypothes.is"
                ],
                "update": [
                    "acct:daraul@hypothes.is"
                ],
                "delete": [
                    "acct:daraul@hypothes.is"
                ]
            },
            "target": [
                {
                    "source": "https://www.youtube.com/watch?v=az0dO6XLXPw",
                    "selector": [
                        {
                            "end": 235.12,
                            "type": "MediaTimeSelector",
                            "start": 228.319
                        },
                        {
                            "type": "RangeSelector",
                            "endOffset": 107,
                            "startOffset": 75,
                            "endContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[36]/p[1]",
                            "startContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[36]/p[1]"
                        },
                        {
                            "end": 3840,
                            "type": "TextPositionSelector",
                            "start": 3808
                        },
                        {
                            "type": "TextQuoteSelector",
                            "exact": "it's like eleven hundred dollars",
                            "prefix": " something that you know i mean ",
                            "suffix": " so i don't i wouldn't expect th"
                        }
                    ]
                }
            ],
            "document": {
                "title": [
                    "How To Test For Low-e Glass (Flame Trick)"
                ]
            },
            "links": {
                "html": "https://hypothes.is/a/7WoahI89Ee-hmz8OsW_qzA",
                "incontext": "https://hyp.is/7WoahI89Ee-hmz8OsW_qzA/www.youtube.com/watch?v=az0dO6XLXPw",
                "json": "https://hypothes.is/api/annotations/7WoahI89Ee-hmz8OsW_qzA"
            },
            "user_info": {
                "display_name": null
            },
            "flagged": false,
            "hidden": false
        }
    ]
}
daraul commented 3 weeks ago

I added the same highlight in my test group, and was able to reliably reproduce the error. I still don't understand what the problem is, though.

{
    "total": 1,
    "rows": [
        {
            "id": "GaOA4JLHEe-BkJdDZpuHbg",
            "created": "2024-10-25T11:48:49.765160+00:00",
            "updated": "2024-10-25T11:48:49.765160+00:00",
            "user": "acct:daraul@hypothes.is",
            "uri": "https://www.youtube.com/watch?v=az0dO6XLXPw",
            "text": "",
            "tags": [],
            "group": "kRg8j7y2",
            "permissions": {
                "read": [
                    "acct:daraul@hypothes.is"
                ],
                "admin": [
                    "acct:daraul@hypothes.is"
                ],
                "update": [
                    "acct:daraul@hypothes.is"
                ],
                "delete": [
                    "acct:daraul@hypothes.is"
                ]
            },
            "target": [
                {
                    "source": "https://www.youtube.com/watch?v=az0dO6XLXPw",
                    "selector": [
                        {
                            "end": 235.12,
                            "type": "MediaTimeSelector",
                            "start": 228.319
                        },
                        {
                            "type": "RangeSelector",
                            "endOffset": 107,
                            "startOffset": 75,
                            "endContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[36]/p[1]",
                            "startContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[36]/p[1]"
                        },
                        {
                            "end": 3840,
                            "type": "TextPositionSelector",
                            "start": 3808
                        },
                        {
                            "type": "TextQuoteSelector",
                            "exact": "it's like eleven hundred dollars",
                            "prefix": " something that you know i mean ",
                            "suffix": " so i don't i wouldn't expect th"
                        }
                    ]
                }
            ],
            "document": {
                "title": [
                    "How To Test For Low-e Glass (Flame Trick)"
                ]
            },
            "links": {
                "html": "https://hypothes.is/a/GaOA4JLHEe-BkJdDZpuHbg",
                "incontext": "https://hyp.is/GaOA4JLHEe-BkJdDZpuHbg/www.youtube.com/watch?v=az0dO6XLXPw",
                "json": "https://hypothes.is/api/annotations/GaOA4JLHEe-BkJdDZpuHbg"
            },
            "user_info": {
                "display_name": null
            },
            "flagged": false,
            "hidden": false
        }
    ]
}
daraul commented 3 weeks ago

Apologies for the spam -- this is the last one: I was able to reproduce the problem again, this time with a random youtube video -- see here. I think you might be able to reproduce on your end by annotating a video on that page. I tried annotating that video on docdrop, and had no issues. Maybe via.hypothes.is has changed since 0.10.0?

{
    "total": 1,
    "rows": [
        {
            "id": "j08ldJLHEe-Y0teiGOsvZg",
            "created": "2024-10-25T11:52:07.187819+00:00",
            "updated": "2024-10-25T11:52:07.187819+00:00",
            "user": "acct:daraul@hypothes.is",
            "uri": "https://www.youtube.com/watch?v=aYyZUDFZTrM",
            "text": "",
            "tags": [],
            "group": "kRg8j7y2",
            "permissions": {
                "read": [
                    "acct:daraul@hypothes.is"
                ],
                "admin": [
                    "acct:daraul@hypothes.is"
                ],
                "update": [
                    "acct:daraul@hypothes.is"
                ],
                "delete": [
                    "acct:daraul@hypothes.is"
                ]
            },
            "target": [
                {
                    "source": "https://www.youtube.com/watch?v=aYyZUDFZTrM",
                    "selector": [
                        {
                            "end": 33.84,
                            "type": "MediaTimeSelector",
                            "start": 28.199
                        },
                        {
                            "type": "RangeSelector",
                            "endOffset": 25,
                            "startOffset": 0,
                            "endContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[6]/p[1]",
                            "startContainer": "/div[1]/div[1]/main[1]/div[2]/div[2]/div[2]/div[1]/div[1]/ul[1]/li[6]/p[1]"
                        },
                        {
                            "end": 601,
                            "type": "TextPositionSelector",
                            "start": 576
                        },
                        {
                            "type": "TextQuoteSelector",
                            "exact": "first glance I was one of",
                            "prefix": "ty terrified of this feature at ",
                            "suffix": " the few survivors of the angula"
                        }
                    ]
                }
            ],
            "document": {
                "title": [
                    "JavaScript framework reinvents itself… Did \"runes\" just ruin Svelte?"
                ]
            },
            "links": {
                "html": "https://hypothes.is/a/j08ldJLHEe-Y0teiGOsvZg",
                "incontext": "https://hyp.is/j08ldJLHEe-Y0teiGOsvZg/www.youtube.com/watch?v=aYyZUDFZTrM",
                "json": "https://hypothes.is/api/annotations/j08ldJLHEe-Y0teiGOsvZg"
            },
            "user_info": {
                "display_name": null
            },
            "flagged": false,
            "hidden": false
        }
    ]
}
Ninjani commented 3 weeks ago

I see the issue! MediaTimeSelector is very likely not a defined selector in the api wrapper library. Can add that in today and release a new version.

Will also comb through the hypothesis repo to see if there's a list of selectors defined and add them all in so it doesn't happen again.

Thanks for the debugging!

daraul commented 3 weeks ago

Updated, and the issue is gone! Thank you!