Androids can’t use RTE, i-devices can’t change mode of the composer

For me that sounds like a bug, but then I would see a topic about it here. So if my forum is the only one, then this must be an issue on my end.

Anyway.

My android users can’t see virtual keyboard if using rich text editor. When changed to markdown everything is fine. iPads and iPhones (Safari/PWA, DiscourseHub) are stuck in markdown, and can’t change to RTE.

This started two days ago, I reckon. My users have tendency to wait before they told me something is broken.

What else… self hosted, 2-container, on latest and upgraded every day and the newest is now 20 mins old at time of writing, safe-mode doesn’t help.

What is my next move? The console and possible errors aren’t an option on mobiles.

They are, but you need to connect the device with a laptop.

I did that with my tablet (Android, problem same as described above) and see

(index):1 Access to script at 'https://cdnfoorumi.katiska.eu/assets/br/chunk-coedl1gv.digested.js' from origin 'https://foorumi.katiska.eu' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
prosemirror-editor-opfbo6zd.digested.js:1  GET https://cdnfoorumi.katiska.eu/assets/br/chunk-coedl1gv.digested.js net::ERR_FAILED 200 (OK)
d-editor.gjs:212 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://cdnfoorumi.katiska.eu/assets/br/prosemirror-editor-opfbo6zd.digested.js

Prosemirror is the RTEditor. But I cannot help further than sharing the error message I see.


Off topic: Thanks for the laugh about your “Kisses and animals” category (Sadly the English translations says ‘cats’ instead, so I will stick to the German one :wink: )

I added:

DISCOURSE_ENABLE_CORS: true

Then I bootstrapped web_only.yml and added to CORS origins https://foorumi.katiska.eu and https://cdnfoorumi.katiska.eu.

No luck.

Then I said:

curl -sI -H 'Origin: https://foorumi.katiska.eu' 'https://cdnfoorumi.katiska.eu/assets/br/chunk-coedllgv.digested.js'

HTTP/2 403 
content-type: application/xml
access-control-allow-origin: *
access-control-allow-methods: GET, HEAD
access-control-max-age: 3000
server: AmazonS3
date: Thu, 10 Sep 2026 14:13:35 GMT
x-cache: Error from cloudfront
via: 1.1 <characters>.cloudfront.net (CloudFront)
x-amz-cf-pop: HEL51-P1
x-amz-cf-id: <characters>

I don’t understand what I see here, but is the issue S3 and my settings there? If yes why it started recently? One symptom might be that since yesterday I couldn’t write any boards-notes anymore.

But if cors is a problem why only those are affected?


Why in the name of old and new gods AI used Küsse in that context :rofl:

I don’t think there have been any recent Discourse changes to cause this. However, S3 does have a longstanding weirdness with CORS, which can cause CDNs to cache a version of the asset without any Access-Control-Allow-Origin header. And if it’s a bad-cache issue, that could explain why it only affects some of your users (likely based on their location).

IIRC - S3 will only serve the Access-Control-Allow-Origin header to requests which send an Origin header (i.e. those from a normal web browser). When Access-Control-Allow-Origin is omitted, it does not serve Vary: origin in its response. And so: if the first request for a given asset is sent from a non-web-browser-context (e.g. curl, or some web crawler), then the CDN can cache the version without the CORS header. Very annoying!

The DISCOURSE_CORS setting won’t help at all here. That’s only relevant to the application server, not S3.

On our hosting, we workaround this problem by configuring Cloudfront to add Access-Control-Allow-Origin: * to all responses. That makes sure that the weird S3 behaviour can’t cause a bad result to be cached.

Alternatively, you could configure Cloudfront to include the Origin request header in its cache key, which would then keep the non-cors responses separate from the cors responses.

Amazon have a bunch of documentation on CORS here. I had this link in my notes which apparently was a forum thread on exactly this issue… but it seems they deleted it :cry:

But I don’t use Cloudfront, so it must come from AWS?

Are you sure? :eyes:

❯ host cdnfoorumi.katiska.eu
cdnfoorumi.katiska.eu is an alias for djpzno7cbajfp.cloudfront.net.

Edit: to be clear, we’re talking about AWS Cloudfront here, not Cloudflare (the names are super similar! :sweat_smile:)

Yeah, that’s true — sure I’m using AWS Cloudfront :laughing: If I recall right it is needed to use own domain. Or something.

Yup exactly - required for a custom domain, and it also makes things cheaper (Cloudfront egress is cheaper than direct-s3 egress, if I remember correctly)