oorestisime / gatsby-source-instagram

Create nodes from instagram posts hashtags and profiles

Home Page:https://gatsby-src-instagram.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not fetch instagram posts. Error status TypeError: Cannot read property 'user' of undefined

mcljs opened this issue · comments

image
Hello everyone today, in the morning I installed the gatsby-source-instagram plugin and it helped me, when I go to make other changes right now at night it no longer grabs me, I get this and it has not succeeded in grabbing my nodes. Somebody could help me?

just got the same error in CI, was just rebuilding ( same build 4 days ago went OK )

Fails here on Netlify too, works good enough locally.
(EDIT) It started failing on local too soon after.

Got this to work somehow, using the token from FB Dev Portal (the Insta Graph API solution in the doc somewhere)

failed with error:

error There was an error in your GraphQL query:

Cannot query field "allInstaNode" on type "Query".

If you don't expect "allInstaNode" to exist on the type "Query" it is most likely a typo.
However, if you expect "allInstaNode" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "allInstaNode" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add at least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Query":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
failed extract queries from components - 4.011s

same. strange fail. like 10% works, 90% fails

Same error here, too.

There was an error in your GraphQL query:

Cannot query field "allInstaNode" on type "Query".

If you don't expect "allInstaNode" to exist on the type "Query" it is most likely a typo.
However, if you expect "allInstaNode" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "allInstaNode" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add at least one entry with that field ("dummy content")        

It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "Query":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: src\components\InstagramFeed.js:10:9

failed extract queries from components - 0.711s

Was working fine on last publish in February.

Having the same issues, tried a local fix by forking and upgrading peer dependencies to Gatsby 3 but still getting allInstaNode cannot query failure.

Code checks out on the project, and as to why the failure comes up randomly after no changes is beyond me. Works with web scraping 1% of the time as of the past few weeks.

EDIT:
Found a temp fix locally.

  1. run gatsby clean
  2. delete node_modules dir
  3. run yarn install && gatsby develop

Should pass temporarily locally. After a few start ups you may have to repeat the process, but this has worked for me and might not for you. Netlify Prod still gives allInstaNode failure though.

I've got the same issue. Tried with Gatsby 3 with no luck...

I'm experiencing the same issue. The request is returning HTML for the Instagram login page, rather than JSON. Looks like it's because Instagram is blacklisting IPs:
https://stackoverflow.com/questions/64021222/instagram-a-1-query-why-do-i-get-login-page-instead-of-json
https://stackoverflow.com/questions/57624387/dont-have-profilepage-index-but-i-have-loginandsignuppage/57722553#57722553

Got this to work somehow, using the token from FB Dev Portal (the Insta Graph API solution in the doc somewhere)

This is working fine whenever I deploy from Netlify using the API token of course. It's yet to fail. Here are my latest builds for https://bio.lkup.cf
https://app.netlify.com/sites/lkup/deploys/608d02d36e4006e925bc1e76
https://app.netlify.com/sites/lkup/deploys/6083cd58717a68c87016639d

Got this to work somehow, using the token from FB Dev Portal (the Insta Graph API solution in the doc somewhere)

This is working fine whenever I deploy from Netlify using the API token of course. It's yet to fail. Here are my latest builds for https://bio.lkup.cf
https://app.netlify.com/sites/lkup/deploys/608d02d36e4006e925bc1e76
https://app.netlify.com/sites/lkup/deploys/6083cd58717a68c87016639d

few weeks ago I ended up doing the same thing. but it would be great without token coz this token expires every 60 days(i can't get my head around how to auto renew it with no server - static sites)

also, most basic websites getting the most recent post is more than enough(so public scraping should be enough), implementing it with instagram token gives you more things you can do

I'm getting the same issue locally - it certainly looks like it is Instagram blocking the request as it works for me when going via a VPN.

It looks like i'll have to move over to using the tokens, which I was hoping to avoid as the FB development center is pretty clunky...

For me I get the same issue when trying to fetch locally via VPN.