-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image
component does not work with https next dev
#55706
Comments
Have you tested it if it works in production? I've seen the same issues from others but all of them had external image urls rather than local. Their solution was to add remotePatterns or domains on their nextjs config |
I've been getting a similar issue on our UAT environment it works on local:
This started happening when I updated from 12 to 13 I tried using the We use a corporate proxy so the above PR looks like it could solve our problem Some information that might be useful:
|
noes does not work in http 😀 |
"url" parameter is valid but upstream response is invalid
|
I have the same issue: In the browser:
In the server console:
Yet I'm importing a local image, with import Landscape from '../../../components/ResponsiveImage/samples/landscape.jpg'; My env info:
I must precise that when I build on my local env (macOs m1 Ventura), it works. But when I build a container image and deploy it in preproduction on my kubernetes cluster, with node alpine 18.18.0 and sharp installed, it doesn't work. I don't know if it's related to the fact that the preproduction has an https url, unlike my local build. I'll try to deploy my build to vercel in order to see if it's due to my Dockerfile config or not. |
Ok, so when building and deploying on vercel, the error is gone. I'll investigate in my Dockerfile to see why it fails on my preproduction server. |
@nagman I'm seeing the exact same error with static image files when deploying to Kubernetes. My hypothesis is that some component tries to access these images locally from Next.js for processing through |
Issue should be fixed in #55988 |
Might be related to #53715 |
I'm getting the same issue. Is there a workaround in the meantime while we wait for the supposed fix above? <Image
src="/logo.png"
width={256}
height={256}
priority
/> 2023-09-28T21:25:38.990747564Z upstream image response failed for /logo.png TypeError: fetch failed
2023-09-28T21:25:38.990800465Z at Object.fetch (node:internal/deps/undici/undici:11576:11)
2023-09-28T21:25:38.990807166Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-09-28T21:25:38.990811466Z at async globalThis.fetch (/home/site/wwwroot/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:127:62909)
2023-09-28T21:25:38.990815266Z at async invokeRequest (/home/site/wwwroot/node_modules/next/dist/server/lib/server-ipc/invoke-request.js:17:12)
2023-09-28T21:25:38.990819666Z at async /home/site/wwwroot/node_modules/next/dist/server/next-server.js:362:39
2023-09-28T21:25:38.990823366Z at async imageOptimizer (/home/site/wwwroot/node_modules/next/dist/server/image-optimizer.js:537:13)
2023-09-28T21:25:38.990827266Z at async cacheEntry.imageResponseCache.get.incrementalCache (/home/site/wwwroot/node_modules/next/dist/server/next-server.js:519:61)
2023-09-28T21:25:38.990831266Z at async /home/site/wwwroot/node_modules/next/dist/server/response-cache/index.js:102:36 {
2023-09-28T21:25:38.990834966Z cause: [Error: C0070786B4710000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:
2023-09-28T21:25:38.990839266Z ] {
2023-09-28T21:25:38.990843366Z library: 'SSL routines',
2023-09-28T21:25:38.990847366Z reason: 'wrong version number',
2023-09-28T21:25:38.990851467Z code: 'ERR_SSL_WRONG_VERSION_NUMBER'
2023-09-28T21:25:38.990855667Z }
2023-09-28T21:25:38.990859767Z } |
@timothyerwin You use a custom server? (Node.js) or next build in?
|
this was broken on 13.5.3 for me but with 13.5.4 seems like it's fixed 👍 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/peakercope/material-ui-nextjs-pages-router-ts-example
To Reproduce
pnpm i
pnpm dev
https://localhost:3000/
in browserCurrent vs. Expected behavior
Current result: Banner is not visible
Expected result: Banner is visible
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 Binaries: Node: 18.18.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 7.25.0 Relevant Packages: next: 13.5.2 eslint-config-next: 13.5.2 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
Image response with 500 error code in browser with message
"url" parameter is valid but upstream response is invalid
Terminal console error:
NEXT-1646
The text was updated successfully, but these errors were encountered: