Bug 59477 - Running code in iOS11 GM Seed under XF dies
Summary: Running code in iOS11 GM Seed under XF dies
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.99 (xcode9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Xcode9
Assignee: Bugzilla
Depends on:
Reported: 2017-09-14 00:05 UTC by Wally McClure
Modified: 2017-09-15 13:32 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Wally McClure 2017-09-14 00:05:33 UTC
I have the code below.  The code runs until it hits JamesM's cross platform video camera component, and then things die.  I get no errors or anything that I can track down to see what the issue is.  I've been working on this code in XF on Android, and I know it works there.  Just upgrade everything to iOS11 GM Seed, and boom.  Not sure if it is the IOS11 GM bindings, James' code, my not having a setting right in info.plist, or my doing something stupid.

               var svo = new Plugin.Media.Abstractions.StoreVideoOptions();
                svo.AllowCropping = true;
                svo.CompressionQuality = 75;
                svo.Quality = Plugin.Media.Abstractions.VideoQuality.Low;
                svo.Directory = "AutoCard";
                svo.Name = String.Format("{0}.mp4", Guid.NewGuid());

                var file = await CrossMedia.Current.TakeVideoAsync(svo);
Comment 1 Chris Hardy [MSFT] 2017-09-14 02:21:38 UTC
I just tried using this code in a file -> new project and it works as expected on a iOS 11 iPhone 6.

Project I used to successfully do this here: https://www.dropbox.com/s/twyz6spa732len7/TestWallyForms.zip?dl=0

Can you try this project out and see if that works?
Comment 2 Alex Soto [MSFT] 2017-09-14 03:11:20 UTC
Hello Wally!, also please include your full build logs, crash reports (if any) and all your version information.

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Comment 3 Prashant [MSFT] 2017-09-14 07:15:15 UTC
I am not able to reproduce this issue with new iOS 11 GM release (https://releases.xamarin.com/preview-xcode-9-gm-ios-11-support-preview-9/). 

The attached test case works just fine on iPhone SE running iOS 11 GM
See - 

@Wally could you share the information Alex requested in comment #2

# Version information

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.1.3 (build 41)
Installation UUID: c9b84e17-c51d-4c94-9bc5-9bcae12b8506
	Mono (2017-06/6425f06) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000135

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: (Visual Studio Enterprise)
Android SDK: /Users/prashantvc/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: a887676f
Branch: xcode9
Build date: 2017-09-12 21:35:47-0400

=== Xamarin Inspector ===

Version: 1.3.0-alpha2
Hash: fa030e0
Branch: master
Build date: Thu, 01 Jun 2017 20:55:26 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Build Information ===

Release ID: 701030041
Git revision: 25d6e944d5aa709e0bcae699643dd6d54a4b41c8
Build date: 2017-09-13 08:43:46-04
Xamarin addins: f3a4c57c7e397784dd2b395dd340f32d1e5de16e
Build lane: monodevelop-lion-d15-3-xcode9

=== Operating System ===

Mac OS X 10.13.0
Darwin 17.0.0 Darwin Kernel Version 17.0.0
    Thu Aug 24 22:01:05 PDT 2017
    root:xnu-4570.1.46~3/RELEASE_X86_64 x86_64
Comment 4 Wally McClure 2017-09-14 21:22:06 UTC
Chris' code works for me.  That got me thinking regarding what is the potential problem.  This project that I have is a pcl based project that I've been adding new features to for the last 18 months or so.  I've noticed that VS for Mac doesn't seem to let us create pcl projects any more.  is this the potential cause of the problem?


PS.  Sorry for the delay.  I'm dealing with issues with my elderly mother.
Comment 5 Alex Soto [MSFT] 2017-09-15 01:19:11 UTC
@Wally, without something to repro that is really hard to tell, do you have the latest version of the plugin?

My best wishes to you and family.
Comment 6 James Montemagno [MSFT] 2017-09-15 01:23:21 UTC
Also, feel free to open an issue on the GitHub project as that is where I actually triage all the things. 

Did it work on the old seed? I assume you have permissions for:

- Camera
- Photo Gallery
- Microphone?
Comment 7 Wally McClure 2017-09-15 01:36:25 UTC
Close the issue, or delete it.  James hit it, it was the permissions for the microphone.  Didn't think of that.

Thanks Chris, Alex, Prashant, and James.
Comment 8 Alex Soto [MSFT] 2017-09-15 12:35:43 UTC
Awesome news Wally! Nothing can beat our James Montemagno! <3 <3 <3
Comment 9 Wally McClure 2017-09-15 13:32:09 UTC
Alex, let's just keep the bug report between us.  ;-)

The biggest confusing thing was that the exception, when it happened was not caught by the try/catch I had nor was there a message that I could easily see regarding why the issue was happening.  It may have been buried in a log somewhere.  probably something outside of your control though.

Whatever the issue, the problem is solved and I've moved on.  :-)