Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[video-thumbnails][Android] Fix a crash when the source cannot be retrieved #28961

Merged

Conversation

mrakesh0608
Copy link
Contributor

@mrakesh0608 mrakesh0608 commented May 18, 2024

Why

Fixes #27936

How

  1. Added a validation to check valid sourceFilename.
  2. If the passed sourceFilename is valid, but the retriever can't load it due to a bad URI, then it throws an error setDataSource failed: status = 0x80000000. To handle this, a catch handler is added.

Test Plan

Tested using bare-expo.

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 18, 2024
@mrakesh0608 mrakesh0608 changed the title fix: expo-video-thumbnails crash on bad uri [expo-video-thumbnails][Android] fix: crash on bad uri May 18, 2024
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 18, 2024
@mrakesh0608 mrakesh0608 marked this pull request as ready for review May 18, 2024 13:41
@mrakesh0608 mrakesh0608 requested a review from tsapeta as a code owner May 18, 2024 13:41
Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution!

@tsapeta tsapeta changed the title [expo-video-thumbnails][Android] fix: crash on bad uri [video-thumbnails][Android] Fix a crash when the source cannot be retrieved May 20, 2024
@tsapeta tsapeta merged commit 16d5f5d into expo:main May 20, 2024
13 checks passed
@mrakesh0608 mrakesh0608 deleted the fix/expo-video-thumbnails-crash-on-bad-uri branch May 21, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expo-video-thumbnails crash on bad uri
3 participants