gatsbyjs/gatsby · error
The asset with id: ${id} has a file but the file contains no
Error message
The asset with id: ${id} has a file but the file contains no url. What it means
Data-quality warning while downloading Contentful assets: the asset node has a `file` object but its `url` field is falsy, so there is nothing to fetch. The asset is skipped (its fileNodeID stays unset and no local file node is created); other assets continue downloading.
Source
Thrown at packages/gatsby-source-contentful/src/download-contentful-assets.js:62
const bar = reporter.createProgress(
`Downloading Contentful Assets`,
assetNodes.length
)
bar.start()
await distributeWorkload(
assetNodes.map(node => async () => {
let fileNodeID
const { contentful_id: id, node_locale: locale } = node
const remoteDataCacheKey = `contentful-asset-${id}-${locale}`
const cacheRemoteData = await cache.get(remoteDataCacheKey)
if (!node.file) {
reporter.log(id, locale)
reporter.warn(`The asset with id: ${id}, contains no file.`)
return Promise.resolve()
}
if (!node.file.url) {
reporter.warn(
`The asset with id: ${id} has a file but the file contains no url.`
)
return Promise.resolve()
}
const url = createUrl(node.file.url)
// Avoid downloading the asset again if it's been cached
// Note: Contentful Assets do not provide useful metadata
// to compare a modified asset to a cached version?
if (cacheRemoteData) {
fileNodeID = cacheRemoteData.fileNodeID // eslint-disable-line prefer-destructuring
touchNode(getNode(cacheRemoteData.fileNodeID))
}
// If we don't have cached data, download the file
if (!fileNodeID) {
const fileNode = await createRemoteFileNode({
url,View on GitHub (pinned to e85d62f177)
Solutions
- Re-upload/re-publish the asset in Contentful so file.url is populated
- Re-run sourceNodes to re-sync the asset
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-source-contentful/src/download-contentful-assets.js:62 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/fa6b209af4006de2.
Report an issue: GitHub.