Essentials: [Bug] MediaPicker (Capture photo) Error.

Created on 3 Oct 2020  ยท  8Comments  ยท  Source: xamarin/Essentials

Description

MediaPicker (Capture photo) Error.

Steps to Reproduce

  1. MediaPicker
  2. Capture photo
  3. Essentials-main\Essentials-ain\Xamarin.Essentials\Platform\Platform.android.cs
    protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
    ...
    if (outputUri != null)
    data.PutExtra(OutputUriExtra, outputUri); //data is null error.

Expected Behavior

Actual Behavior

Basic Information

  • Version with issue:
  • Last known good version:
  • IDE: VS2019
  • Platform Target Frameworks:

    • Android: Android 10(API Leve 29 Q)
  • Nuget Packages:

  • Affected Devices:

Screenshots

1111

Reproduction Link

bug

Most helpful comment

The same thing happens for me on CaptureVideoAsync

All 8 comments

https://github.com/pulmuone/FilePickerTest
My Sample Source.

this menu "Capture photo" error .
System.NullReferenceException: 'Object reference not set to an instance
of an object.'

Test : VS 2019, Samsung Galaxy
20, Xamarin.Essentials 1.6.0-pre2, Xamarin.Forms 5.0.0.1487-pre1,

2020๋…„ 10์›” 4์ผ (์ผ) ์˜ค์ „ 9:28, ์ง€ํ˜„๋ช… pulmuone.ji@gmail.com๋‹˜์ด ์ž‘์„ฑ:

https://github.com/xamarin/Essentials/tree/main/Samples

this sample

2020๋…„ 10์›” 3์ผ (ํ† ) ์˜คํ›„ 11:03, Pedro Jesus notifications@github.com๋‹˜์ด ์ž‘์„ฑ:

@pulmuone https://github.com/pulmuone can you attach a sample that
reproduces the issue?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/xamarin/Essentials/issues/1411#issuecomment-703108738,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKHGGPLNNRDWKEDUAIGD4BLSI4VMVANCNFSM4SCT3DJA
.

The same thing happens for me on CaptureVideoAsync

Using the vanilla Microsoft sample code. Crashes every time on both CapturePhotoAsync() and CaptureVideoAsync()
Null reference exception.
Using Xamarin Essentials: 1.6.0-pre2
Xamarin Forms: 5.0.0.1558-pre3

Same here.
Xamarin.Essentials 1.6.0-pre2
Xamarin.Forms 4.6.0.1141

Thank you Amr. Works fine for me

@msitsoftware from what I can understand, that PR fixed your issue?

Duplicate of #1397

@mattleibow I tried out #1480 and this works fine for me

Was this page helpful?
0 / 5 - 0 ratings