Coder Social home page Coder Social logo

testProxy breaks next/font about next.js HOT 4 OPEN

jacenre avatar jacenre commented on September 28, 2024 11
testProxy breaks next/font

from next.js.

Comments (4)

joafeldmann avatar joafeldmann commented on September 28, 2024 6

Same issue here with 14.2.5 and testProxy

 ▲ Next.js 14.2.5
  - Local:        http://localhost:4000
  - Environments: .env

 ✓ Starting...
 ✓ Ready in 2.7s
 ✓ Compiled /src/middleware in 391ms (189 modules)
 ○ Compiling /[locale]/cms/[...slug] ...
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap: incorrect header check

Retrying 1/3...
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap: incorrect header check

Retrying 2/3...
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap: incorrect header check

Retrying 3/3...
FetchError: Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap: incorrect header check
    at Gunzip.<anonymous> (/Users/***/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/node-fetch/index.js:1:53082)
    at Gunzip.emit (node:events:530:35)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'Z_DATA_ERROR',
  code: 'Z_DATA_ERROR'
}
 ⨯ Failed to download `Open Sans` from Google Fonts. Using fallback font instead.

Failed to fetch `Open Sans` from Google Fonts.}

from next.js.

9sako6 avatar 9sako6 commented on September 28, 2024 2

Same with 14.2.7 and testProxy

from next.js.

peguerosdc avatar peguerosdc commented on September 28, 2024

Hi! It also happens to me. I checked you sandbox and we are getting the same error:

 ✓ Starting...
 ✓ Ready in 3.5s
 ○ Compiling / ...
(node:24065) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap: incorrect header check

Retrying 1/3...
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap: incorrect header check

Retrying 2/3...
Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap: incorrect header check

Retrying 3/3...
FetchError: Invalid response body while trying to fetch https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap: incorrect header check
    at Gunzip.<anonymous> (/Users/user/dev/my-app/node_modules/next/dist/compiled/node-fetch/index.js:1:53082)
    at Gunzip.emit (node:events:532:35)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'Z_DATA_ERROR',
  code: 'Z_DATA_ERROR'
}
 ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead.
 ✓ Compiled / in 10.1s (2395 modules)
 GET / 200 in 14979m

I don't know if there is a cache mechanism in NextJS or something like that, but if I remove the testProxy flag, I start the server and access the site, then add the testProxy  flag again... now the error becomes intermittent.

Moreover, it's affecting the behavior of display: "swap" because sometimes the font loads and sometimes it doesn't load if I include it. If I remove it, it always loads. Very weird.

from next.js.

Sephster avatar Sephster commented on September 28, 2024

Also can confirm this is affecting my build

from next.js.

Related Issues (20)

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.