IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

Bug: Error uploading non-HEIC photos from Photos library

Open patternflux opened this issue 2 years ago • 3 comments
trafficstars

Steps: Tap new post icon>tap image icon>select photo>Error uploading alert.

I have a variety of jpeg photos taken with my DSLR in my Apple Photo library, and they consistently will not upload when attempting to create a new post.

iOS: 16.2 IPhone: iPhone 12 Pro App Version 1.0.7

patternflux avatar Jan 22 '23 18:01 patternflux

Can you try from the share sheet? Also could you give me the format? Is it just a .jpeg? Does it works on other client?

https://developer.apple.com/documentation/uniformtypeidentifiers/uttype

Dimillian avatar Jan 22 '23 19:01 Dimillian

Share sheet uploading is not working. .png images do work. The .jpeg images do upload in different Mastadon clients

Grayson

On Sun, Jan 22, 2023 at 2:27 PM, Thomas Ricouard @.***> wrote:

Can you try from the share sheet? Also could you give me the format? Is it just a .jpeg? Does it works on other client?

https://developer.apple.com/documentation/uniformtypeidentifiers/uttype

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

patternflux avatar Jan 22 '23 19:01 patternflux

I experience a similar issue. I have imported a series of JPEG images into Apple Photos, originally from my Nikon D800E. I consistently get an upload error. I have no issue uploading the same images using the Mastodon app.

adventure-tense avatar Jan 29 '23 04:01 adventure-tense

Well I actually have the same issue with RAW images taken from my iPhone 12 Pro (I'm always shooting using RAW).

zoc avatar Mar 10 '23 08:03 zoc

I wonder if it's because the image is too big or somehow the format is erroring on Ice Cubes. Could you upload the same file here so I can test?

Dimillian avatar Mar 10 '23 09:03 Dimillian

Sure I'll do as soon as I'm back home (I want to make sure to upload the original file, so I'll do that from my Mac instead of using the phone)

I can also try to debug it myself even if I have little experience in swift (but almost 20 years in software development 😉)

zoc avatar Mar 10 '23 09:03 zoc

That would be nice :) The process before uploading is done there: https://github.com/Dimillian/IceCubesApp/blob/main/Packages/Status/Sources/Status/Editor/StatusEditorViewModel.swift#LL594C20-L594C20 Could be that the image is too big. And I didn't found the right formula yet to resize / reduce the image.

Dimillian avatar Mar 10 '23 10:03 Dimillian

Yeah I already noticed this upload function this morning when looking a bit at the code. I'll try to have a look this WE if wife and kid permit it ;). In the mean time, the image is attached here just in case you want to reproduce. IMG_0487.DNG.zip

zoc avatar Mar 10 '23 11:03 zoc

So it works for me, I downloaded it, unzip in files, then save image to photos. Then I can upload it from the in app photo picker. There is indeed a problem with the share sheet.

Dimillian avatar Mar 10 '23 14:03 Dimillian

Problem solved. Stay tuned.

Dimillian avatar Mar 10 '23 15:03 Dimillian

Strange it worked for you... I'll stay tuned for a new version I guess ? Then if it happens again I'll debug it myself and post the result here. Might be my self-hosted Mastodon instance causing this (I'm using docker, which is I think not really recommended anymore by the Mastodon team).

zoc avatar Mar 10 '23 17:03 zoc

I did two things:

  • Allow upload from the files applications.
  • And smarter image compression

Let me know.

Dimillian avatar Mar 10 '23 17:03 Dimillian

~~Ok, so, just got the latest commits from main, compiled app for Mac, tried to import same image: Same issue. I'll debug it ASAP.~~

Edit: Ok, seems that after auth macOS starts the regular AppStore version of the app instead of returning back to the version started from Xcode... How do you usually debug ?

zoc avatar Mar 11 '23 08:03 zoc

Delete the store version

Dimillian avatar Mar 11 '23 10:03 Dimillian

Made even more adjustments to compression before uploading. Now if it's not working it should just be about the file type being not handled.

Dimillian avatar Mar 11 '23 12:03 Dimillian

What you can do too is open activity monitor, search for icecubes and kill all the process. Most of the time you can't launch with Xcode because the notifications extension is running even if the app is killed

Dimillian avatar Mar 11 '23 12:03 Dimillian

Ok, fixed for me with current main. Actually not sure the issue was IceCubes, I also discovered that my nginx proxy configuration was slightly different from the recommended one.

Anyway, thanks @Dimillian for the quick support here, as usual 👍

zoc avatar Mar 11 '23 13:03 zoc