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

service worker not being served on live (CF Pages) but is locally

Hi possibly not the right channel, but I'm working on a push notification system which works locally but not on live. Looking at these screenshots (live 1st then local), the script url of the service worker is different and the browser extension I have have is not picking up the SW on live deployment. Any idea why this could be...? SW should be loaded in nuxt.config.ts ``` modules: [...
No description

What is the correct way of declaring a Service Binding (RPC)?

I've seen both services = [ { binding = "ADMIN", service = "todo-app" } ]...

Interacting with R2 Buckets During Local Development

I'm working on a project that involves uploading images to R2 buckets and then dynamically generating pages that display these images. However, I'm encountering challenges with simulating this interaction in my local development environment. I've attempted using wrangler pages dev combined with RPC service bindings to fetch a worker locally, but it seems to fall short unless I initiate a wrangler dev session specifically for the worker that handles the export. This method, however, hits another roadblock since the worker requires wrangler dev --remote to interact with R2 or Vectorize. Unfortunately, initiating wrangler dev with the --remote flag makes it invisible to wrangler pages dev. To sum up, I'm looking for a way to effectively test the upload and page generation process locally without deploying every change. The lack of a "next dev --remote" or "wrangler pages dev --remote" seems to complicate the process....

Mailchannels: sender is not authorized

I'm getting:
0 "Failed to send email: 550 5.7.1 This sender is not authorized to send from my-site.com. See https://bit.ly/domain-lockdown. cfid=my-site-v3.pages.dev"
0 "Failed to send email: 550 5.7.1 This sender is not authorized to send from my-site.com. See https://bit.ly/domain-lockdown. cfid=my-site-v3.pages.dev"
...

Can multiple preview branches be deployed in Pages?

I understand multiple preview branches can be configured to trigger deployments but only see an option to deploy one preview branch. Please advise if multiple preview branches mapped to unique env var and custom domains is possible.

How to get the client Country from Cloudflare Pages ?

https://developers.cloudflare.com/network/ip-geolocation/ How to get the equivalent inside the Cloudflare Pages context ? (We're using Astro for a framework)...

Is it possible to only deploy the Pages config in wrangler.toml when using `wrangler pages deploy`?

Currently I'm using the Git integration of Cloudflare pages to handle deployments of my app. But the Pages config & env vars are managed by wrangler.toml. I want to add a CI step that deploys only the latter without any static assets. Is this currently possible? I don't see it within the pages deploy options when running it with --help.

"No wrangler.toml file found" error in mono repo setup

We have a mono repo and have configured a pages project with a root directory pointing to the application. The build command works and the dist folder is read from that root. However, in the build log we see No wrangler.toml file found , but the file is definitely there (and it works fine i dev). Could it be a bug that the root directory is not honoured when looking for the wrangler.toml file?...

TLS 1.0 working on pages site but not on custom domain

curl https://gravesoft.pages.dev/ --tls-max 1.0 -i -v This is working but not below curl https://gravesoft.dev/ --tls-max 1.0 -i -v For the main domain, settings are default, and minimum tls is set to 1.0...

while creating pages, i select and used files locally, but i want to change it to github now.

while creating pages, i select and used files locally, but i want to change it to github now is it possible?

Support for separate wrangler.toml files in monorepo?

When using the new wrangler.toml support with Pages and new mono-repo support, Cloudflare seems to only look for the wrangler.toml file at the root directory (even if root directory is manually changed). I would like to have a seperate wrangler.toml for each Pages project within my mono-repo.

Interesting issue -- Log stream causes NextJS Edge runtime app to fail

This is kind of an intriguing one..... 1. App deploys fine via wrangler pages deploy .vercel/output/static 2. I can hit the side all is dandy... 3. Go to the deployment UI, go to the "Real-time logs" section, click "Begin Log Stream"...

Static files throwing exception

For some reason my static flags are throwing an exception in production on CF pages. I am using SvelteKit. ``` { "outcome": "exception",...

Deployment fails

Hi everyone! I'm trying to build nextjs app with authjs via prisma and d1 database. Everyting works great on local enviroment without any errors on build and preview but when I try to deploy my deployment fails and I don't know why. Where can I see error logs from deployments? Deployment ID: 7b7f1b3e-641d-45b2-b0b4-d3a099ca5f19 Account ID: a953ae5b6c3ea96e30adb99c9a34804e...

Wrangler CLI to push build for Git linked pages project

Basically I want to understand is there a way to link the Wrangler CLI to an existing git linked project, I don't seem to find any option on the CLI which can do it, it always asks for creating a new project. The reason I want this is because lately I've been seeing lots of build failures intermittently happening on pages (like this morning as well). In such cases where due to some upstream issue is pages build is not working, I could do a build on my system and just publish the dist directory, will that work?...

Having a lot of Invalid Traffic on my Cloudflare pages app. Any solution?

I am having a lot of IVT on my CF pages app. I am not sure what is going on. Is there any CF service that can help with this issue?

Preview builds "No deploy available"

When building on our preview branches, the command responds saying it is successful. but when looking at the dashboard it wasnt and says "No deployment available" but doesnt give me a reason. Is there a build output i can look out to figure out why? Production builds dont fail with the same message...

Setting up bindings for KV and Qwik

I've got wrangler to log a KVNamespace, but the result of await platform["KV"].get(key) is always null. Can anyone provide examples of wrangler.toml and a slightly more detailed description of setting up a Qwik project to use KV locally?...

Error: Failed to publish assets when deploying Nuxt.js 3 to Cloudflare Pages

I'm getting stuck on the "Deploying to Cloudflare's global network" step for my Nuxt.js 3 app, as the deployment is failing with the message "Failed: an internal error occurred. If this continues, contact support:" Error: Failed to publish assets - reference to the deployment ID: 614d78ca-312d-42e8-89da-6a99fbc90c02 To give an idea of what I'm building. I'm trying to move my WordPress blog to Nuxt.js (Nuxt 3 with Nuxt content). It got around 4-5K posts (markdown files) (+ around similar images). ...