Bug 57058 - iOS: Mono.Data.Sqlite.SqliteException: Library used incorrectly when using Facebook authentication OpenUrl
Summary: iOS: Mono.Data.Sqlite.SqliteException: Library used incorrectly when using Fa...
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: XI 10.8 (d15-1)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 58166 ()
Depends on:
Blocks:
 
Reported: 2017-06-01 14:58 UTC by gaoyuan_chen
Modified: 2017-07-27 12:23 UTC (History)
4 users (show)

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


Attachments
Resubmit the build (37.79 KB, application/zip)
2017-06-05 14:05 UTC, gaoyuan_chen
Details


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:
Status:
RESOLVED ANSWERED

Description gaoyuan_chen 2017-06-01 14:58:38 UTC
When I try to integrate Facebook SDK into my iOS app, 

"SqliteConnection.SetConfig (SQLiteConfig.Serialized);"

gives me error Mono.Data.Sqlite.SqliteException: Library used incorrectly right after I add this line from Facebook:

public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
    return ApplicationDelegate.SharedInstance.OpenUrl(application, url, sourceApplication, annotation);
}

I've attached my project down below. Is there any way to work around? 

Thank you for your time!
Comment 1 gaoyuan_chen 2017-06-01 15:39:27 UTC
It occurs only on real device too
Comment 2 Manuel de la Peña [MSFT] 2017-06-05 09:20:06 UTC
Hello, it looks like the project was not attached. You might have gotten an error due to the size, please remove the /bin and /obj folders before trying to uploading the project.
Comment 3 gaoyuan_chen 2017-06-05 14:05:05 UTC
Created attachment 22700 [details]
Resubmit the build

I deleted packages in packages file since the size was too big.

Packages including:  

System.Data.SQLite.1.0.105.1

Xamarin.Facebook.iOS.4.19.0

Please let me know if you have any questions
Comment 4 Manuel de la Peña [MSFT] 2017-06-07 08:54:10 UTC
I can confirm the bug with the following environment:

=== Xamarin Studio Community ===

Version 6.3 (build 864)
Installation UUID: 01060673-5bee-4cf4-a4c2-5e36a18d39a2
Runtime:
	Mono 5.5.0.19 (master/a46742d) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 505000019

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 7.3.1.2 (Xamarin Studio Community)
Android SDK: /Users/mandel/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)
		7.1   (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.4
SDK Build Tools Version: 25.0.1

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

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Apple Developer Tools ===

Xcode 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: 10.11.0.126 (Xamarin Studio Community)
Hash: 7571635e
Branch: master
Build date: 2017-05-09 16:04:54-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: 3.5.0.126 (Xamarin Studio Community)

=== Build Information ===

Release ID: 603000864
Git revision: 6c2f6737278ccc3e81e12276d49c0d92f975f189
Build date: 2017-04-24 11:26:01-04
Xamarin addins: d8d46e577d8507c35260ce9d73df3c33415bb214
Build lane: monodevelop-lion-d15-1

=== Operating System ===

Mac OS X 10.12.4
Darwin MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0
    Fri Mar  3 16:52:33 PST 2017
    root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Addin Maker 1.3.2
StyleCop Support 1.0.1.9
Manifest.addin 0.0.0.0

The application was tested on an iPhone 7 with iOS 10.3.2. Reassigning the bug to the bcl class library.
Comment 5 gaoyuan_chen 2017-06-08 18:38:12 UTC
Hi, thanks for confirming the bug. 

May I ask the ETA on when it'll be fixed or any workaround for this?
Comment 6 Manuel de la Peña [MSFT] 2017-06-12 10:06:59 UTC
@gaoyuan I cannot provide any ETA since it is an issue in the BCL and this was triaged by the Xamarin.iOS team. Will nevertheless bring this to the mono team attention so that they can provide you with more information.
Comment 7 gaoyuan_chen 2017-06-14 15:51:16 UTC
Ok, please let me know if there's any progress. Thank you
Comment 8 Manuel de la Peña [MSFT] 2017-06-14 17:19:54 UTC
@gaoyuan I just requested the head of the team to give you info ASAP.
Comment 9 gaoyuan_chen 2017-06-19 14:16:18 UTC
Thank you @Manuel. Is there any updates or work around for this bug so far?
Comment 10 Manuel de la Peña [MSFT] 2017-06-27 16:55:01 UTC
Hello, I have tested the application with the following envs:

====================================================================================
                                     MASTER
====================================================================================

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version Preview - Internal Dogfood (7.1 build 1258)
Installation UUID: 8d12e55e-3489-463f-ac52-8cb4573c5a81
Runtime:
	Mono 5.2.0.179 (2017-04/4498dc4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000179

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.0.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003121/Sdks
SDK Version: 1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: 10.13.0.20 (Visual Studio Enterprise)
Hash: 8c55dd88
Branch: master
Build date: 2017-06-27 11:20:06+0200

=== Xamarin.Mac ===

Version: 3.7.0.20 (Visual Studio Enterprise)

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

====================================================================================
                                     ALPHA
====================================================================================

=== Xamarin.iOS ===

Version: 10.13.0.20 (Visual Studio Enterprise)
Hash: 8c55dd88
Branch: master
Build date: 2017-06-27 11:20:06+0200

With this version, the app does login and I get to the message:

"App not setup: This up is still in development mode..."

Doing an upgrade to the latest alpha with the following env:

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version Preview - Internal Dogfood (7.1 build 1258)
Installation UUID: 8d12e55e-3489-463f-ac52-8cb4573c5a81
Runtime:
	Mono 5.2.0.179 (2017-04/4498dc4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000179

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.0.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003121/Sdks
SDK Version: 1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Apple Developer Tools ===

Xcode 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: 10.11.0.126 (Visual Studio Enterprise)
Hash: 7571635e
Branch: master
Build date: 2017-05-09 16:04:54-0400


=== Xamarin.Mac ===

Version: 3.5.0.126 (Visual Studio Enterprise)

=== Build Information ===

Release ID: 701001258
Git revision: b0333c272ef55159b4c209e71698203d2fb4acdd
Build date: 2017-06-26 17:46:52-04
Xamarin addins: 31cc58bd6e356d0e68b4dd5c9b51283f1506ce99
Build lane: monodevelop-lion-dogfood-vNext

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

====================================================================================
                                       BETA
====================================================================================

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version Preview - Internal Dogfood (7.1 build 1258)
Installation UUID: 8d12e55e-3489-463f-ac52-8cb4573c5a81
Runtime:
	Mono 5.2.0.179 (2017-04/4498dc4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000179

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.0.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003121/Sdks
SDK Version: 1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: 10.12.0.5 (Visual Studio Enterprise)
Hash: 104e7b43
Branch: d15-3
Build date: 2017-06-08 14:59:48-0400

=== Xamarin.Mac ===

Version: 3.6.0.4 (Visual Studio Enterprise)


=== Build Information ===

Release ID: 701001258
Git revision: b0333c272ef55159b4c209e71698203d2fb4acdd
Build date: 2017-06-26 17:46:52-04
Xamarin addins: 31cc58bd6e356d0e68b4dd5c9b51283f1506ce99
Build lane: monodevelop-lion-dogfood-vNext

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

====================================================================================
                                     STABLE
====================================================================================

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version Preview - Internal Dogfood (7.1 build 1259)
Installation UUID: 8d12e55e-3489-463f-ac52-8cb4573c5a81
Runtime:
	Mono 5.2.0.179 (2017-04/4498dc4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000179

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.0.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-003121/Sdks
SDK Version: 1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: 10.10.0.36 (Visual Studio Enterprise)
Hash: d2270eec
Branch: d15-2
Build date: 2017-05-22 16:30:53-0400

=== Xamarin.Mac ===

Version: 3.4.0.36 (Visual Studio Enterprise)

=== Build Information ===

Release ID: 701001259
Git revision: 5cd5ac55e6b5e6ae4344851a48b848b3bdbaa7cd
Build date: 2017-06-27 12:11:08-04
Xamarin addins: f126d8cb21b06b3dc6dd9a45e0f93bb7dfe9eabf
Build lane: monodevelop-lion-dogfood-vNext

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

====================================================================================

In all of the I'm able to login into the application yet, you do get the following in the app output:

2017-06-27 18:44:38.261 FacebookAuthTest2[29931:26531006] Xamarin.iOS: Established connection with the IDE (fd: 7)
2017-06-27 18:44:38.261 FacebookAuthTest2[29931:26531006] Xamarin.iOS: Processing: 'start profiler: no'
2017-06-27 18:44:38.261 FacebookAuthTest2[29931:26530991] Xamarin.iOS: Debugger loaded with custom transport (fd: 5)
2017-06-27 18:44:38.263 FacebookAuthTest2[29931:26530991] Xamarin.iOS: Profiler not loaded (disabled)
2017-06-27 18:44:38.336 FacebookAuthTest2[29931:26530991] Xamarin.iOS: Added dllmap for objc_msgSend
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/Xamarin.iOS.dll [External]
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], string, string)' to /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:61 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], System.Type, System.Type)' to /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:68 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[])' to /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:73 [0x00000].
Resolved pending breakpoint for 'UIKit.UIApplication.Main(string[], System.IntPtr, System.IntPtr)' to /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/UIKit/UIApplication.cs:78 [0x00000].
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/FacebookAuthTest2.exe
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/Facebook.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/Mono.Security.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.Xml.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/Mono.Data.Sqlite.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.Data.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.Numerics.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.Core.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/System.Transactions.dll [External]
Loaded assembly: /Users/mandel/Library/Developer/CoreSimulator/Devices/50AEB80A-AE9A-45CC-9A14-9A08218B3BA2/data/Containers/Bundle/Application/3139818F-2DF9-46F9-8106-41CC9D068D14/FacebookAuthTest2.app/Mono.Data.Tds.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.Interactive.framework/Versions/Current/Agents/Forms/iOS/Xamarin.Interactive.iOS.dll [External]
2017-06-27 18:44:39.058 FacebookAuthTest2[29931:26531014] Xamarin.iOS: Unable to locate assembly 'Xamarin.Interactive' (culture: '')
2017-06-27 18:44:39.058 FacebookAuthTest2[29931:26531014] Xamarin.iOS: Unable to locate assembly 'Xamarin.Interactive' (culture: '')
2017-06-27 18:44:39.059 FacebookAuthTest2[29931:26531014] Xamarin.iOS: Unable to locate assembly 'Xamarin.Interactive' (culture: '')
2017-06-27 18:44:39.060 FacebookAuthTest2[29931:26531014] Xamarin.iOS: Unable to locate assembly 'Xamarin.Interactive' (culture: '')
Loaded assembly: /Library/Frameworks/Xamarin.Interactive.framework/Versions/Current/Agents/Forms/iOS/Xamarin.Interactive.dll [External]
2017-06-27 18:44:40.703 FacebookAuthTest2[29931:26530991] -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2017-06-27 18:44:40.703 FacebookAuthTest2[29931:26530991] Falling back to storing access token in NSUserDefaults because of simulator bug
2017-06-27 18:44:40.713 FacebookAuthTest2[29931:26530991] -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"


Which I believe is related to the fact that the FB app is missing. \Nevertheless the app gets to the point where FB complains about the fact that the app is in development mode. Please can you confirm that the issue was indeed fixed?
Comment 11 gaoyuan_chen 2017-06-28 14:06:11 UTC
Would you like me to test on the Visual studio preview version of this?
Comment 12 gaoyuan_chen 2017-06-28 17:53:08 UTC
I tested both my test app and production app on Preview version and they did not work on real device. (It works on simulator as I mentioned before).

=========================================================
Visual Studio Enterprise 2017 for Mac (Preview)
Version 7.1 Preview (7.1 build 583)
Installation UUID: 7bb6cba4-779a-4032-a144-9407b152aff4
Runtime:
	Mono 5.2.0.104 (2017-04/4a0006f) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000104

NuGet
Version: 4.0.0.2323

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/4.8.1/lib/mono/msbuild/15.0/bin/Sdks

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

Apple Developer Tools
Xcode 8.3.3 (12175.1)
Build 8E3004b

Xamarin.Mac
Version: 3.5.0.126 (Visual Studio Enterprise)

Xamarin.iOS
Version: 10.11.0.126 (Visual Studio Enterprise)
Hash: 7571635e
Branch: master
Build date: 2017-05-09 16:04:54-0400

Operating System
Mac OS X 10.12.4
Darwin 16.5.0 Darwin Kernel Version 16.5.0
    Fri Mar  3 16:52:33 PST 2017
    root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
=========================================================

================================Exception======================================
   Mono.Data.Sqlite.SqliteException: Library used incorrectly
-------------------------------------------------------------------------------  
HResult: -2147467259
------------------------------------------------------------------------------- 
StackTrace:
"  at Mono.Data.Sqlite.SqliteConnection.SetConfig (Mono.Data.Sqlite.SQLiteConfig config) [0x00013] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.11.0.126/src/mono/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLiteConnection.cs:2308 \n  at FacebookAuthTest2.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x00002] in /Users/chenga/Projects/FacebookAuthTest2/FacebookAuthTest2/AppDelegate.cs:23 \n  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)\n  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/1381/7571635e/source/xamarin-macios/src/UIKit/UIApplication.cs:79 \n  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/1381/7571635e/source/xamarin-macios/src/UIKit/UIApplication.cs:63 \n  at FacebookAuthTest2.Application.Main (System.String[] args) [0x00008] in /Users/chenga/Projects/FacebookAuthTest2/FacebookAuthTest2/Main.cs:12 "
-------------------------------------------------------------------------------
Comment 13 Manuel de la Peña [MSFT] 2017-07-03 15:47:58 UTC
Reopening to do some more testing. Can you let me know the version of the iOS device you have used to test? I have in my hand a few iOS 11. But I need to make sure I test in the same version you got the bug.
Comment 14 gaoyuan_chen 2017-07-03 15:50:32 UTC
Yes, I tested on iOS version 10.3.1 on iPhone 7
Comment 15 gaoyuan_chen 2017-07-10 13:43:43 UTC
Hi @Manuel, is there any updates for this bug or any workaround yet? Thank you for your time
Comment 16 Manuel de la Peña [MSFT] 2017-07-13 11:30:03 UTC
Hello,

We have confirmed the bug, now is up to the mono team to take a look on what is exactly happening. I have tested out Sqlite package and that is not the issue and might be related to what is ship from Facebook. In that case, there is not much we can do in our side about it. Sorry for the bad news.
Comment 17 gaoyuan_chen 2017-07-13 14:01:47 UTC
Got it. Hopefully mono team could figure out something. Who shall I contact for the mono Team?
Comment 18 Manuel de la Peña [MSFT] 2017-07-13 16:17:48 UTC
The mono team leads are directly added in cc to the bug when the team is changed. That is, check the cc or please write in the bug report and they will get the message.
Comment 19 gaoyuan_chen 2017-07-13 16:19:09 UTC
Got it. Thank you!
Comment 20 Vincent Dondain [MSFT] 2017-07-14 19:35:41 UTC
*** Bug 58166 has been marked as a duplicate of this bug. ***
Comment 21 Marek Safar 2017-07-27 12:23:51 UTC
This has nothing to do with BCL.

Bundled ios sqlite is compiled with SQLITE_CONFIG_MULTITHREAD and you are trying to use it as SQLITE_CONFIG_SERIALIZED which you cannot and iOS returns the error.

There is possible workaround of trying to shutdown, config, initialize [0] again but not sure this is officially supported scenario. Another approach is to bundle sqlite compiled with SQLITE_CONFIG_SERIALIZED with your app.

[0] https://stackoverflow.com/questions/8872278/which-threading-mode-is-sqlite-for-ios-compiled-in