Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[image_picker] Fix a crash when picking video on iOS 13 and above. #2083

Merged
merged 2 commits into from
Nov 19, 2019

Conversation

miguelpruivo
Copy link

@miguelpruivo miguelpruivo commented Sep 24, 2019

Description

Fixes an issue that could result in a crash when picking videos from gallery on iOS 13 or above.

Related Issues

#41046

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • No, this is not a breaking change.

@alexei-g-aloteq
Copy link

What maintainers waiting for? Plugin is unusable on iOS 13 without this patch!

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

Thank you for providing this PR. I left some comments.

@miguelpruivo miguelpruivo force-pushed the image_picker-Fix-#41046 branch 6 times, most recently from cbe9f36 to e70e5f5 Compare September 29, 2019 23:43
@ailic88
Copy link

ailic88 commented Oct 3, 2019

@miguelpruivo @cyanglaz please be aware that this fix introduce a new issue when source is camera(not gallery).

@miguelpruivo
Copy link
Author

miguelpruivo commented Oct 3, 2019

@miguelpruivo @cyanglaz please be aware that this fix introduce a new issue when source is camera(not gallery).

Hi, thank you @ailic88, do you mind to provide more details?

Edit: You are completely right, good catch @ailic88. It was because the recorded videos from camera don't actually need to be cached and thus the temporary path was exactly the same when caching (thus, an error was being thrown). Just committed a fix.

Thank you.

@miguelpruivo miguelpruivo force-pushed the image_picker-Fix-#41046 branch 2 times, most recently from cf39c43 to 0991498 Compare October 3, 2019 16:34
@cyanglaz
Copy link
Contributor

@miguelpruivo Please update the pubspec and changelog

@miguelpruivo miguelpruivo force-pushed the image_picker-Fix-#41046 branch 2 times, most recently from aa706f1 to f7317b8 Compare October 31, 2019 17:04
@miguelpruivo
Copy link
Author

Done @cyanglaz.

@trey-rosius
Copy link

If only you guys knew how badly some of us flutter devs need the image_picker working properly on ios 13.Been waiting since September

@miguelpruivo
Copy link
Author

I still don’t get it why this is taking so long @trey-rosius.

@alexei-g-aloteq
Copy link

It's shame for official Flutter plugin to have CRITICAL issue are not fixed for such long time. Start thinking that Flutter is not right choice when you need reliability.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM! Let's fix the CI failure and land this.

@cyanglaz cyanglaz changed the title [image_picker] Fix for #41046 [image_picker] Fix a crash when picking video on iOS 13 or above. Nov 13, 2019
@cyanglaz cyanglaz changed the title [image_picker] Fix a crash when picking video on iOS 13 or above. [image_picker] Fix a crash when picking video on iOS 13 and above. Nov 13, 2019
@cyanglaz
Copy link
Contributor

@miguelpruivo Could you rebase the upstream/master, it might fix the CI.

@miguelpruivo miguelpruivo force-pushed the image_picker-Fix-#41046 branch from c678af6 to c24ab81 Compare November 14, 2019 00:20
@miguelpruivo
Copy link
Author

Done @cyanglaz.

@cyanglaz
Copy link
Contributor

@miguelpruivo Thanks, let's see if the CI passes. If not, I'll merge in #2275 and then we can try it again.

@trey-rosius
Copy link

Any Progress with this ?

@miguelpruivo
Copy link
Author

@cyanglaz is all good to go for a while. This should be merge ASAP to address severe crash issues on iOS 13 when picking from gallery.

@cyanglaz cyanglaz merged commit 953e50d into flutter:master Nov 19, 2019
@miguelpruivo miguelpruivo deleted the image_picker-Fix-#41046 branch November 19, 2019 19:44
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants