cedricdelpoux / gatsby-source-google-docs

Gatsby plugin to use Google Docs as a data source
https://cedricdelpoux.github.io/gatsby-source-google-docs/
MIT License
211 stars 55 forks source link

No Error in Develop. Fails in Build. In both, no images are fetched. #222

Closed linoxyn closed 1 year ago

linoxyn commented 1 year ago

Images are not being fetched from Google Docs. Since this issue I have attempted to clean up the project install and regenerate a new access token. Even on another project I am getting the same issue.

gatsby develop --verbose


verbose Transition to "initializingData" > "sourcingNodes" success source-google-docs: documents - 3.671s - 49 documents fetched success source-google-docs - 4.638s - 49 documents and 0 images fetched

....

verbose Transition to "initializingData" > "creatingPages" success createPages - 0.518s success createPagesStatefully - 0.482s info Total nodes: 207, SitePage nodes: 32 (use --verbose for breakdown) verbose Number of node types: 9. Nodes per type: Directory: 1, File: 24, GoogleDocs: 49, ImageSharp: 2, MarkdownRemark: 49, Site: 1,
SiteBuildMetadata: 1, SitePage: 32, SitePlugin: 48


gatsby build


ERROR UNKNOWN

Truncated page data information for the failed page "/technique/": { "errors": {}, "path": "/technique/", "slicesMap": {}, "pageContext": {} }

failed Building static HTML for pages - 6.328s

ERROR #95313 HTML.COMPILATION

Building static HTML failed for path "/technique/"

See our docs page for more info on this error: https://gatsby.dev/debug-html

WebpackError: TypeError: Cannot read properties of null (reading 'childImageSharp')


I'm not sure what happened now after version 2.4.1 was working just a few days ago. Thank you for your help.

linoxyn commented 1 year ago

I have built test hello world gatsby starter and added gatsby-source-google-docs plus required plugins to access a drive folder and its 3 docs that all contain images and some text. Develop still gives:

... success source-google-docs: documents - 2.074s - 3 documents fetched success source-google-docs - 2.157s - 3 documents and 0 images fetched ...

The project on Google Cloud is as simple as I could make it with the APIs, Credentials, and permissions/roles - yet I cannot obtain or query images in gatsby graphql.

cedricdelpoux commented 1 year ago

What version of Gatsby v5 do you use? Because gatsby-source-google-docs is not Gatsby v5 compatible for now

linoxyn commented 1 year ago

One project has "gatsby": "^5.8.1" which explains why the gatsby-source-google-docs is not compatible, though I have a project that is at "gatsby": "^4.21.1" using the latest "gatsby-source-google-docs": "^2.4.1" with a new token and the same issue exists, develop and build fetch 0 images from sourcing the Docs.

uded commented 1 year ago

We got the same behavior. All packages were updated recently, images won't work anymore.

cedricdelpoux commented 1 year ago

@linoxyn Could you check with 2.4.2? Thanks

uded commented 1 year ago

We were working on my forked package, and it was fine. Now we will migrate back to public one.