[GH-ISSUE #5042] [BUG]: Paperless Data Connector - 401 Error after fetching first page of documents #3162

Closed
opened 2026-02-22 18:32:50 -05:00 by yindo · 4 comments
Owner

Originally created by @crypticviper on GitHub (Feb 21, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5042

Originally assigned to: @angelplusultra on GitHub.

How are you running AnythingLLM?

Docker (remote machine)

What happened?

I already had a look at #4753

My issue is that the connector is able to download the first page of documents and then it throws a 401 error for second page. After the error there are literally tens of thousands of "[collector] info: Warning: Ran out of space in font private use area." messages.

Below are the logs.


[collector] info: [Paperless-ngx Loader]: Saving 23.pdf to paperless-paperless.sowino.net-aaca
[collector] info: [Paperless-ngx Loader]: Saving 24.pdf to paperless-paperless.sowino.net-aaca
[collector] info: [Paperless-ngx Loader]: Saving 25.pdf to paperless-paperless.sowino.net-aaca

[backend] info: [TELEMETRY SENT] {
"event": "extension_invoked",
"distinctId": "18126b53-b2ef-463b-a227-0dbb821c7447",
"properties": {
"type": "paperless_ngx",
"runtime": "docker"
}
}
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[collector] info: -- Working Paperless-ngx https://paperless.mydomain.net --
[collector] info: Fetching documents page 1 from Paperless-ngx
[collector] info: Fetching documents page 2 from Paperless-ngx
[collector] error: Error fetching page 2 from Paperless-ngx: Error: Failed to fetch documents from Paperless-ngx: 401
at /app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:43:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PaperlessNgxLoader.fetchAllDocuments (/app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:36:24)
at async PaperlessNgxLoader.load (/app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:15:25)
at async loadPaperlessNgx (/app/collector/utils/extensions/PaperlessNgx/index.js:43:27)
at async /app/collector/extensions/index.js:212:24
[collector] info: Fetched 25 documents from Paperless-ngx (Pages: 1)
[collector] info: Warning: Ran out of space in font private use area.
[collector] info: Warning: Ran out of space in font private use area.
[collector] info: Warning: Ran out of space in font private use area.

Are there known steps to reproduce?

No response

Originally created by @crypticviper on GitHub (Feb 21, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5042 Originally assigned to: @angelplusultra on GitHub. ### How are you running AnythingLLM? Docker (remote machine) ### What happened? I already had a look at #4753 My issue is that the connector is able to download the first page of documents and then it throws a 401 error for second page. After the error there are literally tens of thousands of "[collector] info: Warning: Ran out of space in font private use area." messages. Below are the logs. --- [collector] info: [Paperless-ngx Loader]: Saving 23.pdf to paperless-paperless.sowino.net-aaca [collector] info: [Paperless-ngx Loader]: Saving 24.pdf to paperless-paperless.sowino.net-aaca [collector] info: [Paperless-ngx Loader]: Saving 25.pdf to paperless-paperless.sowino.net-aaca [backend] info: [TELEMETRY SENT] { "event": "extension_invoked", "distinctId": "18126b53-b2ef-463b-a227-0dbb821c7447", "properties": { "type": "paperless_ngx", "runtime": "docker" } } [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [collector] info: -- Working Paperless-ngx https://paperless.mydomain.net -- [collector] info: Fetching documents page 1 from Paperless-ngx [collector] info: Fetching documents page 2 from Paperless-ngx [collector] error: Error fetching page 2 from Paperless-ngx: Error: Failed to fetch documents from Paperless-ngx: 401 at /app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:43:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PaperlessNgxLoader.fetchAllDocuments (/app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:36:24) at async PaperlessNgxLoader.load (/app/collector/utils/extensions/PaperlessNgx/PaperlessNgxLoader/index.js:15:25) at async loadPaperlessNgx (/app/collector/utils/extensions/PaperlessNgx/index.js:43:27) at async /app/collector/extensions/index.js:212:24 [collector] info: Fetched 25 documents from Paperless-ngx (Pages: 1) [collector] info: Warning: Ran out of space in font private use area. [collector] info: Warning: Ran out of space in font private use area. [collector] info: Warning: Ran out of space in font private use area. ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:50 -05:00
yindo changed title from [BUG]: Paperless Data Connector - 401 Error after fetching first page of documents to [GH-ISSUE #5042] [BUG]: Paperless Data Connector - 401 Error after fetching first page of documents 2026-06-05 14:50:40 -04:00
yindo closed this issue 2026-06-05 14:50:40 -04:00
Author
Owner

@timothycarambat commented on GitHub (Feb 23, 2026):

After the error there are literally tens of thousands of "[collector] info: Warning: Ran out of space in font private use area." messages.

This is the just the PDF parser reporting text-library warnings and is totally unrelated and not actually a real issue.

The 401 error is interesting since that is an authorization error - which if the first page works subsequent pages should as well since it is the same credentials.

<!-- gh-comment-id:3946303585 --> @timothycarambat commented on GitHub (Feb 23, 2026): > After the error there are literally tens of thousands of "[collector] info: Warning: Ran out of space in font private use area." messages. This is the just the PDF parser reporting text-library warnings and is totally unrelated and not actually a real issue. The 401 error is interesting since that is an authorization error - which if the first page works subsequent pages should as well since it is the same credentials.
Author
Owner

@angelplusultra commented on GitHub (Feb 23, 2026):

Closing this for now as I was unable to repro the bug. I was able to fetch 4 pages of docs with no 401 errors.

Image
<!-- gh-comment-id:3948031778 --> @angelplusultra commented on GitHub (Feb 23, 2026): Closing this for now as I was unable to repro the bug. I was able to fetch 4 pages of docs with no 401 errors. <img width="1122" height="272" alt="Image" src="https://github.com/user-attachments/assets/cb09cc45-8c56-4a00-a568-db486c2ec52a" />
Author
Owner

@skyglow commented on GitHub (Feb 26, 2026):

I'm writing here because i believe i have the same issue as the topic opener.
the difference is the https and http protocol provided to the extension.

Steps to reproduce
paperless ngx server serving http.
caddy server providing https for the paperless server. certificate is valid and signed by let's encrypt/zerossl.

Issue
connecting by HTTPS downloads only 25 files
connecting by HTTP downloads only 100 files
total amount 450+

seeing the discrepancy between 100 files and 450 i tend to believe there's another problem, atleast in my configuration.

<!-- gh-comment-id:3968995043 --> @skyglow commented on GitHub (Feb 26, 2026): I'm writing here because i believe i have the same issue as the topic opener. the difference is the https and http protocol provided to the extension. Steps to reproduce paperless ngx server serving http. caddy server providing https for the paperless server. certificate is valid and signed by let's encrypt/zerossl. Issue connecting by HTTPS downloads only 25 files connecting by HTTP downloads only 100 files total amount 450+ seeing the discrepancy between 100 files and 450 i tend to believe there's another problem, atleast in my configuration.
Author
Owner

@crypticviper commented on GitHub (Feb 28, 2026):

Update from my end in case someone else comes across this.

My observation is somewhat similar to @skyglow . When I use paperless url that is over a reverse proxy (I use nginxproxymanager) then somehow I get 401 after 1st page. I don't know if and how this can be fixed.

Instead if I point to the paperless docker hostname (http://paperless-docker:8000) then documents get downloaded fine.

@skyglow 100 files error could be because of paperless database reaching max_connections limit. I use mariadb so it had a max connection of 100. I had to increase it to 500 to get it to download all documents. Command for mariadb is shown below.

set global max_connections = 500;

<!-- gh-comment-id:3977266942 --> @crypticviper commented on GitHub (Feb 28, 2026): Update from my end in case someone else comes across this. My observation is somewhat similar to @skyglow . When I use paperless url that is over a reverse proxy (I use nginxproxymanager) then somehow I get 401 after 1st page. I don't know if and how this can be fixed. Instead if I point to the paperless docker hostname (http://paperless-docker:8000) then documents get downloaded fine. @skyglow 100 files error could be because of paperless database reaching max_connections limit. I use mariadb so it had a max connection of 100. I had to increase it to 500 to get it to download all documents. Command for mariadb is shown below. `set global max_connections = 500;`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3162