pages functions The server running locally is abnormal 500

I started pages functions locally through wrangler, which sends an http request and returns 500 to the local server when it runs, but it worked when I deployed it to a remote server. Does anyone know why? Local access function can not access the Internet, just like kv local operation can only access local kv,right?
11 Replies
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Not really able to tell without seeing the code. Best guess is you are making a request to something which doesn’t respond correctly in local mode but does when deployed.
arlettebrook
arlettebrook6mo ago
I know the reason, but I can't solve it. The request sent by my local fetch needs to access the proxy
arlettebrook
arlettebrook6mo ago
Do you know how wrangler configures proxy on Windows?thank you
No description
Cyb3r-Jak3
Cyb3r-Jak36mo ago
You do the same and configure environment variables. Though not sure if that works for fetch requests
arlettebrook
arlettebrook6mo ago
On Windows, the official documentation does not provide proxy configuration instructions, and the above environment variable wrangler cannot be recognized normally. If I configure the proxy of fetch request separately, it will be troublesome
Cyb3r-Jak3
Cyb3r-Jak36mo ago
For windows you would do set HTTP_PROXY=
arlettebrook
arlettebrook6mo ago
Thank you for your help.I added environment variables, but the wrangler doesn't work properly
No description
No description
arlettebrook
arlettebrook6mo ago
When I modify it to https_ proxy, able to start, but response: [angler] Could not proxy request: TypeError: fetch failed.I'm not sure what kind of service the wrangler proxy is, so I'm considering giving it up
No description
No description
arlettebrook
arlettebrook6mo ago
Yes, it is not used for fetch requests
No description
Cyb3r-Jak3
Cyb3r-Jak36mo ago
Then your best bet is probably remote dev instead of local.
arlettebrook
arlettebrook6mo ago
😭😭😭Ok,thank you for your reply
Want results from more Discord servers?
Add your server
More Posts
Request to URL on the same zone but in CNAME configurationHello, I have a weird behavior that I have an hard time debugging. I reach out my worker via my custAfter the Discord failure, a sharp increase in visits by 33% from Singapore (and the website is fromSince the Analitics failure on November 2-6, 2023, statistics show a huge number of visits to my webIs there a way to use `pg` in a Next.js project setup with `@cloudflare/next-on-pages?I have project that is setup following https://developers.cloudflare.com/pages/framework-guides/deplA record broken????ok so bascily i set an A record and it was working perfectly fine like going good with no issues but"EvalError: Code generation from strings disallowed for this context"I use sveltekit for server side rendering. when I enter the speicific page.svelte that import "@moA record what do i put i cant find anything about itok so basicly for my a record i need to put an ipv4 but what do i put for that ipv4 as ive tried my Customizing Zero Trust Warp posture checksI'm interested in know custom posture checks are possible? For instance running a custom script, or How to do client-side rewrites on statically exported Next.js site?I have a statically exported Next.js site, meaning a single-page app built with `next export` and upSimple redirect not workingAnyone know a fix to this? Can provide anything else which is needed. We have mutliple sites runningnext-on-pages build gives "Internal Server Error" on yarn pages:devHi! We have a NextJS app and trying to deploy to Cloudflare. On the yarn pages:build step, the foll