Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Four store releases shipped with ads turned off: the safe default and the guard that never ran

For eleven days, every Android release of our small Flutter app shipped with ads switched off. Nothing crashed. No review flagged it. The rewarded-ad button simply was not there, and we only noticed during an audit of what each shipped build actually contained. The cause was one word in a shell script: ADS="${ADS:-false}" . Here is how a sensible default and a sensible guard combined into a…

For eleven days, every Android release of a small Flutter app shipped with ads turned off. Nothing crashed, and no review flagged it at first. The issue only came to light during a build audit. The root cause was a single line in a shell script: ADS="${ADS:-false}". The script's design aimed to provide a sensible default and a guard against potential problems.

However, the combination led to a silent failure. The release scripts took environment variables and passed them to Flutter as --dart-define. The ADS variable was part of these switches. If the variable was set to "true", the script included AdMob-related settings in the build. Otherwise, it left those settings out. The default was set to false because an ad-free build should be clean and not contain any ad-related code.

When the rewarded ad feature was added, the real AdMob IDs were inserted, and a check was added to prevent building if a test ID was present. This check was placed inside the block where the ADS variable was true, as that's where the test IDs were read. The first ad release was built with the real ID, likely with ADS=true typed on the command line.

From then on, releases were built using the default path, and the false default took over. Reproducing the issue involved running the script in four different ways, each mimicking a release scenario. The default path led to the app using Google's sample app ID, while the test-ID guard printed nothing, as it never executed. The bug lay in the fact that the guard against this issue was never triggered, as the default path was followed.

The issue was discovered not by examining the code but by auditing the actual apps sold on Google Play. By downloading the generated APKs for each release and checking the manifest, it was found that the last release before the problem had the real app ID, while the subsequent four builds had the test ID. This observation pinpointed the exact window and cause of the issue.

The solution was to modify the script and release process. The default was changed from false to true, ensuring that an ad-free build has to explicitly set ADS=false. A line was added to the build log revealing the ADS value, making it clear whether the app is in ad-free or ad-enabled mode. Additionally, a test was added to ensure that the scripts default to true, preventing accidental changes to the default in the future.

The fix was implemented in a single commit, altering the default in the release script and printing the ADS value during the build process. Furthermore, a specific test was written to verify that both release scripts default to true, ensuring the fix remains in place. The reporter shared their thoughts on what they would have done differently in October, emphasizing the importance of making the default the release path and ensuring that test builds opt out.

They suggested placing a guard inside the opt-in branch to check the final values, preventing any accidental inclusion of test IDs. The key takeaway is that defaults matter, and it's crucial to verify the artifact, not just the source code, before release. This incident highlights the significance of thorough testing and audit processes in ensuring the integrity of mobile app releases.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

H0W TO CREATE A WINDOWS VIRTUAL MACHINE IN MICROSOFT AZURE

INTRODCTION: Creating a windows Virtual Machine in Microsoft Azure is an important step in understanding cloud computing and virtualization. WHAT IS A VIRTUAL MACHINE?

  • Authenticate with Microsoft account at Azure portal
  • Configure VM settings: subscription, resource group, name, region, image, size
  • Establish networking: virtual network, subnet, IP address, inbound ports

Java Vulnerability CVE-2026-91403 and CVE-2026-114820: Why the First Patch Wasn't the Fix

If you patched Java for CVE-2026-91403 in the first three days, you're running a build Oracle listed as affected on 24 October. That's the whole reason this post exists.

  • Initial patch for CVE-2026-91403 only addressed one trust path, leaving another open
  • Oracle released CVE-2026-114820, removing four roots from cacerts directory
  • Users needed to install specific runtime versions listed in release notes, not just updated versions

Add a free joke of the day to any website in 2 minutes (no API key, no cookies)

I run GiggleTime , a joke site in 26 languages. We wanted an easy way for anyone to show a daily joke on their own pages: class websites, school newsletters, team dashboards, language-learning blogs.

  • GiggleTime provides free daily jokes in 26 languages
  • Simple iframe or JSON method adds joke to any website
  • No API key, cookies, or third-party scripts required

5 Things to Know About Windows 11 KB5135609 and KB5133853

Originally published on Mango Developer . Read the original article here . Key Takeaways KB5135609 patches security vulnerabilities in Windows Setup binaries for Windows 11 versions 25H2 and 26H2…

  • KB5135609 improves security for Windows Setup binaries and feature updates in 25H2 and 26H2
  • KB5133853 updates Windows Recovery Environment to version 10.0.26100.10074
  • Both updates are delivered via Microsoft's Dynamic Update system, requiring no restart

More from Tuesday 24 November →