Instagram feed error


#1

Matrix Version: 5.4.7.0

Our Instagram feed component has been working OK until today. It is stuck on a ’ Loading feed…’ message. A look at console shows the following error.

(index):944 Uncaught TypeError: Cannot read property '0' of undefined
    at printInstaFeed ((index):944)
    at XMLHttpRequest.xhr.onreadystatechange ((index):935)

Any ideas on what could have caused this?


(Iain Simmons) #2

I think Instagram was down for quite a while yesterday, but should be fine now:



#3

Our feed is still down, and I’ve noticed the Squiz Instagram Feed on the marketplace is displaying the same error.

https://marketplace.squiz.net/components/instagram-feed/demo

Maybe Instagram have changed something in their API.


(Bart Banda) #4

The Instagram feed component on the marketplace has been updated now to version 1.1.0 to work better with the Instagram API, you can download the new version from https://marketplace.squiz.net/components/instagram-feed


(Nick Papadatos) #5

The marketplace component is now stuck on Loading feed…


(Bart Banda) #6

Hmm, works fine for me

Are you getting any network errors in your console? I wonder if you are viewing the cached version somehow…


(Nick Papadatos) #7

Yes it is weird:
Error msg:
Uncaught TypeError: Cannot read property ‘0’ of undefined
at printInstaFeed (demo:220)
at XMLHttpRequest.xhr.onreadystatechange (demo:211)


#8

I’m still seeing Loading feed… on Marketplace as well.

Have cleared cache and tried multiple browsers.


(Bart Banda) #9

What do you see in the network response for the AJAX call to instagram? Under the response tab specifically as well.


(Lauren) #10

Hi Bart,

We have this error on our Instagram Feed also. I downloaded and tried to install the updated version 1.1.0 component but when I import I get the below errors:

Asset #19652 does not exist [SYS0087]	27 Jan 2021 10:41 am
Warning	Attribute "show_use_default" not found for Asset "metadata_field_text" [SYS0094]	27 Jan 2021 10:41 am
Warning	Action ID "set_Metadata_Field_Text_19647_show_use_default" could not be executed	27 Jan 2021 10:41 am
Warning	Attribute "show_use_default" not found for Asset "metadata_field_select" [SYS0094]	27 Jan 2021 10:41 am
Warning	Action ID "set_Metadata_Field_Select_19648_show_use_default" could not be executed	27 Jan 2021 10:41 am


(Bart Banda) #11

Hey Lauren, you can safely ignore those warnings, they just relate to a feature on metadata fields that is not available on your version of Matrix, shouldn’t affect the template at all.


(Lauren) #12

Brilliant Thanks for the quick reply!


(Lauren) #13

Hi Bart,

I’m sorry to bother you again, but unfortunately, the updated component does not work either.
Also, the demo version available https://marketplace.squiz.net/components/instagram-feed is not working for me either.

The General XHR Request Status I get is 301 and/or 302.

The error is:

demo:220 Uncaught TypeError: Cannot read property '0' of undefined
    at printInstaFeed (demo:220)
    at XMLHttpRequest.xhr.onreadystatechange (demo:211)

I am using Chrome Version 88.0.4324.96 (Official Build) (x86_64) on a Mac.

Any help appreciated. Thanks


(Bart Banda) #14

That’s weird, I still can’t replicate, works fine on my end.

301/302 are redirect headers, which means it’s trying to redirect the request to somewhere else. Is there anywhere in the response headers you can see where it’s trying to redirect you to? What do you see in the Response tab?


(Lauren) #15

Below is what I see on your demo.


(Bart Banda) #16

Thanks Lauren, that’s helpful. Seems like Intagram now redirects some users to a login page if they try and access a public profile (not sure why it does it for some users and not others), see https://www.reddit.com/r/uBlockOrigin/comments/jz5o3f/instagram_links_redirect_to_login_page_anyway_to/ for other reports.

I’ll see if we can update the marketplace component to get the data in a different way and will post an update here afterwards.


(Lauren) #17

Brilliant Thanks Bart


(Nick Papadatos) #18

Hey Bart,

Have you guys removed the instagram component from marketplace due to issues everyone was experiencing?

Cheers
Nick


(Bart Banda) #19

Yes, sorry, forgot to loop back to this one. After further review, it seems that Instagram have changed their policy and restrictions on “scraping” public profiles. It’s no longer possible to do without a developer API key and account, and thus, we’ve had to take down that component from the marketplace for now. Hopefully Instagram will do the same as Facebook and Twitter and allow a free iframe embeddable feed that we might be able to create a component for. In the meantime, you will have to create the same component using your own developer API account and call their REST API to get the data that way. :frowning:


#20

Looks especcially good, bro