capacitor-community / capacitor-community/play-integrity
App is crashed
- Dominant language
- Java
- Stars
- 9
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description

My code is
```
const initPlayIntegrity=async()=>{
try {
// Nonce: See https://developer.android.com/google/play/integrity/classic
// googleCloudProjectNumber: leave as 0 for the default for the application
// or get from https://console.firebase.google.com/ Project Settings > General
const nonce = generateNonce();
debugger
const result = await PlayIntegrity.requestIntegrityToken({
nonce: nonce,
googleCloudProjectNumber: 0
});
debugger;
// Use result.token and decrypt and verify the integrity verdict
// https://developer.android.com/google/play/integrity/classic#decrypt-verify
console.log(`Play Integrity Result`, result);
} catch (err) {
debugger;
// Recommendation: Report to backend and exit the application
}
}
const generateNonce=()=> {
// Generate a unique string for the nonce
const array = new Uint8Array(32); // 32 bytes of randomness
window.crypto.getRandomValues(array);
return btoa(String.fromCharCode(...array)); // Base64 encode the nonce
}
```
But this app is crashed
Contributor guide
Research direction
Start by reproducing the crash with the provided initPlayIntegrity snippet and inspect the PlayIntegrity.requestIntegrityToken call, generateNonce, and the surrounding error handling. Capture the actual exception and relevant Android logs, then trace the failure to its source. Done means the reported flow no longer crashes and the behavior is covered or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100