DevelopersSeptember 14, 2026by
EmpoorioChain Core
EmpoorioChain Core

Engineering Notes #5: A Release Build Without Its Defines Ships in Demo Mode

What happened

A release bundle of OuranoOS built with flutter build appbundle --release and no --dart-define flags produced an app whose chain service fell back to demo mode and whose endpoints were ws://127.0.0.1:9944. The decentralized-storage service likewise did not enable its production node. The published app would never have spoken to the chain.

Why it is hard to catch

String.fromEnvironment is resolved at compile time. Both the development and production endpoint strings are present in the compiled binary as constants; which branch executes is decided by the define that was — or was not — compiled in. Finding the correct URL inside the .so proves nothing. The artefact cannot be inspected for this; the app must be run.

The rule

Release builds of every ecosystem app require their defines, and the release script fails if they are absent:

flutter build appbundle --release \
  --dart-define=EMPOORIO_CHAIN_MODE=production \
  --dart-define=… 

And after building: install it, launch it, watch the network it connects to. A release checklist item that says run the app and confirm the endpoint in its logs is not bureaucracy; it is the only test that can see this.

The general form

Any configuration resolved at build time — feature flags, endpoints, keys — produces an artefact that looks identical whether the configuration was right or wrong. The verification has to be behavioural.

From the OuranoOS release preparation, August 2026.

Share this article