Workers embedded in apps - still supported?

Testing an App with an embedded worker in the App Creator resulted in the following error:

" The app you uploaded contains the following cautions:

  • Your app may not contain Cloudflare Workers."

I had previously validated this type of build and I’m currently working on a service using this type of app+worker packaging.

Has support for workers in apps changed since (https://blog.cloudflare.com/introducing-apps-with-workers/), or has usage of workers become a whitelisted capability?

@harris is this something you could shed some light on?

Thanks,
Jeff

I believe they should work…

@chasers has an app with a Worker, maybe there is some flag somewhere to switch.

1 Like

Yeah I don’t think they’re taking new apps with workers. Not exactly sure why.

3 Likes

I would call on @cloonan now, let’s send him on a fact finding mission :rofl:

2 Likes

Still finding…did see one recent similar report of this and Support responded:

Did you notice this comment in the readme file in the github repository?
workers/worker.js
Use this file to add a Cloudflare Worker to your app. Each app may contain one worker. If you don’t want to use workers, just delete this file along with the workers configuration in install.json.

Although, I don’t see that line in the readme :frowning:…now on a fact find & verify mission

2 Likes

Thanks @matteo, @chasers.

@cloonan - appreciate the digging. Can confirm I had previously tested this app as working in the App Creator console.

@cloonan Have you been able to turn up any more details on this?

^the comment from @chasers is correct. I’ve been unsuccessful in finding the why part…

Maybe @KentonVarda or @rita know something or know who to contact?

I just looked into deploying workers in Apps too and it took some time finding this thread.

I’m at a situation where I need clients to be able to either:

  1. Preferably install CF App with Worker (And KV -> not possible it seems)
  2. Point their subdomain to a CNAME on my CF account so we can host the Worker for them.

While I really love workers, it doesn’t seem like we can get them out to customers for actual use…

If this isn’t resolved soon, we’ll have to port all of the code to AWS Lambdas, which is the only FaaS that seem to support this.

The only current method as I see it, is that we manage their Domain/DNS/worker completely - by them changing their nameserver to cloudflare - this has a lot of problems and I’m not sure Cloudflare allows this - and it’s not possible when they already have Cloudflare.

@zack Might as well tag you here too, since I e-mailed you about it.

1 Like

I was a bit worried when they stopped taking new Apps with workers but I’m pretty sure I could use the API to setup a worker for them if they were already on Cloudflare (if they give me some API keys). Maybe you could do this? Obviously not as ideal as an app but would still work. If your customer is not on Cloudflare this doesn’t help, but if they’re not on Cloudlfare an App with a worker won’t help either.

And yes, can confirm this.

I thought about managing the Worker via the new API keys too, however, our app is 100% built in Workers + KV so we cannot let them have the source code - because then they wouldn’t need us.

So, the reason we’re not taking new apps with Workers right now is basically just that we have too much stuff on our plate and not enough engineers to do it all at once.

Workers is still in the very early stages as a platform, and there’s a lot of stuff we’re working on to make it better. For example, we need better observability tools, versioning, the ability to use more than 50ms CPU, etc. A lot of these things are especially needed by Apps. We decided that Apps with Workers at present isn’t really ready for broad adoption, and if we accept lots of apps now we’d actually end up making it take longer to get the platform where we want it, because we’d end up spending our time patching over the missing pieces rather than really fixing them.

We know Apps with Workers is a big part of the future of Workers and Cloudflare – in fact, we expect to rebuild some of Cloudflare’s own core features on top of it. We don’t have a specific timeline for when we’ll get back to it, but we’ll get there eventually.

6 Likes

Thanks for the information, it’s good to know it’s on track at least.
I was worried that Workers was going the Google route :wink:

I guess we’ll just have to wait then.

Thanks @KentonVarda. It definitely feels like Apps as a platform is not getting the attention it deserves. Knowing there is a long term plan for it allows me to continue to invest appropriately.

3 Likes

I’m also working on a Cloudflare app that needs a worker to operate.
Are workers in apps causing any unforeseen issues? If no, would it be possible for you guys to loosen this restriction? @KentonVarda