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

Failed to load entries: API_ERROR: Not Found #1741

Closed
TylerBarnes opened this issue Sep 11, 2018 · 16 comments
Closed

Failed to load entries: API_ERROR: Not Found #1741

TylerBarnes opened this issue Sep 11, 2018 · 16 comments

Comments

@TylerBarnes
Copy link

Describe the bug

I'm running a gatsby v2 site hosted on netlify. I'm able to build and deploy the site and I'm able to login to the cms. I get the error "Failed to load entries: API_ERROR: Not Found" when I log in though and none of the collection items show up even though there are markdown files that work on the front end of the site.

To Reproduce

I'm not sure really.
Expected behavior

I login and see all the collection items and can edit them.
Screenshots

Applicable Versions:

  • Netlify CMS version: 2.1.1
  • Git provider: Gitlab
  • OS: MacOs 10.13
  • Browser version: Chrome 69
  • Node.JS version:

CMS configuration

backend:
name: git-gateway
branch: master

media_folder: static/img
public_folder: /img

collections:

  • name: "blog"
    label: "Blog"
    folder: "src/pages/blog"
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:

    • {label: "Template Key", name: "templateKey", widget: "hidden", default: "blog-post"}
    • {label: "Title", name: "title", widget: "string"}
    • {label: "Publish Date", name: "date", widget: "datetime"}
    • {label: "Description", name: "description", widget: "text"}
    • {label: "Body", name: "body", widget: "markdown"}
    • {label: "Tags", name: "tags", widget: "list"}
  • name: "pages"
    label: "Pages"
    files:

    • file: "src/pages/about/index.md"
      label: "About"
      name: "about"
      fields:
      • {label: "Template Key", name: "templateKey", widget: "hidden", default: "about-page"}
      • {label: "Title", name: "title", widget: "string"}
      • {label: "Body", name: "body", widget: "markdown"}
    • file: "src/pages/products/index.md"
      label: "Products Page"
      name: "products"
      fields:
      • {label: "Template Key", name: "templateKey", widget: "hidden", default: "product-page"}
      • {label: Title, name: title, widget: string}
      • {label: Image, name: image, widget: image}
      • {label: Heading, name: heading, widget: string}
      • {label: Description, name: description, widget: string}
      • {label: Intro, name: intro, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Blurbs, name: blurbs, widget: list, fields: [{label: Image, name: image, widget: image}, {label: Text, name: text, widget: text}]}]}
      • {label: Main, name: main, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: text}, {label: Image1, name: image1, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image2, name: image2, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}, {label: Image3, name: image3, widget: object, fields: [{label: Image, name: image, widget: image}, {label: Alt, name: alt, widget: string}]}]}
      • {label: Testimonials, name: testimonials, widget: list, fields: [{label: Quote, name: quote, widget: string}, {label: Author, name: author, widget: string}]}
      • {label: Full_image, name: full_image, widget: image}
      • {label: Pricing, name: pricing, widget: object, fields: [{label: Heading, name: heading, widget: string}, {label: Description, name: description, widget: string}, {label: Plans, name: plans, widget: list, fields: [{label: Plan, name: plan, widget: string}, {label: Price, name: price, widget: string}, {label: Description, name: description, widget: string}, {label: Items, name: items, widget: list}]}]}

Additional context

@TylerBarnes
Copy link
Author

Of course I immediately solved this after posting this issue!
I had to go to netlify.com -> site settings -> services and then click enable git gateway.

A better error message would be helpful in this case.

@papandreou
Copy link
Contributor

Related to #1695 -- but since that landed in time for 2.1.0 it appears that it did not fix this instance.

@tech4him1
Copy link
Contributor

We'll probably need to port #1209 and #1295 over to GitLab (and BitBucket). Maybe we can just pull it to the top-level implementation.js file.

I'll assign this to myself unless somebody else wants it.

@imcodingideas
Copy link

@TylerBarnes where do you see: services? I cannot find the enable git gateway setting

@tomrutgers
Copy link
Contributor

@imcodingideas You can find enable git gateway under settings > identity
app.netlify.com/sites/your-site-name/settings/identity

@alexislg2
Copy link

It is written "Netlify’s Git Gateway service currently supports GitHub and GitLab repositories connected to Netlify for Continuous Deployment. Repositories in Bitbucket are not yet supported by this feature."

Does this mean we cannot use netlify CMS with bitbucket?

@tomrutgers
Copy link
Contributor

@alexislg2 Git gateway allows your users to log in to the CMS with their email address and password instead of a git account of some sort. You can still log in to the CMS with a bitbucket account.

@jderdock
Copy link

jderdock commented Nov 1, 2018

I'm also receiving this error message after logging in to /admin/ with Bitbucket credentials:

Failed to load entries: API_ERROR: Expected an ok response, but received an error status: 404.

@McGern
Copy link

McGern commented Nov 4, 2018

I'm getting this error as well. Followed this tutorial
https://www.gatsbyjs.org/docs/sourcing-from-netlify-cms/
with
https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider

Found this bug issue report and followed the details for "enable git gateway". Still get the error. Not sure what to do now. The "enable git gateway" also has some api key mentioned, but not entirely sure where this is coming from (is it the one that is created in git?)

Thanks

@erquhart
Copy link
Contributor

erquhart commented Nov 5, 2018

If someone can provide access to a repo and open sign ups in your Netlify Identity settings for a site with this issue, that would allow us to see it first hand.

@endverbraucher
Copy link

I did have the same problem. It seems that this happens when the collection is empty, which is a little bit confusing. I published one collection item an the error message was gone! :)

@erquhart
Copy link
Contributor

This issue is becoming a bit of a catch all - please reach out in chat or open a new issue with steps to reproduce if you're stuck on this error.

@jlabs
Copy link

jlabs commented Sep 20, 2019

@imcodingideas You can find enable git gateway under settings > identity
app.netlify.com/sites/your-site-name/settings/identity

This worked for me - for anyone with the same issue in 2019. I was getting the error:
Failed to load entry: API_ERROR: Not Found
... just by logging in to the Netlify CMS plugin for Gridsome. I had no other config in place, just using the default options provided in the Gridsome guide.

@MelMacaluso
Copy link

I did have the same problem. It seems that this happens when the collection is empty, which is a little bit confusing. I published one collection item an the error message was gone! :)

This was the case for me as well. Make sure you have something in the collection itself.

papan01 pushed a commit to papan01/gatsby-starter-papan01 that referenced this issue Dec 20, 2019
@KashafS98
Copy link

KashafS98 commented May 12, 2021

I had this issue for quite sometime, and when it was solved locally, it didn't work in production.

  1. One silly mistake i had done was that i did not update the branch name in config.yml.

name: bitbucket
repo: Kashaf98/dmc-insights
branch: master # Branch to update (optional; defaults to master)
app_id: ASZxhFY4FeqxdTksjn
auth_type: implicit

  1. The second thing, which isn't mentioned in the netlify docs is that you need to add BitBucket to your site's OAuth settings:
    bit-netlify
    To do this, go to your site settings in netlify > Access Control > Install Provider > then add the client key and secret you generated from BitBucket workspace here. This worked for me!

Had a good roller coaster ride trying to integrate with BitBucket, whereas with github it had taken hardly 2 hours. I think I'll contribute to the docs and see if it can be made better

@cobbie
Copy link

cobbie commented Jul 29, 2022

I did have the same problem. It seems that this happens when the collection is empty, which is a little bit confusing. I published one collection item an the error message was gone! :)

Encountered the same issue, which I feel is really bad UX for users managing the content. Can this issue be resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests