r/Devvit • • 3d ago

Bug New apps fail install on OnAppInstall trigger "No context found" — byte-identical code installs fine as an older app

## Describe the bug Brand-new Devvit apps fail every install with `Installation failed during OnAppInstall trigger: No context found. Are you calling 'createServer'...` Apps affected: `typing-rush` (created 29 Nov) and `typing-rush-game` (created 1 Dec), Bare template, Devvit CLI 0.15.4. My older app Daily Flick installs fine — and a build made from byte-identical Daily Flick code fails as the new app, so this looks platform-side, not code.

To Reproduce

  1. Create a new app via developers.reddit.com (Bare template) or the CLI.
  2. Upload it (`devvit upload`).
  3. Install it to a subreddit — via the CLI (auto, manual, explicit version) or the website (Add to community).
  4. See the error: `Installation failed during OnAppInstall trigger: No context found. Are you calling 'createServer'...` Tried 15+ times across two subreddits (r/daily_flick_dev2, r/typing_rush_dev) with a fresh login — same error every time.

Expected behavior

The install should succeed and the app should appear in the community — the way Daily Flick v0.0.6 installed successfully to the SAME subreddit today.

Screenshots

None — the failure is a text error from the CLI/website, quoted above.

Desktop

  • OS: Windows 11
  • Browser: Chrome

Smartphone

  • Not tested on mobile.

Additional context

Ruled out as causes (each tested, install still fails identically): trigger declaration (restored), OnAppInstall handler body (restored to the version that calls reddit), scheduler task name (renamed unique), clean rebuild (1.5 MB minified bundle), both subreddits, and a brand-new app record. Decisive proof: Daily Flick v0.0.6 installed successfully to r/daily_flick_dev2 today, while `typing-rush-game` v0.0.6 built from byte-identical Daily Flick code (server bundle md5 116c18ff9448fb58555134b6365b1c2d, identical bytes) fails with the same error minutes later in the same subreddit. The platform runs the exact same code for both apps. Daily Flick was created ~20 Nov; the two failing apps were created 29 Nov and 1 Dec via the current web creation flow. Deadline: Reddit's Game of the Day, 9 Dec 2026. Happy to share logs / app IDs.

1 Upvotes

4 comments sorted by

•

u/flair-auto-responder 3d ago

Bug report requirements

Hi u/tonibanzai05!

We require all bug submissions to include the following information. Please make sure you’re following this format, or your post may be removed:

Describe the bug

Provide a clear and concise description of the bug.

Steps to reproduce

  1. Go to “…”
  2. Click or tap “…”
  3. Scroll to “…”
  4. Describe the error or unexpected behavior

Expected behavior

Explain clearly what you expected to happen instead.

Screenshots or recordings

If applicable, include screenshots or a screen recording that demonstrates the problem. Please remove any sensitive or personal information first.

Desktop information

  • Operating system: [e.g. macOS 15, Windows 11]
  • Browser or app: [e.g. Chrome, Safari, Reddit]
  • Version: [e.g. 22.1]

Mobile information

  • Device: [e.g. iPhone 16, Pixel 10]
  • Operating system: [e.g. iOS 18, Android 16]
  • Browser or app: [e.g. Safari, Chrome, Reddit]
  • Version: [e.g. 22.1]

Additional context

Add any other details that might help reproduce or diagnose the problem.


You can edit your post to add any missing information.

Post: https://www.reddit.com/r/Devvit/comments/1y9vxzc/new_apps_fail_install_on_onappinstall_trigger_no/

1

u/Beach-Brews Duck Helper 3d ago

What happens if you remove all code from the app install trigger? I know you said it's identical code, but if you are comfortable sharing, I would be happy to look at the code / try to reproduce. You can DM a GitHub link, or add "beach-brews".

1

u/tonibanzai05 2d ago

Thanks for offering to take a look! Quick update: I tested the empty trigger — handler neutered to just return {}, trigger removed from devvit.json — and v0.0.8 installed successfully today to r/daily_flick_dev2. The same neutered code failed 10x on 29 Nov with 'No context found', so the trigger code itself wasn't the cause; looks like the platform side has changed since. The installed version is the neutered one, so my next step is restoring the real handler and testing the upgrade.

1

u/Beach-Brews Duck Helper 2d ago

Hmm interesting. Usually when "removed from Devvit.json" works, it is because of a typo/disconnect between the Devvit.json path and the actual one registers.