Closed amankkg closed 4 years ago
Hm, seems like there is another problem with GraphQL schema being not available in GraphiQL page on 2.24.9
Hi @amankkg !
Sorry to hear you're running into an issue. The only PR published between 2.24.9 and 2.24.10 is https://github.com/gatsbyjs/gatsby/pull/25815
It can be the culprit. But the problem is that I couldn't reproduce the issue on a fresh project (based on the hello-world starter). So we need your help.
It is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 💜
OK, will do it later
I has Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to stopped service "waitingMachine" in terminal after some hot reloads.
Found this xstate issue and set ... "resolution": { "xstate": "4.9.1" } ...
in package.json and after it worked without this error, but reloading took long time sometimes.
Reverting to "gatsby@2.24.9" actually works better.
I am experiencing the same thing, with both editing jsx and styles. not related to any graphql stuff for me
I tried downgrading to npm i gatsby@2.24.9
but it appears to not fix the problem for me. also, this problem is occurring for me across multiple gatsby projects on multiple computers. the hot reloading might work like 1 out of 5 times I save.
edit: i feel like this problem started recently, about roughly a month ago
Can somebody who is experiencing the hot reload issue run gatsby develop
with the --verbose
flag and post the output. A minimal reproduction would still be ideal though.
@theskillwithin If it's broken in older versions then this is probably a different problem. This is almost certainly related to the webpack state machine changes in 2.24.9. Can you create a minimal reproduction and open a new issue please.
Found this xstate issue and set
... "resolution": { "xstate": "4.9.1" } ...
in package.json and after it worked without this error, but reloading took long time sometimes.
@LyulyaevMaxim We don't use the React integrations, so it is unlikely to be that issue. It might be perhaps some other bug introduced in xstate, but resolving to 4.9.1 will have other issues because we use the newer syntax for transient transitions that aren't supported in that version.
Hi @ascorbic, here is the output of gatsby develop
with the --verbose
flag. Gatsby CLI version: 2.8.14 and Gatsby version: 2.24.23.
verbose set gatsby_executing_command: "develop"
verbose loading local command from: /Users/xxxxx/vap/node_modules/gatsby/dist/commands/develop.js
verbose running command: develop
verbose Transition to "initializing"
success open and validate gatsby-configs - 0.060s
success load plugins - 0.545s
success onPreInit - 0.006s
success initialize cache - 0.005s
success copy gatsby files - 0.047s
success onPreBootstrap - 0.009s
verbose Transition to "initializingData"
success createSchemaCustomization - 0.097s
verbose Transition to "initializingData" > "sourcingNodes"
verbose Now have 984 nodes with 10 types: [SitePage:1, SitePlugin:40, Site:1, SiteBuildMetadata:1, Directory:27,
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 0 changed pages
success Checking for changed pages - 0.006s
success source and transform nodes - 0.562s
verbose Transition to "initializingData" > "buildingSchema"
success building schema - 4.786s
verbose Transition to "initializingData" > "creatingPages"
verbose Now have 1084 nodes with 10 types, and 101 SitePage nodes
success createPages - 0.233s
verbose Checking for deleted pages
verbose Deleted 0 pages
verbose Found 100 changed pages
success Checking for changed pages - 0.003s
verbose Transition to "initializingData" > "creatingPagesStatefully"
success createPagesStatefully - 0.052s
verbose Transition to "initializingData" > "rebuildingSchemaWithSitePage"
success update schema - 0.061s
verbose Transition to "initializingData" > "writingOutRedirects"
success write out redirect data - 0.003s
verbose Transition to "initializingData" > "done"
verbose Transition to "runningPostBootstrap"
success Build manifest and related icons - 0.002s
success onPostBootstrap - 0.010s
info bootstrap finished - 8.881s
verbose Transition to "runningQueries"
success onPreExtractQueries - 0.004s
success extract queries from components - 0.405s
verbose Transition to "runningQueries" > "writingRequires"
success write out requires - 0.027s
verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
verbose Transition to "runningQueries" > "runningPageQueries"
success run page queries - 0.028s - 1/1 35.35/s
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "startingDevServers"
⠀
You can now view gatsby-starter-default in the browser.
⠀
http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 4.460s
verbose Transition to "waiting"
verbose Transition to "waiting" > "aggregatingFileChanges"
info changed file at /Users/xxxxx/vap/src/content/index.md
verbose Transition to "runningQueries"
success onPreExtractQueries - 0.004s
success extract queries from components - 0.105s
verbose Transition to "runningQueries" > "writingRequires"
success write out requires - 0.007s
verbose Transition to "runningQueries" > "calculatingDirtyQueries"
verbose Transition to "runningQueries" > "runningStaticQueries"
verbose Transition to "runningQueries" > "runningPageQueries"
verbose Transition to "runningQueries" > "waitingForJobs"
verbose Transition to "runningQueries" > "done"
verbose Transition to "recompiling"
warn Warning: Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to stopped service
"waitingMachine". This service has already reached its final state, and will not transition.
success Re-building development bundle - 2.939s
verbose Transition to "waiting"
To repro the issue, I just made a change to one of the files (index.md) and saved it.
@ascorbic here is my verbose logs on gatsby@2.24.47
. Sorry for being inactive, as you can see there are many 3rd-party packages (which cause some problems from time to time too) so I need more time to reproduce this bug
A resulting behavior of these logs:
classnames
, markup and css-in-js styles (I'm using linaria)gatsby@2.24.47
browser hanged immediately)I'm just learning some gatsby@2.24.47
and general React things by following the tutorials on gatsbyjs.com and while I'm not having hot reload issues, I started receiving this warning:
warn Warning: Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to stopped service "waitingMachine". This service has already reached
...after I installed gatsby-source-filesystem@2.3.24
in part five of the tutorials. I found this GitHub issue by looking up the above warning.
When I remove gatsby-source-filesystem from my plugins in gatsby-config.js, this warning goes away.
No idea if this counts as a reproduction of this error, since I'm not really having a hot reload problems as I said Edit: Turns out, I'm also having hot reloading issues occasionally!, but hope it helps!
For me, rolling back to 2.24.9 from 2.24.47 restored hot reloading. It was consistently failing before I rolled back.
I'm just learning some
gatsby@2.24.47
and general React things by following the tutorials on gatsbyjs.com and while ~I'm not having hot reload issues~, I started receiving this warning:
warn Warning: Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to stopped service "waitingMachine". This service has already reached
...after I installed
gatsby-source-filesystem@2.3.24
in part five of the tutorials. I found this GitHub issue by looking up the above warning.When I remove gatsby-source-filesystem from my plugins in gatsby-config.js, this warning goes away.
No idea if this counts as a reproduction of this error, ~since I'm not really having a hot reload problems as I said~ Edit: Turns out, I'm also having hot reloading issues occasionally!, but hope it helps!
Same here with gatsby@2.24.53
.
My gatsby installation 2.24.50 (on Windows) was also failing to live-reload after editing any .MDX files. Typical console output was:
info changed file at C:\gatsby\mysite\src\pages\md\a-blog-post.mdx
success onPreExtractQueries - 0.007s
success extract queries from components - 0.080s
success write out requires - 0.006s
warn Warning: Event "xstate.after(1000)#waitingMachine.batchingNodeMutations" was sent to
stopped service "waitingMachine". This service has already reached its final state, and will
success Re-building development bundle - 1.487s
The only way to see updates was to stop gatsby and re-run gatsby develop
I thought I was experiencing the problem described in #16336, but in fact rolling back to 2.24.9, as suggested above, restored live-reload functionality. Now the console output is like:
success Re-building development bundle - 1.013s
success building schema - 0.795s
success createPages - 0.084s
success Checking for changed pages - 0.011s
success updating schema - 0.080s
success onPreExtractQueries - 0.012s
success extract queries from components - 0.232s
success write out requires - 0.012s
success Re-building development bundle - 1.965s
success run page queries - 1.670s - 2/2 1.20/s
For me, rolling back to 2.24.9 from 2.24.47 restored hot reloading. It was consistently failing before I rolled back.
Same for me I'm having to rollback to 2.24.9
to stop this reloading issue
I can confirm to, reverting back to 2.24.9
everything seems to be working as before.
Can confirm locking to 2.24.9
fixes things. I'm building a library alongside Gatsby and when Babel finishes the build it no longer refreshes and requires restarting the server.
This took a lot of tracking down, but I think I've fixed it. Thanks everyone for your information. I should have the release with the fix out today.
OK, this should be fixed in gatsby@2.24.57
. If it's still broken for you after upgrading, please open a new issue with a repro
My server is working as it should now w/ the latest update gatsby@2.24.57
as @ascorbic said! 🎊
Sure, landed fix helped but I still face this bug sometimes, not so often tho. Needs investigation from my side
Thanks for looking into this! In my case it still wasn't working which I boiled down to the use of chokidar
cli that was running two builds, after removing that and running the processes separately, all seems to work well!
@ascorbic it's still broken after @vladar's change, here's an issue with a repro: https://github.com/gatsbyjs/gatsby/issues/27626
@amankkg are you using https://github.com/callstack/linaria?
@hartshorne yes I do
Still broken in Gatsby 3
I'm having to gatsby clean
and clear browser cache every ~ 5 minutes just to get work done. Using Gatsby 3 latest.
The same for me. Using Gatsby 3.3.0.
Same here, I am on "gatsby": "^3.4",
I am seeing this on 3.4.1
I didn't reply to this sooner because I forgot, but eventually I figured out that the problem was with a Gatsby plugin I was using - Gatsby plugin typescript checker. Removing it fixed the issue.
I didn't reply to this sooner because I forgot, but eventually I figured out that the problem was with a Gatsby plugin I was using - Gatsby plugin typescript checker. Removing it fixed the issue.
Not using that plugin but still experiencing the issue
How Can this issue be close?
I've had the same or a similar problem. My index page didn't hot reload, but my other pages did. The problem was with my page component name. Apparently it has to start with an uppercase, which makes sense as all React components are supposed to do that. I'm using gatsby v3.5.
So turning
export default index
into
export default Page
fixed it for me.
This is still broken.
Yeah, still seeing this issue on
Gatsby CLI version: 3.9.0
Gatsby version: 3.8.1
There could be other reasons why it fails in your specific case. Please open a new issue and provide a minimal reproduction demonstrating it.
Description
Recent versions of
gatsby
have issues with hot-reload duringgatsby develop
. I'm constantly checking almost every release and this problem still persists as pergatsby@2.24.23
. The latest OK version for me isgatsby@2.24.9
so I keep rolling back to it.Steps to reproduce
gatsby develop
and app is loaded OKgatsby develop
script rebuilds sources without any errorExpected result
Browser updates the page.
Actual result
Browser starts loading and hangs forever, changes are not picked up. Manual page refresh is not working either. Only restart of develop script can help. However, GraphiQL editor keeps working.
Environment
UPD: added note on GraphiQL