-
Notifications
You must be signed in to change notification settings - Fork 54
"Could not load documents!" #48
Comments
@thomasbrueggemann just wondering if you maybe had a chance to try this out... latest paperless docker container and latest paperless-desktop release :(. |
Okay, I finally got bothered enough to dig into javascript and electron applications :( Looks like the bug was possibly introduced with PR #45. Seems like the On my local instance I made the file look as follows with this patch file and Paperless-Desktop loads properly 👍 I hope this helps narrow down the issue @NickBusey @thomasbrueggemann. Thanks! From 4169e2803ad2aeb9f6abc10cd718ed43e83edac8 Mon Sep 17 00:00:00 2001
From: Steve Garf <stgarf@gmail.com>
Date: Fri, 8 Mar 2019 05:12:23 -0800
Subject: [PATCH 1/1] Wrap failing statement in try/except block.
---
js/src/components/DocumentItem.js | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/js/src/components/DocumentItem.js b/js/src/components/DocumentItem.js
index 9eef223..dca0da6 100644
--- a/js/src/components/DocumentItem.js
+++ b/js/src/components/DocumentItem.js
@@ -58,13 +58,17 @@ class DocumentItem extends PaperlessComponent {
var tagRegex = /\/([0-9]+)\//;
var tagId = tagRegex.exec(tagUrl)[1];
var tag = tags[tagId];
- return (
- <TagDot
- tag={tag}
- key={"sidebar_tags_" + tag.id}
- setTagFilter={this.props.setTagFilter}
- />
- );
+ try {
+ return (
+ <TagDot
+ tag={tag}
+ key={"sidebar_tags_" + tag.id}
+ setTagFilter={this.props.setTagFilter}
+ />
+ );
+ } catch (err) {
+ console.log("An unknown error has occurred:", err);
+ }
})}
</div>
<small>{moment(this.props.document.created).format("LLLL")}</small>
--
2.17.2 (Apple Git-113) |
Thanks for looking into it, @stgarf . I think the underlying issue here is API changes over time in paperless. Which is perfectly fine. But paperless-desktop has no way to deal with those. Either all users use the same version of paperless - highly unlikely, or we introduce some sort of version detection system. Any contribution is happyly welcome. I am not able to contribute such a feature at the moment, due to my lack of sparetime. |
@thomasbrueggemann Maybe in the future... but for now I'm actually working on the exact opposite of a GUI, paperless-cli 👍. |
Expected Behavior
Expected UI to load up all documents, correspondents, and tags.
Actual Behavior
UI partially loaded the left-side nav bar then presented an error message:
Steps to Reproduce the Problem
ssh -NL 8000:localhost:8000 paperlessuser@192.168.1.47
http://localhost:8000/
Specifications
Here's some output from the debug console:
and (very similar to the last one, except triggered by clicking the documents button)
and
The text was updated successfully, but these errors were encountered: