Skip to content

Android: fix broken stack trace logging in signature/JWT verification - #32

Merged
ofalvai merged 1 commit into
masterfrom
push-pznmnynpmsls
Aug 17, 2026
Merged

Android: fix broken stack trace logging in signature/JWT verification#32
ofalvai merged 1 commit into
masterfrom
push-pznmnynpmsls

Conversation

@ofalvai

@ofalvai ofalvai commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Part of a list of quick tactical logging fixes.

CodePushUtils.log(ex.getStackTrace().toString()) never printed an actual stack trace: getStackTrace() returns an array, and Object.toString() on an array just prints its identity hash (e.g. "[Ljava.lang.StackTraceElement;@1a2b3c"). That line has never been useful.

Replace the getMessage()+getStackTrace().toString() pair with a single CodePushUtils.log(Throwable) call, which does print the real trace via Log.e.

CodePushUtils.log(ex.getStackTrace().toString()) never printed an
actual stack trace - getStackTrace() returns an array, and
Object.toString() on an array just prints its identity hash
(e.g. "[Ljava.lang.StackTraceElement;@1a2b3c"). That line has never
been useful.

Replace the getMessage()+getStackTrace().toString() pair in
verifyAndDecodeJWT, parsePublicKey, and getSignature with a single
CodePushUtils.log(Throwable) call, which does print the real trace via
Log.e. This is the least-diagnosable failure class in the codebase
today (JWT/signature verification failures all collapse into "not
signed"/"no public key" with zero trace), so this restores real
visibility into those three failure modes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Android exception logging for signature and JWT verification by emitting real stack traces.

Changes:

  • Replaces ineffective exception message/array logging with CodePushUtils.log(Throwable).
  • Applies the fix to JWT verification, public-key parsing, and signature reading.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ofalvai
ofalvai marked this pull request as ready for review August 17, 2026 09:10
@ofalvai
ofalvai merged commit 9395caf into master Aug 17, 2026
6 checks passed
@ofalvai
ofalvai deleted the push-pznmnynpmsls branch August 17, 2026 09:26
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.

4 participants