Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

VPN

can someone help me setup vpn please?

Cloudflare cronjob bug

How is this possible? I didn't change anything and now the cron is erroring with "Network connection lost." and barely running. Logs are no longer being logged as well via logpush after that initial error and now on the most recent run it's saying exceeded resources after 39ms. I have two other separate worker cron jobs that also both run once per hour on the 10th minute of the hour. I have standard usage model and made all the crons each hour because docs said cpu time is increased to 15min whi...
No description

[ERROR] In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment

In a monorepo, im using github action to deploy my workers on pushed to main. It was working good, from recent update of wrangler, getting this error, even i have the repo secrets set. https://github.com/tapexyz/tape/blob/main/.github/workflows/cd-workers.yml...

Is there a way to request better/newer embedding models on Cloudflare AI?

Is there a way to request better/newer embedding models on Cloudflare AI?

What is the environment variable load order for wrangler.dev & env.vars?

If I have env vars defined in wrangler.toml and env.vars which is picked and which is overridden? For example this is NextJS' environment variale load order: Environment variables are looked up in the following places, in order, stopping once the variable is found. 1. process.env...

Workers body size limit, forwarding stream to origin?

Hi there! Since workers have a limit on body size (https://developers.cloudflare.com/workers/platform/limits/#request-limits), if I want to handle uploads larger than that then if I understand correctly I would need some other server to process them. Is there a way to forward an incoming stream to an origin server without getting limited by the body size?...

Workers TCP connect().startTls() instantly closing

Hello everyone! I am currently in a battle to make a successful mysql connection through workers. It seems I am pretty close, since I can successfully authenticate the client when there is no tls involved. Of course, this is not something you would expect to do in a production environment, so I am having two roadblocks: 1. If I use the TCP connection from the worker and then escalate it with startTls(), both connections (secure and insecure) immediately close. If I donā€™t escalate to TLS, the insecure socket remains active indefinitely. 2. I could, instead, escalate to TLS using the mysql driver itself and use the insecure TCP. For that, Iā€™ve trying to finalise a compatibility layer of node modules, which is going pretty well without resorting to weird hacks. The only native package I canā€™t import in any form is node:tls. It fails with node: prefix, I tried looking into globalThis, importing from tls only (which also failed) and I am out of options here. Anyone had similar issues?...

KV Store max value exceeded for put

I have a durable object worker which uses the KV storage for my application. I noticed the value limit on the put. I was wondering if there are conventions around how I can avoid this limit on a put. Currently, I'm looking to do a try-catch and inspect the error message which I've observed to be something like this:
"[RangeError] Values cannot be larger than 131072 bytes. A value of size 262150 was provided."
"[RangeError] Values cannot be larger than 131072 bytes. A value of size 262150 was provided."
...

Pricing running a graphql server on Workers vs Node.js

I am curious what's the cost difference is running a graphql server on workers Vs hosting yourself - eg via Node.js on something like CloudRun or AWS. Any ideas how I could get some rough estimates on this?...

How to call a Worker from another Worker (403)

Inside of a Worker - how do you call another Worker without Cloudflare challenging the request? E.g. ```js...

Error when using S3 SDK: ReferenceError: FileReader is not defined

As per the title. I am getting a reference error when performing a DeleteCommand using the s3 client. The actual request is fine, but the client response has a body of type Blob; size 0. I think the client then throws an error as it tries to parse the blob with the FileReader api which doesn't exist in workerd? Has anyone else encountered a similar issue to this? I can work around it by just catching the error but that feels pretty weird....

Cloudflare Workers to index Google Drive. slow speed problem

I have used Cloudflare Workers to index Google Drive. For the past few days, the pages have not been loading and the download speed is very slow. Could anyone please tell me if there are any limitations on Cloudflare these days?ā€

random 403 errors on workers outgoing fetch requests

We've been investigating a big issue on our platform for a few weeks. We're integrating with multiple accounting systems and sending a lot of data out to them. With our most popular integration quickbooks, we've been starting to receive a lot of 403 responses, seemingly randomly, since start of may. Randomly means, we perform the request multiple times, 4x it fails with 403, then it just works with 200. We've escalated the issue up to their internal tech team, but they assure us that our requests are not hitting their API. They've checked logs on multiple parts of their infrastructure....
No description

CORS error

Im getting the following: Access to fetch at 'http://my-endpoint.username123.workers.dev/' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. http://localhost:3000 is frontend im running where im making post fetch request. when i call http://my-endpoint.username123.workers.dev/ via curl it works but not in frontend browser on localhost. How would i fix to try it on react localhost frontend...

Object literal may only specify known properties, and 'sessionOptions' does not exist in type 'AiOpt

For the following code, ```ts import { Hono } from 'hono' import { Ai } from '@cloudflare/ai' import { Bindings } from 'hono/types';...
No description

Python and Langchain

Hi, I am trying to execute the demo Github python and Langchain repo https://github.com/cloudflare/python-workers-examples/tree/main/04-langchain. But I am having this problem when executing command: npx wrangler@latest dev. āœ˜ [ERROR] Error in makeHandler...

Cannot enable Worker Analytics Engine (Code:1000, Internal Server Error)

When I try to enable the Worker Analytics Engine, it returns an Internal Server Error (Code:1000). How can I enable it? The response returned from the /api/v4/accounts/${ACCOUNT_ID}/subscriptions endpoint is...
No description

Specify host header in fetch request

I'm trying to health-check load balanced hosts, for which I need to fetch using IP address + Host header. In curl it's super simple, like this: ``` curl -H "Host: direct.openfreemap.org" -I http://144.76.168.195/styles/liberty...

Return ok status immediately on async process or not?

My use case: - A webhook intercepts request from telegram bot - Request message is sent to openai and response awaited - Response is sent to Telegram bot with Telegram API...

Cannot create binding for class WebSocketServer because it is not currently configured to implement

Hello, I'm trying to setup the durable object in dev branch and I got this error. Is anyone know how to resolve this error? Thanks! [[env.dev.migrations]] tag = "v1" new_classes = ["WebSocketServer"]...