You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the app attempts to download and process a corrupted zip file using the download function, it crashes unexpectedly. Upon investigation, we found that the issue originates in the following block of code:
The current implementation only catches IOException. If we extend the catch block to handle Exception e, the error is caught, and the app can gracefully handle the failure by displaying a failed message instead of crashing.
Steps to Reproduce:
Provide a corrupted zip file to the download function.
Observe the app behavior—crashes without error handling.
Expected Behavior
The app should not crash. Instead, it should catch the exception, log the error, and continue with a failed message.
Proposed Solution:
try {
// Current decryption logic
} catch (IOException e) {
// Existing handling for IO exceptions
} catch (Exception e) {
// New catch block to handle other exceptions gracefully
e.printStackTrace();
}
Other Technical Details
npm --version output:10.2.4
node --version output: v21.3.0
pod --version output (iOS issues only): 1.15.2
The text was updated successfully, but these errors were encountered:
Bug Report
Capacitor Version
Plugin Version
context(s)
Platform(s)
Android
Current Behavior
When the app attempts to download and process a corrupted zip file using the download function, it crashes unexpectedly. Upon investigation, we found that the issue originates in the following block of code:
File: CapacitorUpdater.java
Line: 333
Function: CryptoCipherV2.decryptFile
The current implementation only catches IOException. If we extend the catch block to handle Exception e, the error is caught, and the app can gracefully handle the failure by displaying a failed message instead of crashing.
Steps to Reproduce:
Provide a corrupted zip file to the download function.
Observe the app behavior—crashes without error handling.
Expected Behavior
The app should not crash. Instead, it should catch the exception, log the error, and continue with a failed message.
Proposed Solution:
try {
// Current decryption logic
} catch (IOException e) {
// Existing handling for IO exceptions
} catch (Exception e) {
// New catch block to handle other exceptions gracefully
e.printStackTrace();
}
Other Technical Details
npm --version output:10.2.4
node --version output: v21.3.0
pod --version output (iOS issues only): 1.15.2
The text was updated successfully, but these errors were encountered: