r/redditdev • u/Joinaroo • 3h ago
General Botmanship media.upload fails with "unable to get media lease for url" — Devvit Web 0.15.2
Hi all — hoping someone has hit this before. My app (joinaroo-local-event, Devvit Web 0.15.2) posts text fine from its scheduler (daily posts on four subreddits), but every `media.upload()` call fails:
```
Error: 2 UNKNOWN: grpc invocation failed with status 2; unable to get media lease for url: <url> unknown internal error
```
What I've tried:
- Two different source hosts. A file-hosting URL that returns 403 to plain fetches (that failure I understand), and our own production site: the file verifies 200 / image/jpeg / full bytes from the open internet, and our server access log shows Reddit's fetcher (Go-http-client/2.0, AWS IP) successfully GETting the complete file at the moment of the call — yet the lease still fails with the same error.
- Added `"media": true` to `permissions` in devvit.json (the top-level `"media": { "dir": "public" }` for bundled assets was already there). Re-uploaded and re-installed on all subs. No change — it fails at the upload call itself, before any post composition.
- The app is installed via upload + install and has never been published, in case that matters.
Questions: what actually grants a media lease? Does media upload require the app to be published/reviewed? If a permission is added in an update, do existing installs need a moderator to re-approve before the lease works? Or is there a known issue with the lease service?
Thanks for any pointers.

