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

Storing contact avatars seems to have changed and broke for certain clients. #1195

Closed
RobertZenz opened this issue Jul 30, 2019 · 16 comments
Closed
Labels
bug Something isn't working

Comments

@RobertZenz
Copy link

I've just noticed that storing the avatar of contacts seems to have changed in the last half year or so. Previously the avatars of contacts where stored like this in the vcf file:

PHOTO;TYPE=PNG;ENCODING=b:AVATAR_IN_BASE64_FOLLOWS

With the latest version (3.1.3) avatars are being stored like this:

PHOTO;VALUE=URI:data:image/png;base64,AVATAR_IN_BASE64_FOLLOWS

This, however, seems to break in certain clients (UBports being one of them) as they will not recognize the avatars.

Was that a consciousness change or did I miss something here?

@RobertZenz RobertZenz added 0. Needs triage bug Something isn't working labels Jul 30, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Jul 31, 2019

Vcard 3 I presume?
Duplicate of #1140

@RobertZenz
Copy link
Author

I just noticed that you can add Nextcloud Mail to the list of application with which avatars have stopped working. The old ones still work fine, all newly assigned ones do not show up in the mail application.

So, this might require a second look as it is not about a third-party application storing avatars differently then contacts expects, but contacts storing it differently then everybody else expects.

@skjnldsv
Copy link
Member

@RobertZenz are the avatar url failing for you?
can you check by appending ?photo to the direct dav url of the problematic vcards? :)

Does it generate any error in your nextcloud logs?

@RobertZenz
Copy link
Author

mail tries to fetch the photo but receives a 404.

How do I retrieve the DAV URL of a single card?

No, there's nothing in the log.

@skjnldsv
Copy link
Member

skjnldsv commented Aug 1, 2019

How do I retrieve the DAV URL of a single card?

this is the download link :)
Instead of clicking you can right click and copy :)

@RobertZenz
Copy link
Author

Okay, that gives me the image (even though it is wrongly named, it's got the name and extension of the vcf file).

@skjnldsv
Copy link
Member

skjnldsv commented Aug 3, 2019

Hum, so loading the image works, but not in contacts?
Can you check if this is a duplicate of #1140 or not?

@skjnldsv skjnldsv reopened this Aug 3, 2019
@RobertZenz
Copy link
Author

No, it works fine in contacts, it doesn't work in mail and other third-party clients in which it used to work.

@skjnldsv
Copy link
Member

skjnldsv commented Aug 3, 2019

So, if it works fine in contacts, what is this issue about? 🙈 😁

@RobertZenz
Copy link
Author

That it used to work fine in all applications, now it doesn't. So something changed in contacts that broke it for these applications. And, actually, all I wanted to know is whether that was a deliberate change along the way or if it was a mistake.

@skjnldsv
Copy link
Member

skjnldsv commented Aug 4, 2019

Aaah, ok
The contacts app doesn't have anything to do with other applications :)
You will have to open dedicated issues on those apps 😉

@skjnldsv skjnldsv closed this as completed Aug 4, 2019
@RobertZenz
Copy link
Author

RobertZenz commented Aug 4, 2019

Okay, I'll try once again: Did you change anything, rather recently, regarding storing of the avatar which might have broken other applications? Like changed the vCard version or the version of the library which you might use?

@skjnldsv
Copy link
Member

skjnldsv commented Aug 5, 2019

Ah! Make more sense, sorry :)
Well, with the 3.x.x version, we are now properly styoring photo exept for some vcard reader on vcard3 versions 🙈
See the mentioned issue above ;)

@RobertZenz
Copy link
Author

RobertZenz commented Aug 26, 2019

Just for your information, this is broken on your end.

I just found the time to do some more tests, and when I replace the "URI" variant of the avatar with the "TYPE PNG" one, everything is working as expected for everyone. The avatars are then also reachable through the web address again, which means that the Nextcloud Mail client can also load and display them again, which has stopped working.

On another note, it's not always stored like that. I created a new contact and set the avatar, it was stored in the "TYPE PNG" variant. However, the card was still of version 3.0, so I'm not sure why that got stored different.

@skjnldsv
Copy link
Member

Yes @RobertZenz you're 100% right
This is what #1140 is all about :)
vcard3 are using a slightly different syntax, and we're not compliant :(

@skjnldsv
Copy link
Member

Fix in #1239

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