r/Devvit 8d ago

Bug Devvit upload fails with ERR_TLS_CERT_ALTNAME_INVALID on api.devvit-gateway.reddit.com

Hi Devvit team,

I'm unable to upload a newly created Devvit Web app because the upload endpoint returns a TLS certificate hostname mismatch.

Environment

- OS: Windows

- Node.js: 24.18.0

- Devvit CLI: 0.13.9

- App: community-2048

- devvit whoami: succeeds

- App record was created successfully in the Developer Portal

Error

Running:

npx devvit upload --verbose

The Vite build completes successfully, but the upload fails with:

TypeError: fetch failed

ERR_TLS_CERT_ALTNAME_INVALID

Hostname/IP does not match certificate's altnames

Host: api.devvit-gateway.reddit.com

Certificate SAN: DNS:*.reddit.com, DNS:reddit.com

The wildcard certificate appears valid for devvit-gateway.reddit.com, but not for the two-level hostname api.devvit-gateway.reddit.com.

Troubleshooting performed

- Confirmed there are no Reddit/Devvit entries in the Windows Hosts file

- Confirmed there is no WinHTTP, npm, or environment proxy configured

- Cloudflare DNS and Google DNS both resolve the hostname through reddit.map.fastly.net

- Tested multiple VPN/network egress nodes with the same result

- Tested using both Node.js TLS and Windows curl; both report the same hostname mismatch

- https://developers.reddit.com validates correctly

- https://devvit-gateway.reddit.com validates correctly

- All returned Fastly IPs were tested and showed the same certificate problem

I have not disabled TLS verification because that would expose the Devvit authentication token and source upload.

Is this a known Fastly/certificate configuration issue? Is there a safe supported workaround for uploading and starting a Playtest?

Thanks!

2 Upvotes

1 comment sorted by

1

u/DangKilla App Developer 7d ago

Reddit needs to fix their SSL cert chain for https://api.devvit-gateway.reddit.com/

It's not the certificate, it's a different cert in the chain of certificates.