Closed szemyd closed 4 years ago
👋 Just a quick look here, but it looks like only one of your two nodes has an image. That could potentially be giving you issues. That isn't a great outcome, but let's figure out the problem first and then decide how to deal with it. You can try filtering down to one specific node id with a picture or you could try adding pictures to all of your nodes (or make a view in airtable to only show rows with pictures).
Thanks for checking this out! Unfortunately, this might then be some problem when the images are pulled in, as both of my nodes have pictures in them.
I have thought that this might be a problem (and actually I also figured out that it broke when one of the images had too long of a name, so I changed it), so I created the test setup where it only sources two nodes with fully filled in data.
I also get this error, if I don't run 'gatsby clean' before running the development server:
Have you had any luck since your response? It sounds like the most recent gatsby features have become more strict/revealed bugs in various plugins, and part of me is hoping that this fixed itself 🤞 .
Unfortunately no. I have wasted a lot of time and had to push forward so I reverted back to simply getting the raw source url from airtable (it is linking now to the airtable url of the attachment). I will have to look at it again soon, as this will break if there are too many visitors and therefore requests to airtable.
If you need more details on the bug I would be more than happy to support the resolution of this!
Well, that is certainly unfortunate. Nothing is jumping out at me with the information supplied. Do you have any more details that you are able to share? Would you be able to confirm if images through ImageSharp
works local (e.g. using gatsby-source-filesystem)? Trying to eliminate possible causes to help us focus.
@szemy2 @jbolda I'm getting this same error:
You specified a fileNode, but we caught an error. First check that you have gatsby-source-filesystem installed
My airtable query looks like this:
{
allAirtable(filter: { table: { eq: "People" } }, sort: { fields: data___Last_Name, order: ASC }) {
edges {
node {
id
data {
Full_Name
Photo {
localFiles {
childImageSharp {
fixed(width: 230) {
src
srcSet
}
}
}
}
Secondary_Photo {
localFiles {
childImageSharp {
fixed(width: 230) {
src
srcSet
}
}
}
}
}
}
}
}
}
I consistently get this error for two out of the 35 records:
You specified a fileNode, but we caught an error. First check that you have gatsby-source-filesystem installed?
failed to process https://dl.airtable.com/.attachments/94fabf62edce893d71a1141bb26adf7a/4ef4595f/chandler-square
Error: ENOENT: no such file or directory, stat '/code/my-project/.cache/gatsby-source-filesystem/2f049e3c8032db10f1047d1f8b58ff21/dylan-square'
When I check that folder in my local .cache
I see a file called dylan-square.jpg
... maybe that's a clue? But all the other 35 records seem to be cached the same way, I don't know why these two are failing.
That is super odd, @dylanjha. Could you let me know the exact versions that you are using this plugin, this plugin's airtable
dependency and gatsby-source-filesystem
? Something is different with the setups you both have and what it tested in this repo (and on my other projects).
Also, what operating systems are you both using?
Hmm, well the update on gatsby-source-filesystem
at that version was https://github.com/gatsbyjs/gatsby/pull/19600, but that feels odd that Mac is affected by that. Does downgrading below that version fix anything? @szemy2 what OS are you on?
Hi, I am running:
Hmm different OS so I will assume that OS is not related to the issue. We are at this portion of the code which the only thing of substance that could have changed there is createRemoteFileNode
. That function comes from gatsby-source-filesystem
.
I have not seen any failures on my end, so I imagine it's something to do with the filenames of these specific attachments (which could also mean the download url) or an update to the filesystem source. If you try downgraded versions of the filesystem source and the issue persists, I presume it's the former.
That's exactly where I was looking. I actually think it had to do with the original uploaded filename not containing an extension. "dylan-square" vs. "dylan-square.jpg". I haven't gotten a chance to find the codepath where that breaks but the records that were breaking for me did not have an extension on the original image filename. Maybe give that a try?
When I removed the image from airtable, re-named the file to have an extension and then re-uploaded it into the same field then the issue was fixed.
I've been running into this issue too, I found this combo to be successful:
"dependencies": {
"gatsby": "^2.18.16",
"gatsby-image": "^2.2.6",
"gatsby-plugin-manifest": "^2.2.34",
"gatsby-plugin-sharp": "^2.3.10",
"gatsby-source-airtable": "^2.0.12",
"gatsby-source-filesystem": "^2.1.3",
"gatsby-transformer-sharp": "^2.3.9",
},
I'm pulling down a ton of high resolution images. It'll fail sometimes, but clearing the cache usually helps.
@brohlson ah. If that’s the case, this is most likely related to this issue: https://github.com/gatsbyjs/gatsby/issues/6291#issuecomment-505097465 - there is a PR in the underlying repo for sharp which hasn’t been merged yet due to the holidays, and lack of time for testing, but one of the Gatsby team members has been pushing to get this issue resolved.
@brohlson ah. If that’s the case, this is most likely related to this issue: gatsbyjs/gatsby#6291 (comment) - there is a PR in the underlying repo for sharp which hasn’t been merged yet due to the holidays, and lack of time for testing, but one of the Gatsby team members has been pushing to get this issue resolved.
Totally hit that issue as well, the source-filesystem
issue is what I was referring to. Thanks for the note, good to hear they're pushing for a fix.
Has anyone made further progress on this with updates?
This issue has been automatically marked as stale because it has not had any recent activity for 30 days. It will be closed if no further activity occurs within 7 days. Remove stale label, comment, and/or apply "ongoing issue" label to prevent this from being closed. Thank you for your contributions.
I'm having a similar issue. Not sure if it comes from the same place as other issues reported above, but in our case it seems to be related with the file name being to long and being ellipsized.
Downloading the file from airtable saves the file with the extension, but this plugin seems to be taking the ellipsized name. Then, other plugins down the pipe don't know how to process the image without extension.
Do maintainers think this could be the root cause of the problems raised here? Should I open a separate issue to track my problem?
I tracked down with @carletex the issue we were having. I'm not sure if the root cause is the same as the original post in this issue, so I'll open a new issue to discuss next steps
Edit, I opened issue #170 to track it.
This plugin is extremely useful, I have been building the third project with it.
Now, however with my latest project I would like to optimize the image that are being pulled in, by using the example here that uses gatsby-transform-sharp.
I have tried to debug for a few days now, here is the most noteworthy behaviour:
When I query childImageSharp, it seems to exist:
However when I try to get the width property gatsby fails without warning and gives me back this message in graphql:
I have tried reinstalling, changing the order of the plugins, trying different names for the variable, narrowing the database down to 1 row, so that I don't get error for empty fields, taken out all query except one to be sure that is the problem.
Here are the dependencies I am using:
and my config file:
Here is my query: