You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a $fetch that checks inside an api route a recaptcha response:
const r = await $fetch<{
success: boolean
hostname?: string
'error-codes'?: string[]
}>('https://www.google.com/recaptcha/api/siteverify', {
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
secret: captchaKey.re,
response: val
})
});
For some reason the build in my ssh server gets:
Api error: FetchError: [POST] "https://www.google.com/recaptcha/api/siteverify": <no response> fetch failed
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at r (file:///var/www/server/index.mjs:1:59455)
... 5 lines matching cause stack trace ...
at Object.handler (file:///var/www/server/index.mjs:1:51201)
at Server.<anonymous> (file:///var/www/server/index.mjs:1:54023) {
[cause]: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11730:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at $fetchRaw (file:///var/www/server/index.mjs:1:58493)
at r (file:///var/www/server/index.mjs:1:59455)
at Object.refinement (file:///var/www/server/utils/zod.ts:264:1)
at file:///var/www/server/node_modules/zod-abort-failed/lib/index.mjs:1971:39
at ZodObject.safeParseAsync (file:///var/www/server/node_modules/zod-abort-failed/lib/index.mjs:655:24)
at ZodObject.password (file:///var/www/server/node_modules/zod-abort-failed/lib/index.mjs:628:24)
at Object.handler (file:///var/www/server/api/auth/index.post.ts:17:1)
at Object.handler (file:///var/www/server/index.mjs:1:51201) {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:6869:28)
at node:internal/deps/undici/undici:6825:50
at Immediate._onImmediate (node:internal/deps/undici/undici:6857:13)
at processImmediate (node:internal/timers:476:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
} undefined undefined
I did the same request with curl and has no problem so I guess is some package issue...
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.
What will happen?
If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.
If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.
How can I create a reproduction?
We have a couple of templates for starting with a minimal reproduction:
I don't think it is a package error. If you can successfully do the request with the plain fetch api (not $fetch), it might be, but most likely it is either a browser extension blocking the request or some logic error.
Environment
Darwin
v18.17.0
3.11.2
3.11.1
2.9.6
bun@1.1.4
-
devtools
,alias
,app
,runtimeConfig
,css
,build
,modules
,experimental
,features
,vite
,nitro
@pinia/nuxt@0.4.11
-
Reproduction
Describe the bug
I have a $fetch that checks inside an api route a recaptcha response:
For some reason the build in my ssh server gets:
I did the same request with curl and has no problem so I guess is some package issue...
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: