omnivore-app / logseq-omnivore

Logseq plugin to fetch articles and highlights from Omnivore
MIT License
278 stars 15 forks source link

Failed to fetch articles. #110

Closed whereistejas closed 1 year ago

whereistejas commented 1 year ago

Error log:

logseq-omnivore starting sync since: '
index.361155f4.js:6 Error: Index out of bounds
    at $cljs$core$build_subvec$$ (main.js:9609:15)
    at $cljs$core$subvec$$.$cljs$core$IFn$_invoke$arity$3$ (main.js:103011:10)
    at $datascript$query$resolve_pattern_lookup_refs$$ (main.js:31658:32)
    at $datascript$query$_resolve_clause$$.$cljs$core$IFn$_invoke$arity$3$ (main.js:129716:184)
    at $datascript$query$_resolve_clause$$.$cljs$core$IFn$_invoke$arity$2$ (main.js:129559:46)
    at $datascript$query$resolve_clause$$ (main.js:129751:48)
    at $APP.$JSCompiler_prototypeAlias$$.$cljs$core$IReduce$_reduce$arity$3$ (main.js:102582:439)
    at $APP.$cljs$core$reduce$$.$cljs$core$IFn$_invoke$arity$3$ (main.js:96914:212)
    at $datascript$query$_q$$ (main.js:31748:37)
    at $datascript$query$q$$.$cljs$core$IFn$_invoke$arity$variadic$ (main.js:129799:69)
    at $datascript$query$q$$.$cljs$lang$applyTo$ (main.js:129811:15)
    at $APP.$cljs$core$apply$$.$cljs$core$IFn$_invoke$arity$4$ (main.js:98916:125)
    at $logseq$api$datascript_query$$.$cljs$core$IFn$_invoke$arity$variadic$ (main.js:182000:164)
    at Kr.$logseq$api$datascript_query$$ (main.js:181964:41)
    at Kr.Lt (lsplugin.core.js:2:58291)
    at Kr.<anonymous> (lsplugin.core.js:2:94523)
    at a.emit (lsplugin.core.js:2:26980)
    at Vt.<anonymous> (lsplugin.core.js:2:89915)
    at lsplugin.core.js:2:62297
    at Array.forEach (<anonymous>)
    at Vt.listener (lsplugin.core.js:2:62282)
ao @ index.361155f4.js:6
await in ao (async)
loadOmnivore @ index.361155f4.js:6
(anonymous) @ index.361155f4.js:1
index.361155f4.js:6 reset loading state

Config:

{
  "generalSettings": "",
  "apiKey": "buzzzzzzzzzzzzzzzzzzzzzzzzz",
  "filter": "import just highlights",
  "customQuery": "",
  "frequency": "0",
  "graph": "Vault",
  "syncAt": "",
  "highlightOrder": "the location of highlights in the article",
  "isSinglePage": false,
  "pageName": "Omnivore/{{{title}}}",
  "articleTemplate": "[{{{title}}}]({{{omnivoreUrl}}})\ncollapsed:: true\nsite:: {{#siteName}}[{{{siteName}}}]{{/siteName}}({{{originalUrl}}})\n{{#author}}\nauthor:: {{{author}}}\n{{/author}}\n{{#labels.length}}\nlabels:: {{#labels}}[[{{{name}}}]]{{/labels}}\n{{/labels.length}}\ndate-saved:: {{{dateSaved}}}\n{{#datePublished}}\ndate-published:: {{{datePublished}}}\n{{/datePublished}}",
  "highlightTemplate": "> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #[[{{{name}}}]] {{/labels}} {{{dateHighlighted}}}\n\n{{#note.length}}note:: {{{note}}} {{/note.length}}",
  "advancedSettings": "",
  "endpoint": "https://api-prod.omnivore.app/api/graphql",
  "disabled": false,
  "syncJobId": 0,
  "loading": false,
  "version": "v1.12.5"
}

Logseq version: 0.9.6

jacksonh commented 1 year ago

Thanks for reporting @sywhb anything else we'd need to debug this one?

sywhb commented 1 year ago

@jacksonh I probably know the reason. Let me fix this by tomorrow

sywhb commented 1 year ago

Hey @whereistejas , we have fixed this in the latest release v1.13.0.

Please check it out and let me know if it works

whereistejas commented 1 year ago

Hey @whereistejas , we have fixed this in the latest release v1.13.0.

Please check it out and let me know if it works

It works perfectly! We can close this issue, I think?

I had a similar feeling that quotes were causing the issue because the article it was failing on had a name with quotes in it: My Response to Responses to My Critique of "Skepticism"

sywhb commented 1 year ago

Thanks for the feedback @whereistejas

I will close this issue for now