Giter Site home page Giter Site logo

Comments (5)

henrikwirth avatar henrikwirth commented on June 20, 2024 1

@avidsapp I just updated this starter to newest WPGatsby, Gatsby, gatsby-source-wordpress and WPGraphQL versions. Not sure if that might help in your case.

I have the feeling, that in some of your content are resources referenced, that are not there anymore. Check your Posts/Pages, sometimes just resaving them helps to get rid of the reference.

from gatsby-starter-wordpress-twenty-twenty.

henrikwirth avatar henrikwirth commented on June 20, 2024

@avidsapp could be that some of your data on the WP side of things is corrupted?

from gatsby-starter-wordpress-twenty-twenty.

avidsapp avatar avidsapp commented on June 20, 2024

@henrikwirth that may be the case. Is there a better way to determine which file specifically is causing the issue?

Couple of notes:

  1. At one point, I turned off the WP settings from "organize by year and month". I have since re-uploaded and replaced all attachments. Still throwing the error
  2. I removed all media from the WP server
  3. Some media seemed to remain so I deleted from server cli
  4. Throws this errors - likely because attachments aren't present.
MaxRedirectsError: Redirected 10 times. Aborting.
    at Request._onResponseBase (.../gatsby-wordpress-official/node_modules/gatsby-source-wordpress/node_modules/got/dist/source/core/index.js:850:35)
    at Request._onResponse (.../gatsby-wordpress-official/node_modules/gatsby-source-wordpress/node_modules/got/dist/source/core/index.js:931:24)
    at ClientRequest.<anonymous> (.../gatsby-wordpress-official/node_modules/gatsby-source-wordpress/node_modules/got/dist/source/core/index.js:945:23)
    at Object.onceWrapper (node:events:434:26)
    at ClientRequest.emit (node:events:339:22)
    at ClientRequest.origin.emit (.../gatsby-wordpress-official/node_modules/gatsby-source-wordpress/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at HTTPParser.parserOnIncomingClient (node:_http_client:652:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17)
    at TLSSocket.socketOnData (node:_http_client:518:22)
    at TLSSocket.emit (node:events:327:20)
    at addChunk (node:internal/streams/readable:304:12)
    at readableAddChunk (node:internal/streams/readable:279:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:218:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:192:23) {
  code: undefined,
  timings: undefined
}

and

warn Received the below error when trying to fetch
https://example.com/wp-content/uploads/example.jpg
from Page #2153 "Example Page"

https://example.com/wp-admin/post.php?post=2153&action=edit
  1. I updated from gatsby-source-wordpress-experimental to v4.0.1 of gatsby-source-wordpress, as well as updated WP plugins to most current, and still throws the same error.
  2. Tried from the default gatsby-wordpress-starter and throws same error, so likely media related
  3. Tried uploading all media (including .pdf). At times it hung up on the .pdfs, so tried without .pdfs on server. Same error.
  4. gatsby clean and deleted .wordpress-cache before gatsby develop every debugging iteration

from gatsby-starter-wordpress-twenty-twenty.

henrikwirth avatar henrikwirth commented on June 20, 2024

You can also try searching your database for /wp-content/uploads/example.jpg and see where it still exists.

from gatsby-starter-wordpress-twenty-twenty.

avidsapp avatar avidsapp commented on June 20, 2024

Resolved. For anybody that runs across a similar problem, I was able to track down the corrupted file by wiping the WP server and redoing it by importing edited xml data for pages/posts/media. The initial gatsby develop stopped when creating the problem page. Changed the media on this page and the process completed with an error:

ERROR #gatsby-source-wordpress_gatsby-plugin-sharp-20000 

Failed to retrieve metadata from image .../gatsby/.cache/caches/gatsby-source-wordpress/48f5da48c8e6c29601b6ab32c3c14b38/problem-image.jpg

Error: Input file contains unsupported image format

After deleting the problem-image.jpg and gatsby clean:

ERROR #gatsby-source-wordpress_gatsby-plugin-sharp-20000 

Failed to retrieve metadata from image .../gatsby/.cache/caches/gatsby-source-wordpress/d41d8cd98f00b204e9800998ecf8427e/null.jpg

Error: Input file contains unsupported image format

Manually deleted this cache file and build completes just fine.

from gatsby-starter-wordpress-twenty-twenty.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.