-
Notifications
You must be signed in to change notification settings - Fork 13
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
Regression?: "gatsby-source-craft" threw an error while running the sourceNodes lifecycle bug #57
Comments
It's not guaranteed to be the same error. It's just the same symptom, though. There should be something in your Craft logs, since Craft fails to return content. Can you take a look? |
That's true, it's so weird that this error keeps popping up at random times. Today we can't seem to reproduce it and unfortunately the logs from yesterday has been overwritten already it seems like. This error would show up in web.log right? |
@andreasottosson It would, yeah, if the query failed to return a response due to Craft error. Maybe in server error logs if web server tapped out? But the issue you referenced before definitely showed up in web.log :) Disabling devMode helps reduce the noise in log files, too. |
@andris-sevcenko Good point, we disabled dev mode now and if the error comes back I will update you. We can close this if you want, I can just create a new issue when I have the logs from Craft so we have some more info. |
Will do! |
@andris-sevcenko Got the error again today, does this tell you anything?
|
It does, indeed! Should be an easy fix - at the latest tomorrow! |
Just pushed a patch in craftcms/gatsby-helper@0432377. Will cut a release momentarily, when I fix another issue. |
Just released Gatsby Helper plugin 1.0.9 for Craft that fixes this. |
@andris-sevcenko Not so fast Mr.. ;) The QA-department (which is us) has found more errors.
|
That's strange. That specific SQL error never triggered for me. As for the second stack trace doesn't seem to be related to this issue at all. Try running I just cut the 1.0.9.1 release for the Helper plugin that fixes this. |
It's actually in this repo, but, please, create a new issue. Issues are free and creating an issue per separate bugs reduces the number of times we have to use the sentence "Yeah, it's one of the seven bugs reported in that issue" :) |
Thanks for quick reply @andris-sevcenko ! I will remove that second trace form here and will also create another issue for the "deprecation" thing. Hopefully you will find a fix for that SQL error to. Let us know if you need access to our environment again, this is really important for us to get fixed. |
It should be fixed by updating the Gatsby Helper plugin to 1.0.9.1 |
You work fast, that's the quickest fix I've seen 😊 Thanks, @andris-sevcenko ! We will try again, if it breaks we will let you know. |
Ohhh I know 😆 |
@andris-sevcenko LOL, sorry man, we are in a little bit of a hurry with this. To be fair we do pay for Craft Pro on several sites so I don't feel too bad 🤣 |
No problem at all. |
@andris-sevcenko We got this error again today, I tried searching for the error and Google return exactly 2 results. One was spam, one was verbb/super-table#327 that didn't tell me more than that this was fixed in their code and it wasn't the exact same error of course. So I will just leave the stack trace here and you can do what you want with it :)
FWIW, I can't reproduce it right now but it happend. Does not look good for clients editing the site...¨' UPDATE:
FYI, site is now running Craft 3.7.24, all Node plugins are up to date, and also Gatsby helper. |
In this specific case, it looks like Craft pinged Gatsby build about an updated element (User), however, Gatsby had no permission to query for it. When building sites with Gatsby, it's probably more prudent to follow a "allow Gatsby to query for everything and narrow it down when building the site." |
Makes sense, "View all users" was unchecked in the Schema. I guess we just have to enable everything and hope it will work, seems like a bit too much permissions but as long as it works we are happy. Thanks! |
Yeah, I agree with that, but there's no clean solution. The biggest reason for this is because the sourcing plugin does not know what queries are run when building the site and the same goes for the helper plugin. So the helper plugin can't know it shouldn't listen to some certain element updates or not. The most balanced solution that requires the least effort from the plugin developer is the current one. Or, that's what I think at least. I'm open to suggestions! :) |
Absolutely, I guess for Gatsby it's not a big deal since the API key is never exposed when the site is built. But unfortunately we are still facing issues. Today we get this error, everything under "Users" is enabled in the Schema now in Craft. The only thing not enabled is, "Allow listing element drafts", "Allow listing element revisions" & "Freeform" categories. Also no mutations. Nothing in web.log. This is from Gatsby build on Netlify,
Starting to feel like we are doing something wrong? Or do we just find all edge cases? :) |
This needs to be enabled. Please see #61As far as the actual error goes - can you update Gatsby Helper to 1.1.1 (just released) and run the following query in the Craft control panel? {
nodesUpdatedSince (since: "2021-12-07 15:01:11") {
nodeId
nodeType
elementType
}
} Curios to see what the results are of that query. |
I'm sorry Andris. I obviously should have read #61 more carefully, I though it was just the last of the three. Now everything is checked, except for Freeform. The query returns the following (updated to Gatsby Helper 1.1.1 and Craft 3.7.25.1). Perhaps that Freeform Element is the problem?
|
No worries, we've all been guilty of not reading things carefully enough :) Yeah, it's a Solspace Freeform thing, but the more I think about it, the more I think it shouldn't be on them to check that. I'll see if I can adjust the Gatsby Helper plugin to avoid this. I'll have an answer for you in a few hours! |
@andreasottosson if you update to Helper plugin 1.1.2, Freeform should no longer be bothering you :) |
@andris-sevcenko Nice change there, giving it a try now. Thanks for looking into this so quickly. Hopefully now we won't have to bother you about this issue anymore :) |
Description
This issue was fixed (#50) but has now reappeared. Somehow as soon as Gatsby tries to use the cache to do a build this error occurs. We do not have multisite enabled this time. Site is built on Netlify with "Essential Gatsby" plugin installed.
The only reason we use this plugin instead of "gatsby-source-graphql" is for incremental builds but it seems to just break instead. I also see this line in the official documentation about missing data with incremental builds,
could it be related? We can't possibly ask the customer to clear the cache when they change something on the site :)
@andris-sevcenko any ideas? We would be happy to give you access to the server again if you need to look around.
Steps to reproduce
Additional info
Cloner 1.2.2
Formie 1.4.26
Gatsby Helper 1.0.7
Redactor 2.8.8
Smith 1.1.14
Spoon 3.6.1
Sprout Notes 2.2.3
Tags 1.0.9
The text was updated successfully, but these errors were encountered: