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

WebDAV: Files uploaded from PhotoPrism to another server may be incomplete #3310

Closed
Zaczero opened this issue Mar 28, 2023 · 8 comments
Closed
Assignees
Labels
bug Something isn't working easy Easy issue for beginners released Available in the stable release

Comments

@Zaczero
Copy link

Zaczero commented Mar 28, 2023

1. What is not working as documented?

When trying to upload an image directly from PhotoPrism to PhotoPrism (WebDAV) without using SSL or Nginx proxy, the uploaded file is corrupted. Only a small portion of the file is uploaded and there is no error or warning on the uploader side.

2. How can we reproduce it?

Steps to reproduce the behavior:

  1. Setup 2 PhotoPrism instances
  2. Under /library/settings/services configure a one way WebDAV connection (for example to /import/)
  3. Attempt a photo upload from the gallery view at /library/browse
  4. Check the uploaded file size, after some time there will be an index error on the destination instance, because the image is not valid/corrupted

3. What behavior do you expect?

I expect the image to be successfully uploaded without any corruption.

4. What could be the cause of your problem?

It is possible that the issue is related to buffering, as putting PhotoPrism behind an Nginx proxy (with webdav support mod) (which buffers) has solved the issue.

This could be potentially related: #443

5. Can you provide us with example files for testing, error logs, or screenshots?

  • /library/errors: (invalid JPEG format: short Huffman data while decoding)

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: AMD64

(b) Database Type & Version: MariaDB

(c) Operating System Types & Versions: Linux

(d) Browser Types & Versions: Chromium

(e) Ad Blockers, Browser Plugins, and/or Firewall Software?: N/A

7. On what kind of device is PhotoPrism installed?

(a) Device / Processor Type N/A

(b) Physical Memory & Swap Space in GB: N/A

(c) Storage Type: HDD RAID NAS

(d) Anything else that might be helpful to know?: N/A

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

No. Both instances are installed on the same machine and connected with a Docker network.

@Zaczero Zaczero added the bug Something isn't working label Mar 28, 2023
@lastzero
Copy link
Member

Probably an issue with the client library we use. That's why we have updated it. Unfortunately, I can't find any version information in your report. Does it still happen with our development preview?

@lastzero lastzero added needs-analysis Requires further investigation help wanted Well suited for external contributors! labels Mar 28, 2023
@Zaczero
Copy link
Author

Zaczero commented Mar 28, 2023

Oh sorry! I do use the latest version that is available under photoprism/photoprism:latest on dockerhub as of right now.

@Zaczero
Copy link
Author

Zaczero commented Mar 28, 2023

I suppose you would like me to try the :preview (updated 2 hours ago) version and see whether the issue persist?

@lastzero
Copy link
Member

That would be really helpful as a confirmation, so we know it's worth spending time to replace the library.

@lastzero lastzero changed the title Upload PhotoPrism->PhotoPrism results in partial file/broken image WebDAV: Files uploaded from PhotoPrism to another server may be incomplete Mar 28, 2023
lastzero added a commit that referenced this issue Mar 28, 2023


Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero added please-test Ready for acceptance test and removed help wanted Well suited for external contributors! needs-analysis Requires further investigation labels Mar 28, 2023
@lastzero
Copy link
Member

@Zaczero I have replaced the studio-b12/gowebdav client with emersion/go-webdav, which hopefully works better. A new preview image with build ID 230328-f8425652c will be available for testing within the next hour.

Note that I have only tested the upload and download with Nextcloud so far. So it's theoretically possible that there are yet unknown issues with other servers including PhotoPrism itself (although I wouldn't expect that).

I would therefore appreciate it if you and others could help with testing. Thank you very much!

@Zaczero
Copy link
Author

Zaczero commented Mar 28, 2023

I'll test it in some spare time probably tomorrow or in 2 days ~. Thank you for the quick feedback and great support!

lastzero added a commit that referenced this issue Mar 30, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

@Zaczero When we tested it ourselves today, we found that the upload did not work properly. This was because the upload did not start if the remote folder did not exist. Today's preview build 230330-db496c939 fixes this problem. It will be available for testing soon.

@lastzero lastzero added help wanted Well suited for external contributors! easy Easy issue for beginners labels Mar 30, 2023
@lastzero lastzero added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels Apr 1, 2023
@lastzero
Copy link
Member

lastzero commented Apr 1, 2023

I've changed the label to tested as we found no more issues and received no further feedback.

seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@graciousgrey graciousgrey added released Available in the stable release and removed help wanted Well suited for external contributors! tested Changes have been tested successfully labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy Easy issue for beginners released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants