Skip to content

fix: clear KEY_MISMATCH error and absolute package path (1.2.1) - #2

Merged
jack1590 merged 2 commits into
mainfrom
fix/key-mismatch-message
Oct 12, 2026
Merged

jack1590 merged 2 commits into
mainfrom
fix/key-mismatch-message

Conversation

@jack1590

Copy link
Copy Markdown
Owner

Two fixes to generate --json, released as 1.2.1.

Clear error when the device is keyed for another app

Roku signs packages with the key it was last rekeyed with. If the device still holds another app's key (for example because the rekey was skipped), signing fails with the device's own text, Failed: Invalid Password.. That reads like a wrong developer password. On top of that, the hint pointed at --package-only even when it wasn't used.

Now:

  • Sign key rejected: the run reports a new code, KEY_MISMATCH, with the message "The device is keyed for a different app, so it rejected <project>'s sign key." The hint depends on how the run was started:
    • Rekey skipped: run again with the rekey.
    • Rekey done: check that the sign key matches the signed package.
  • Any other sign failure: keeps the device's message. The "Package only" hint shows only when --package-only was actually used.

Reproduced on a real Roku: a device keyed for CNBC, then generate gotham --skip-rekey. Before this fix the result was SIGN_FAILED "Failed: Invalid Password.". Now it is KEY_MISMATCH.

Absolute package path

This fix was pushed to #1 after that PR was squash-merged, so it never reached main or 1.2.0. packagePath in the result is now always absolute, even when the project's output path is relative (./output/x.pkg). Tools that open the file, like Roku Dev Studio's "Reveal in Finder", need the absolute path.

Testing

  • npm test: 33/33 pass. There are new tests for both key-mismatch hints, the narrowed Package only hint, and the absolute path.
  • On the device: the skipped-rekey case above now returns KEY_MISMATCH.

After merging, release v1.2.1 to publish.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 655e47cc-cab7-4d1d-8371-e00062b5c82a

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jack1590
jack1590 merged commit c256bf2 into main Oct 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant