-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Netlify CMS address printed in console redirects to gatsby development 404 page #6688
Comments
I'm having the same issue, except the workaround doesn't work either. It was working for a bit but now it isn't. Might be related to cache/offline stuff. |
@kennedyrose Does your console show anything different after you could no longer access it from the index.html url? The only time I have trouble accessing it that way is if there was a compile issue with netlify CMS. |
@giraffesyo Hi, for me the solution was installing |
@qhoekman That being said, you can access the admin panel by accessing |
This is fixed in #7355, it was caused by a bug introduced in #7268 Edit: to clarify why this was happening, #7268 made it so that the 404 page was loaded if a page couldn't be found by Gatsby - however, this meant that 404 pages would be displayed for all static pages. Once #7355 is merged, the new behaviour should be that if a page can't be found, instead of showing a 404, an attempt will be made to load it directly first. However, I'm a bit confused as to why this is happening considering you haven't got any service workers on the site - @giraffesyo please could you try cloning from https://github.com/davidbailey00/gatsby/tree/fix-offline-issues and developing with |
I'm still getting the gatsby 404 page when trying to visit I can get to the admin page using the second part of workaround described by iraffesyo
However I can't get to the admin page using http://localhost:8000/admin/index.html My environment -
I'm using the gatsby-plugin-netlify-cms in gatsby-config.js |
@alastairkitchen It sounds like you're trying to navigate to the admin page via a If my assumption is wrong, then please can you open dev tools -> Application -> Clear storage and check if there are any service workers present? Maybe you've ended up with an old version of gatsby-plugin-offline on your local dev environment. If so, pressing "Clear site data" should fix the issue. |
@davidbailey00 I'm having the same problem as @alastairkitchen . Running I tried cloning the example repo https://github.com/erquhart/gatsby-netlify-cms-example as listed in https://www.gatsbyjs.org/docs/sourcing-from-netlify-cms/ which works, but it's running older versions of both Gatbsy and NetlifyCMS. Maybe this is unrelated to the original issue, but since the discussion is ongoing here I figured I'd post here. |
@davidbailey00 thanks for the speedy reply 👍 I tried clearing site data in dev tools > application and i'm still having issues getting the /admin (still showing the gatsby 404 page) there is a netlify service worker running which had an error symbol beside the source file, i clicked on the source file which brings up the following console errors |
I also am having a similar problem after updating gatsbyjs to latest. However the workaround of using This is reproducible by cloning https://github.com/netlify-templates/gatsby-starter-netlify-cms and doing a Nothing super exciting in the console for that page: My environment info: |
@davidbailey00 I believe the issue started on v2.1.23. When I pin gatsby to 2.1.22, it works. Git bisect surfaced 9835f56 as the culprit. It seems to make sense considering considering Edit: Confirmed changing 9835f56#diff-346c3005d97c1ca0b5efb170af1b43f6R151 back to |
Closing the loop on this in case somebody comes here again. This was fixed by #12474 |
Description
Navigating to
http://localhost:8000/admin/
displays the gatsby 404 development page even though a page exists athttp://localhost:9000/admin/index.html
. We discussed this in gitter here: https://gitter.im/netlify/NetlifyCMS?at=5b565bd1c86c4f0b472cb5a9Note: This does seem to be windows specific, because on my Mac it does not happen (both in Chrome)
(tagging @erquhart)
Steps to reproduce
gatsby new my-default-project https://github.com/gatsbyjs/gatsby-starter-default#v2
yarn add netlify-cms@^1.9.3 gatsby-plugin-netlify-cms@next
gatsby-plugin-netlify-cms
to yourgatsby-config.js
plugins array.gatsby develop
http://localhost:8000/admin/
or
gatsby develop
http://localhost:8000/admin/
Expected result
The Netlify CMS index page should be displayed.
Note: Without making a config file for the cms you should receive an error that says the following, it is irrelevant since we're not interested in actually setting it up for demonstrating the issue here:
Actual result
The Gatsby development 404 page is displayed instead.
Workaround
Navigate to http://localhost:8000/admin/index.html and you will be able to access the content manager. Note that this issue also does not happen on production versions of the site e.g. if you run
gatsby build
thengatsby serve
you will not experience this issue when navigation to http://localhost:9000/admin/Environment
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
Binaries:
Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 41.16299.547.0
npmPackages:
gatsby: next => 2.0.0-beta.55
gatsby-plugin-netlify-cms: ^2.0.0-beta.7 => 2.0.0-beta.7
gatsby-plugin-react-helmet: next => 3.0.0-beta.4
The text was updated successfully, but these errors were encountered: