<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ebubekir Bingöloğlu</title>
    <description>The latest articles on DEV Community by Ebubekir Bingöloğlu (@ebubekir_binglolu_c9752).</description>
    <link>https://dev.to/ebubekir_binglolu_c9752</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4041469%2F103a467e-ad8c-44a5-a91c-930e92bfeffb.png</url>
      <title>DEV Community: Ebubekir Bingöloğlu</title>
      <link>https://dev.to/ebubekir_binglolu_c9752</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ebubekir_binglolu_c9752"/>
    <language>en</language>
    <item>
      <title>Google Play "signed with the wrong key" — why it happens and how to catch it in 2 seconds</title>
      <dc:creator>Ebubekir Bingöloğlu</dc:creator>
      <pubDate>Wed, 22 Jul 2026 08:09:46 +0000</pubDate>
      <link>https://dev.to/ebubekir_binglolu_c9752/google-play-signed-with-the-wrong-key-why-it-happens-and-how-to-catch-it-in-2-seconds-3dcl</link>
      <guid>https://dev.to/ebubekir_binglolu_c9752/google-play-signed-with-the-wrong-key-why-it-happens-and-how-to-catch-it-in-2-seconds-3dcl</guid>
      <description>&lt;p&gt;You build your release AAB, upload it to Google Play, and after the whole build + upload flow you get:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The build was fine. The code was fine. The signature wasn't. And Google only tells you &lt;strong&gt;at the very end&lt;/strong&gt; — after the build, the download, and the Play Console upload. On CI pipelines (EAS, Bitrise, GitHub Actions) this mistake easily costs an hour or more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it happens
&lt;/h2&gt;

&lt;p&gt;Google Play permanently associates your app with the certificate of your &lt;strong&gt;upload key&lt;/strong&gt;. Every release must be signed with that exact key. The error means your artifact was signed with something else. The usual suspects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The debug keystore&lt;/strong&gt; — the release build type isn't wired to &lt;code&gt;signingConfigs.release&lt;/code&gt; in &lt;code&gt;android/app/build.gradle&lt;/code&gt;, so Gradle silently falls back to debug signing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A teammate's local keystore&lt;/strong&gt; — everyone on the team has their "own" release keystore, and they don't match&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A regenerated keystore&lt;/strong&gt; — the original was lost, someone created a new one with the same alias and assumed it would work (it won't; the fingerprint is different)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI credentials drift&lt;/strong&gt; — the keystore stored in your CI secrets isn't the one Play expects&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Diagnosing it manually
&lt;/h2&gt;

&lt;p&gt;The JDK's &lt;code&gt;keytool&lt;/code&gt; can print the signing certificate of any signed APK/AAB:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;keytool -printcert -jarfile app-release.aab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Compare the SHA1 with &lt;strong&gt;Play Console → Setup → App signing → Upload key certificate&lt;/strong&gt;. If the &lt;code&gt;Owner&lt;/code&gt; line says &lt;code&gt;CN=Android Debug&lt;/code&gt;, your artifact is debug-signed. If the fingerprints simply differ, you signed with the wrong keystore — find the right one and fix your signing config.&lt;/p&gt;

&lt;p&gt;If you've genuinely lost the original keystore, Play Console lets you request an &lt;strong&gt;upload key reset&lt;/strong&gt; (Setup → App signing), which takes a couple of days.&lt;/p&gt;

&lt;h2&gt;
  
  
  Catching it before the upload
&lt;/h2&gt;

&lt;p&gt;Manual fingerprint comparison works, but nobody does it every release. I hit this error one time too many, so I built &lt;a href="https://github.com/ebubekirb/siglock" rel="noopener noreferrer"&gt;siglock&lt;/a&gt; — a small MIT-licensed CLI that turns the comparison into a two-second check.&lt;/p&gt;

&lt;p&gt;Lock your known-good signature once (from an artifact Play accepted, or straight from your keystore):&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx siglock init app-release.aab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This writes a &lt;code&gt;.siglock.json&lt;/code&gt; with the certificate fingerprints. They're public data — the same values shown in Play Console — so you can commit the file and your whole team verifies against the same key.&lt;/p&gt;

&lt;p&gt;Then, before every upload:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx siglock check app-release.aab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;✅ Match → &lt;code&gt;✓ Signature matches, ready to upload.&lt;/code&gt; and exit code 0&lt;/li&gt;
&lt;li&gt;❌ Mismatch → expected vs. found fingerprints and exit code 1&lt;/li&gt;
&lt;li&gt;⚠️ Debug keystore → an explicit warning that the build can't go to production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The non-zero exit code means you can drop it into CI and a wrongly-signed build fails the pipeline instead of reaching Play Console:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: Verify release signature
  run: npx siglock check android/app/build/outputs/bundle/release/app-release.aab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can also verify against a fingerprint pasted straight from Play Console, no lock file needed:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx siglock check app-release.aab --expect "AA:BB:CC:..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Under the hood it just shells out to &lt;code&gt;keytool&lt;/code&gt; (which every Android dev already has), with an &lt;code&gt;apksigner&lt;/code&gt; fallback for APKs signed only with the v2/v3 scheme.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;"Wrong key" is a category of error that's &lt;em&gt;entirely&lt;/em&gt; preventable before upload — Google just doesn't check it for you until submission. Whether you use siglock or a manual &lt;code&gt;keytool&lt;/code&gt; comparison, put a signature check in front of every Play upload and this error disappears from your life.&lt;/p&gt;

&lt;p&gt;Links: &lt;a href="https://github.com/ebubekirb/siglock" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/siglock" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>automation</category>
      <category>debugging</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
