fix(android): improve error handling for external storage file access#14442
Conversation
- Add better error handling and logging for Android external storage paths - Provide more descriptive error messages when file access fails - Check file existence and permissions before attempting to open files - Helps diagnose issues with accessing files in /storage/emulated/0/Android/data/ paths Fixes tauri-apps#14432
|
@FabianLars Can you review this PR? |
FabianLars
left a comment
There was a problem hiding this comment.
thanks for the pr :) a few ideas since most of your code should offer value on other platforms as well, not just android.
|
@FabianLars Thanks for the review . Ill use your suggestions! |
- Make file existence and metadata checks platform-agnostic (not Android-only) - Remove verbose debug logging that doesn't add value - Simplify error messages to reduce spam - Keep Android-specific context only where necessary
|
@FabianLars Ive changed in the latest commits whats have been asked can you review it now? |
Use 422 Unprocessable Entity instead of 500 Internal Server Error for metadata access failures, as it's more semantically correct. The file exists and path is valid, but can't be processed due to metadata access issues (permissions, locks, etc.).
8de9d9b to
ea3a242
Compare
Package Changes Through d1db071There are 9 changes which include tauri with minor, tauri-utils with patch, tauri-build with patch, tauri-cli with minor, tauri-macos-sign with patch, @tauri-apps/cli with minor, tauri-bundler with minor, tauri-runtime-wry with minor, tauri-runtime with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Fixes 500 error when accessing local video files in Android external storage directory via
convertFileSrc. Added better error handling and logging for Android external storage access to help diagnose permission and accessibility issues.Closes #14432
.changesdirectory