workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Unable to test any binding that requires `--remote` with Queues

Open Cherry opened this issue 1 year ago • 6 comments

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.48.0

What version of Node are you using?

20.12.1

What operating system and version are you using?

Windows 11

Describe the Bug

If you run a worker that uses Queues with dev --remote, it implodes and is completely unusable. You get obscure "Script not found" errors.

Queues is in beta, so this is fine, but when paired with the rest of the ecosystem, creates some problems:

  • Many new bindings that are GA are impossible to use without --remote. This includes Analytics Engine, Browser Rendering, and some others: https://github.com/cloudflare/cloudflare-docs/pull/13895

  • If I want to use these in my project with Queues, I can not feasibly test anything, because those bindings won't work locally, but Queues doesn't work remotely.

Will these bindings support local mode soon? Is there any expectation of GA products working locally for testing in future?

A recent blog post calls out:

The Cloudflare Developer Platform is grown up and production ready, and committed to being an integrated platform where products intuitively work together and where there aren’t 10 ways to do the same thing, with no need for a compatibility matrix to help understand what works together. Each of these updates shows this in action, integrating new functionality across products and parts of Cloudflare’s platform.

With the docs PR I filed and the problems filed in this issue, maybe Cloudflare does need to publish a compatibility matrix about what does and doesn't work together?

Cherry avatar Apr 07 '24 00:04 Cherry

@Cherry thanks for filing this! This is definitely an experience we should make better. To clarify, does the Queues error show up with both queue producer and consumer workers, or is it just for consumer workers?

penalosa avatar Apr 07 '24 12:04 penalosa

It happens even if you just add a producer like so:

[[queues.producers]]
queue = "test123"
binding = "MY_QUEUE"

Running dev --remote then results in weird script not found, failed to prewarm, or other 5xx errors.

Cherry avatar Apr 07 '24 13:04 Cherry

I was referred to this issue via https://discord.com/channels/595317990191398933/1227316720444768378 Where this happened:

CleanShot 2024-04-09 at 22 23 46@2x

I guess I am looking for queues to support --remote in part though I'd like a way to bind even outside of a running worker, just in a vanilla script e.g. tsx ./scripts/run.ts.

jasonkuhrt avatar Apr 10 '24 02:04 jasonkuhrt

I came to create this exact ticket - testing locally with any queues requires removing them from the Wrangler file first. I'd even love to have some kind of way to disable lines when running in remote mode as a workaround?

ckhicks avatar May 19 '25 15:05 ckhicks

any development on this issue ?!?! painful issue

orenmizr avatar Oct 10 '25 16:10 orenmizr

Facing the same with inline remote flag as well.

"queues": {
   "producers": [
     {
       "binding": "Name",
       "queue": "Name",
       "remote": false
     }
   ]
 },

Error:

✘ [ERROR] D1 Error: Error: D1_ERROR: Failed to parse body as JSON, got: <!DOCTYPE html>

  <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
  <!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
  <!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
  <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
  <head>
  <title>Temporarily unavailable | myworker.workers.dev | Cloudflare</title>
  <meta charset="UTF-8" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  <meta name="robots" content="noindex, nofollow" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
  <!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css'
  href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
  <style>body{margin:0;padding:0}</style>

its-mash avatar Dec 06 '25 13:12 its-mash