AnderGoig / SwiftInstagram

Instagram API client written in Swift
https://git.io/vdNAn
MIT License
580 stars 79 forks source link

SwiftInstagram.InstagramError error 0 #26

Closed ryandailey100 closed 6 years ago

ryandailey100 commented 6 years ago

As of today, I keep getting this error message when I call recentMedia(fromUser: "self".... This error was non-existent up until today. Here's what gets printed in the console:

The operation couldn’t be completed. (SwiftInstagram.InstagramError error 0.)

I am still able to login and logout. This error only occurs when I call api.recentMedia(fromUser: "self"....

Another thing to note is that when I enter this link in my web browser "https://api.instagram.com/v1/users/self/media/recent?access_token=MYTOKEN", I am able to get a response from Instagram, which proves it is not a problem on Instagrams end. It is possible that they have slightly changed the response as of today, which might be causing problems with this api, but I am not too sure about that.

UPDATE: After digging in further, I have located where the error occurs. Still not sure why it throws an error. After running line 139 (refer to the image below), the app then catches an error and then runs line 156. Please help me fix this problem, thanks!

screen shot 2018-04-06 at 1 18 31 am
AnderGoig commented 6 years ago

Would you be able to print the error on line 156? Just like this:

print(error)
ryandailey100 commented 6 years ago

Here is what gets printed:

screen shot 2018-04-06 at 12 04 43 pm
AnderGoig commented 6 years ago

Thanks @ryandailey100, I've found the error. There was a problem decoding media with tagged users in the picture. It's fixed now on develop branch, but an update will be released ASAP.

ryandailey100 commented 6 years ago

Thanks so much! Appreciate the quick bug fix 👍