I am trying to reason about or understand better with an error I am getting when showing a notification with an image url on an iOS app.
I have an app that upload a file attaching to a post and show it on web/mobile.
From web, it works just fine all around. uploading/showing the image on notifications also works fine.
On mobile (iOS RN), it shows this error and image is not showing up.
Both image urls are publicly available (attached at the bottom) and you can open them just fine with browser / in-app as well.
The error message that I get is this
2024-01-18 22:43:21.246110-0800 TtoPet73[18769:26124771] NotifeeCore: An error occurred whilst trying to resolve an attachment {
id = kZFIElNv0spdgpNaxURR;
thumbnailHidden = 0;
url = "https://storage.googleapis.com/ttopet-uploads/uploads/thumbnail_hello_755c44ce00/thumbnail_hello_755c44ce00.jpeg";
}: Error Domain=UNErrorDomain Code=101 "Unrecognized attachment file type" UserInfo={NSLocalizedDescription=Unrecognized attachment file type}
Uploaded from mobile (not working for notification)
https://storage.googleapis.com/ttopet-uploads/uploads/thumbnail_hello_755c44ce00/thumbnail_hello_755c44ce00.jpeg
Uploaded from web (WORKS)
https://storage.googleapis.com/ttopet-uploads/uploads/thumbnail_from_web_82e2a57d61/thumbnail_from_web_82e2a57d61.jpg
I looked at the notifiee code and spot the location that error is from.
Hey guys,
I am trying to reason about or understand better with an error I am getting when showing a notification with an image url on an iOS app.
I have an app that upload a file attaching to a post and show it on web/mobile.
From web, it works just fine all around. uploading/showing the image on notifications also works fine. On mobile (iOS RN), it shows this error and image is not showing up.
Both image urls are publicly available (attached at the bottom) and you can open them just fine with browser / in-app as well.
The error message that I get is this
How I show notifications in RN
The images. They are from the same image files.
https://storage.googleapis.com/ttopet-uploads/uploads/thumbnail_hello_755c44ce00/thumbnail_hello_755c44ce00.jpeg
https://storage.googleapis.com/ttopet-uploads/uploads/thumbnail_from_web_82e2a57d61/thumbnail_from_web_82e2a57d61.jpg
I looked at the notifiee code and spot the location that error is from.
https://github.com/invertase/notifee/blob/main/ios/NotifeeCore/NotifeeCoreUtil.m#L159-L167 But I don't know how to continue investigation from here.
Unrecognized attachment file type
And this could be related to type defined here. I've tried some values from here but no luck. https://developer.apple.com/documentation/usernotifications/unnotificationattachment#1682051Any insights, thoughts or direction would be appreciated.
Thanks