Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get API and backend version: X-Version not available #97

Closed
MrBogger opened this issue May 21, 2024 · 7 comments
Closed

Unable to get API and backend version: X-Version not available #97

MrBogger opened this issue May 21, 2024 · 7 comments
Labels
bug Something isn't working
Milestone

Comments

@MrBogger
Copy link

MrBogger commented May 21, 2024

Good morning,
Recently installed Paperless-ngx 2.8.6 which is now up and running. Downloaded Swift Paperless 1.1.1 this morning and set up Paperless behind IIS Reverse Proxy on Windows Server 2022 21H2 through Docker. Browser Web Version working with no issues on http:// or https://. I have also downloaded PaperParrot & Less Paper and they both seem to be communicating with my Paperless Server.

Swift-Paperless logs into my Paperless instance ok with Super User access but any time I try and do something, it says:
"An Unexpected Error occurred". "The operation couldn't be completed. (swift_paperless.(unknown context at $100fa9190).RequestError error 0.) .

Reading through the logs there seems to be a "Unable to get API and backend version: X-Version not available" error which occurs at each App startup.

I've attached the logs from Swift-Paperless below along with Docker Configuration. There are no corresponding Log Entries from Paperless-ngx when the error occurs on the iOS App. Please let me know if there's any further information you need. Thanks for your efforts on the app by the way too.

Docker Version.txt
docker-compose.env.txt
docker-compose.yml.txt
Swift-Paperless http log.txt
Swift-Paperless https log.txt
.

@paulgessinger
Copy link
Owner

paulgessinger commented May 21, 2024

Hey! Would you mind trying this on the TestFlight beta, and sending logs from there?

The version problem is unexpected, this is usually some issue with the networking in the app, the decoding error could be related or could be something else.

I also see some 403s in the log: could you check if the logged in user has the permission to view all of the document organization aspects, like document types etc?

@MrBogger
Copy link
Author

MrBogger commented May 21, 2024

Hi Paul,
Thanks for getting back to me quickly. I'm not invited to Test Flight yet. I'll try on my other phone as soon as I can download it. The user I was using in both examples was set to Super User and I was using the same user in the other Apps.

I have just tried to login through LAN (http) instead of WAN and it works. Externally still not working. I'm guessing there is an issue with me running IIS 10 as a Reverse Proxy which isn't the norm these days anyway. I'm happy to keep trying to diagnose with you if you feel it's worth the effort as I don't have any issues with running Paperless Web, the other iOS apps and my *arr stack through IIS.

Switft-Paperless LAN.txt ( 4:36 is where I logged in on LAN)

@paulgessinger
Copy link
Owner

The TestFlight is available with this link: https://testflight.apple.com/join/bOpOdzwL

It would definitely interesting to find out why it doesn't work, in principle the other apps shouldn't do anything substantially different from mine.

So you're saying it does work connected locally, but not through the reverse proxy? Do you use standard login or anything special?

So far the only 403s that I've seen are the ones from permissions errors, but maybe IIS sends them for whatever reason?

@MrBogger
Copy link
Author

Hey Paul,

Seems to be the same situation with TestFlight. Works on LAN but not WAN.

I did some digging through Firefox and eventually found I didn't have the WebSocket package installed in IIS as my Radarr was working but coming up with ws:// and wss:// errors. Since installing the WebSockets, Radarr is connecting fine through the proxy but still errors on Paperless.

  • [signalR] Information: WebSocket connected to wss://xxx.xxx.org/radarr/signalr/messages?access_token

  • Firefox can’t establish a connection to the server at wss://xxx.xxx.org/paperless/ws/status/.

However, I still get the same error from using Firefox on the PC running Docker so there may be an underlying issue with either my Docker install or Paperless itself:

  • Firefox can’t establish a connection to the server at ws://localhost:8050/paperless/ws/status/.

Swift-Paperless Test Flight.txt
(First attempted login was WAN and next login was LAN)

Firefox Console LAN.txt
Firefox Console WAN.txt

@paulgessinger
Copy link
Owner

Ah, I think it might be that installations under a sub-path are not currently supported. That's something that I'll need to add urgently, it seems.

The app currently does not use websockets at all, and in fact, it can't do so using the token authentication mechanism anyway.

@paulgessinger
Copy link
Owner

Ok, managed to test this now, and I think I might have a fix. Can you update your TestFlight install to build 78, and try again?

@paulgessinger paulgessinger added this to the v1.2.0 milestone May 21, 2024
@paulgessinger paulgessinger added the bug Something isn't working label May 21, 2024
@MrBogger
Copy link
Author

Hi Paul,

Working 100% through domain and proxy with sub path. Thank you.

logs.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants