Coder Social home page Coder Social logo

microsoft / appcenter-sdk-dotnet Goto Github PK

View Code? Open in Web Editor NEW
303.0 35.0 139.0 11.03 MB

Development repository for the App Center SDK for .NET platforms, including Xamarin

License: Other

C# 98.76% PowerShell 0.06% Shell 0.99% Batchfile 0.19%
appcenter

appcenter-sdk-dotnet's Introduction

GitHub Release NuGet license

Visual Studio App Center SDK for .NET

App Center is your continuous integration, delivery and learning solution for iOS, Android, and Windows apps. Get faster release cycles, higher-quality apps, and the insights to build what users want.

The App Center SDK uses a modular architecture so you can use any or all of the following services:

  1. App Center Analytics: App Center Analytics helps you understand user behavior and customer engagement to improve your app. The SDK automatically captures session count, device properties like model, OS version, etc. You can define your own custom events to measure things that matter to you. All the information captured is available in the App Center portal for you to analyze the data.

  2. App Center Crashes: App Center Crashes will automatically generate a crash log every time your app crashes. The log is first written to the device's storage and when the user starts the app again, the crash report will be sent to App Center. Collecting crashes works for both beta and live apps, i.e. those submitted to the App Store. Crash logs contain valuable information for you to help fix the crash.

  3. App Center Distribute: App Center Distribute will let your users install a new version of the app when you distribute it via the App Center. With a new version of the app available, the SDK will present an update dialog to the users to either download or postpone the new version. Once they choose to update, the SDK will start to update your application.

    Google Play considers the in-app update code as malicious behavior even if it isn’t used at runtime. Please use App Center Distribute Play instead before submitting your app to Google Play. Failure to not remove the in-app update code can lead to noncompliance and removal of the app from Google Play. See Remove in-app updates for Google Play builds documentation for details.

  4. App Center Distribute Play: App Center Distribute Play is stubbing the Distribute package's APIs to avoid Google Play rejecting the application for malicious behavior. It must be used only for build variants which are going to be published on Google Play.

1. Get started

It is super easy to use App Center. Have a look at our get started documentation and onboard your app within minutes. Our detailed documentation is available as well.

2. Contributing

We are looking forward to your contributions via pull requests.

2.1 Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

2.2 Contributor License

You must sign a Contributor License Agreement before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the form and then electronically sign the CLA when you receive the email containing the link to the document. You need to sign the CLA only once to cover submission to any Microsoft OSS project.

3. Contact

3.1 Support

App Center SDK support is provided directly within the App Center portal. Any time you need help, just log in to App Center, then click the blue chat button in the lower-right corner of any page and our dedicated support team will respond to your questions and feedback. For additional information, see the App Center Help Center.

3.2 Twitter

We're on Twitter as @vsappcenter.

appcenter-sdk-dotnet's People

Contributors

achocron avatar anatolypristensky avatar cloudwu1 avatar dhei avatar dmitriykirakosyan avatar dorothysun216 avatar dtrabo avatar elamalani avatar erychagov avatar guperrot avatar iamclement avatar jaeklim avatar jamminroot avatar luyaliu avatar matkovivan avatar mehrdadmzfr avatar micarls avatar mikhailsuendukov avatar olmisa avatar owenniblock avatar owlstronaut avatar snrnats avatar subhashvysyaraju avatar thyeggman avatar tjyung avatar udayanalla avatar v-eacaoi avatar vvechkanov avatar yuyaohu avatar zongrenfeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appcenter-sdk-dotnet's Issues

Crashes.GetErrorAttachments is not called in Xamarin.iOS

I used Contoso.iOS.Puppet app and changed FinishLaunching to add additional information to the crash.

However, generating test crash does trigger GetErrorAttachments after crash or on a next app start (like Android dos).

Please advise.

        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            MobileCenter.LogLevel = LogLevel.Verbose;
            MobileCenter.SetLogUrl("https://in-integration.dev.avalanch.es");
            MobileCenter.Start("MY_APP_ID_HERE", typeof(Analytics), typeof(Crashes));
            try
            {
                ThrowAnException();
            }
            catch (Exception e)
            {
                MobileCenterLog.Verbose("THETAG", "THEMESSAGE", e);
            }
            //----------
            Crashes.GetErrorAttachments = OnGenerateErrorAttach;
            Crashes.ShouldProcessErrorReport = (ErrorReport report) =>
                       {
                           return true;
                       };
            //----------
            Analytics.SetEnabledAsync(true);
            System.Diagnostics.Debug.WriteLine("ANALYTICS: " + Analytics.IsEnabledAsync().Result);
            return true;
        }

        private IEnumerable<ErrorAttachmentLog> OnGenerateErrorAttach(ErrorReport report)
        {
            yield return ErrorAttachmentLog.AttachmentWithText("abc", "def.txt");
        }

Original source code: https://github.com/Microsoft/mobile-center-sdk-dotnet/blob/880fac6b1ea87e51ab0dbbe0da8a1efb4b1a59e3/Apps/Contoso.iOS.Puppet/AppDelegate.cs

Please advise as I would like to provide additional information with the crash.

Crash in ApplyEnabledState() UWP SDK

I am using MobileCenter SDK 0.17.1.
I guess CreatePushNotificationChannelForApplicationAsync() causes crashes
Exceptions code are different:

  • TaskExceptionHolder_UnhandledException (The notification platform does not have the proper privileges to complete the request. (Excep_FromHResult 0x803E0208))
  • TaskExceptionHolder_UnhandledException (The object invoked has disconnected from its clients. (Excep_FromHResult 0x80010108))
  • TaskExceptionHolder_UnhandledException (A notification channel request for the provided application identifier is in progress. (Excep_FromHResult 0x803E0103))
  • TaskExceptionHolder_UnhandledException (Excep_FromHResult 0x880403E9)
  • And others

0 SharedLibrary 0x00007fff7db31c61 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs at 61:13 1 SharedLibrary 0x00007fff7db85ce0 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 182:25 2 SharedLibrary 0x00007fff7db85c68 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 151:42 3 SharedLibrary 0x00007fff7db85c27 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 123:17 4 CryptoCoins.UWP 0x00007fff642a24fa Microsoft.Azure.Mobile.Push.Push.<>c__DisplayClass5_0.<<ApplyEnabledState>b__0>d.MoveNext() in at 0:0

"Native linking failed" error occured when using Mobile Center in Xamarin.iOS project

When we add mobile center nuget package to our Xamarin.iOS project and then build (Release for Device) will failed because of "Native Linking Failed" error as below:

...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSAppDelegateForwarder. The symbol '_OBJC_CLASS_$_MSAppDelegateForwarder' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSChannelConfiguration. The symbol '_OBJC_CLASS_$_MSChannelConfiguration' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSHttpSender. The symbol '_OBJC_CLASS_$_MSHttpSender' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSKeychainUtil. The symbol '_OBJC_CLASS_$_MSKeychainUtil' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSLogger. The symbol '_OBJC_CLASS_$_MSLogger' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSMobileCenter. The symbol '_OBJC_CLASS_$_MSMobileCenter' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSSenderUtil. The symbol '_OBJC_CLASS_$_MSSenderUtil' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSServiceAbstract. The symbol '_OBJC_CLASS_$_MSServiceAbstract' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSUserDefaults. The symbol '_OBJC_CLASS_$_MSUserDefaults' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MSUtility. The symbol '_OBJC_CLASS_$_MSUtility' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined Objective-C class: MS_Reachability. The symbol '_OBJC_CLASS_$_MS_Reachability' could not be found in any of the libraries or frameworks linked with your application.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined symbol: _OBJC_METACLASS_$_MSHttpSender. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed, undefined symbol: _OBJC_METACLASS_$_MSServiceAbstract. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'BCrypt' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-file-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-localization-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-processthreads-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-io-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-synch-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-handle-l1-1-0' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-libraryloader-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-sysinfo-l1-2-1' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-sysinfo-l1-2-0' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'api-ms-win-core-errorhandling-l1-1-1' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): warning : References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
...\Xamarin.iOS.Common.targets(748,3): error : Native linking failed. Please review the build log.
7>  Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution finished. (Task ID: 277)

Environment:

  • Visual Studio 15.3.3
  • Xamarin 4.6.0.299
  • Xamarin.iOS and Xamarin.Mac SDK 10.12.0.20
  • Mobile Center: 0.14

Mobile Center Push Incompatible with Xamarin.Forms AppLinks

Description

If a File -> New Blank Xamarin.Forms app is created, the Xamarin.Forms App Links NuGet Package is added and the Mobile Center Push NuGet Package is added, the Android app will crash at run-time.

This runtime crash is happening because Xamarin.Forms App Links has a dependency on Xamarin.GooglePlayServices.Basement v29.0.0.1, but Mobile Center Push has a dependency on Xamarin.GooglePlayServices.Basement v42.1021.1.

Reproduction

https://github.com/brminnick/XamarinForms-MobileCenterPush-AppLinks-Repro/

Bug Tracking

This bug is being tracked by the Xamarin.Forms team in Bugzilla.

Runtime Crash

Could not load type of field 'Xamarin.Forms.Platform.Android.AppLinks.AndroidAppLinks:_client' (0) due to: Could not resolve type with token 01000013 (from typeref, class/assembly Android.Gms.Common.Apis.GoogleApiClient, Xamarin.GooglePlayServices.Basement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) assembly:Xamarin.GooglePlayServices.Basement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:Android.Gms.Common.Apis.GoogleApiClient member:

Distribute on IOS randomly ask to reinstall the app

In-App Updates are very unstable on IOS. It randomly (and often) asks to reinstall the app pretending the app would have been side loaded. This is happening with 1.1 and 1.2.

In-app updates disabled

This release was either side-loaded or downloaded using a browser in private mode.

Ignore | Reinstall app

In addition, I don't really get why we have this clunky sign in popin which really gets in the way. The experience on Hockey App was much better and stable for that matter.

Missing Method Exception in Start method for UWP (Xamarin Forms)

I added the mobile centre SDK to my xamarin forms app and then added the below in App.xaml.cs:
MobileCenter.Start("ios=eab5ae24-2c21-4bc4-af8b-bdc01b41d27d;" +
"uwp=08df195d-1f0d-42db-bf5c-70de451d9e3a" +
"android=fab0066e-af9a-494f-b677-b231cfec53b9",
typeof(Analytics), typeof(Crashes));

It works well in iOS and Andriod but results in the below error in UWP:

System.MissingMethodException occurred
HResult=0x80131513
Message=Method not found: 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken Windows.ApplicationModel.Core.CoreApplication.add_LeavingBackground(System.EventHandler`1<Windows.ApplicationModel.LeavingBackgroundEventArgs>)'.
Source=
StackTrace:
at Microsoft.Azure.Mobile.Utils.ApplicationLifecycleHelper..ctor()
at Microsoft.Azure.Mobile.Utils.ApplicationLifecycleHelper.get_Instance()
at Microsoft.Azure.Mobile.MobileCenter.InstanceConfigure(String appSecretOrSecrets)
at Microsoft.Azure.Mobile.MobileCenter.StartInstanceAndConfigure(String appSecret, Type[] services)
at Microsoft.Azure.Mobile.MobileCenter.PlatformStart(String appSecret, Type[] services)
at Microsoft.Azure.Mobile.MobileCenter.Start(String appSecret, Type[] services)
at TILL.POS.App.OnStart() in C:\Source\Till-POS\2.Clients\TILL.POS\App.xaml.cs:line 199
at Xamarin.Forms.Platform.UWP.WindowsBasePage.LoadApplication(Application application)

Crash in DefaultScreenSizeProvider on app launch UWP SDK

I am getting crash reports. It happens right after in-process background task is activated.

Crash log

Date/Time: 2017-08-13T18:06:26.562Z OS Version: Windows 10.0.15063.540 Report Version: 104

Exception Type: System.AggregateException
Crashed Thread: 2

Application Specific Information:
TaskExceptionHolder_UnhandledException (Unspecified error

Windows.Graphics.Display: There is no physical display associated with the current view.)

Exception Stack:
unknown location
SharedLibrary!+0x4a29f0
CryptoCoins.UWP!+0xfdfcc2
CryptoCoins.UWP!+0x11a0a3e
CryptoCoins.UWP!+0x14431fe
SharedLibrary!+0x4f7078
SharedLibrary!+0x44fb17
Microsoft.Azure.Mobile.Utils.DefaultScreenSizeProvider.<.ctor>b__5_0()
System.Action.Invoke()
SharedLibrary!+0x4f7205
SharedLibrary!+0x4f712c

Thread 2 Crashed:
0 SharedLibrary 0x00007ffeacf829f0 System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32 hr, RuntimeTypeHandle typeHnd) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgMarshal.cs at 1267:13
1 CryptoCoins.UWP 0x00007ffeab50fcc2 __Interop.ComCallHelpers.Call($__ComObject __this, RuntimeTypeHandle __typeHnd, Int32 __targetIndex, Void* arg0, Void* arg1) in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Packages\appcompile-20170810-073024-2860\AC\Temp\Ilc962331225\CryptoCoins.UWP.McgInterop\SharedStubs.g.cs at 12435:5
2 CryptoCoins.UWP 0x00007ffeab6d0a3e __Interop.ForwardComStubs.Stub_331<System.__Canon>(Void* InstParam, $__ComObject __this, $TypedEventHandler$2<$DisplayInformation,Object> handler, Int32 __targetIndex) in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Packages\appcompile-20170810-073024-2860\AC\Temp\Ilc962331225\CryptoCoins.UWP.McgInterop\SharedStubs.g.cs at 11164:5
3 CryptoCoins.UWP 0x00007ffeab9731fe Windows.Graphics.Display.DisplayInformation.add_ColorProfileChanged($TypedEventHandler$2<$DisplayInformation,Object> handler) in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Packages\appcompile-20170810-073024-2860\AC\Temp\Ilc962331225\CryptoCoins.UWP.McgInterop\SafeTypes.g.cs at 59034:4
4 SharedLibrary 0x00007ffeacfd7078 System.Threading.TimerCallback.Invoke(Object state) in at 0:0
5 SharedLibrary 0x00007ffeacf2fb17 System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.NativeOrStaticEventRegistrationImpl.AddEventHandler<System.__Canon>(Void* InstParam, Func$2<__Canon,$EventRegistrationToken> addMethod, Action$1<$EventRegistrationToken> removeMethod, __Canon handler) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\WindowsRuntimeMarshal.cs at 687:17
6 CryptoCoins.UWP 0x00007ffeab973006 Microsoft.Azure.Mobile.Utils.DefaultScreenSizeProvider.<.ctor>b__5_0() in at 0:0
7 SharedLibrary 0x00007ffeacf55838 System.Action.Invoke() in at 0:0
8 SharedLibrary 0x00007ffeacfd7205 System.Threading.Tasks.Task.InnerInvoke() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Threading\Tasks\Task.cs at 2444:17
9 SharedLibrary 0x00007ffeacfd712c System.Threading.Tasks.Task.Execute() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Threading\Tasks\Task.cs at 2286:17

Binary Images:
0x00007ffeacae0000 - 0x00007ffead204000 +SharedLibrary unknown <2ec8fd7253da4eb28abd89dffa73f81d-1> f:\ddSetup\SD\0\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret\Native\SharedLibrary.pdb
0x00007ffeaa530000 - 0x00007ffeabf32000 +CryptoCoins.UWP unknown <4878a6885b4b47219f0a74aae47f7148-1> D:\data\PkgProc\JJ68QT6q2km5BO3OIyxL0w\ExtractedBundle\CryptoCoins.UWP_1.0.62.0_x64\CryptoCoins.UWP.pdb

Export analytics, crashes and other telemetry?

Is there a way to export analytics, crashes and other telemetry?

Also, what is the retention policy for analytics on Mobile Center? The dropdown only has options for 'Last 7/30/60/90 days'. Does that mean there is a limit of 90 days?

Can we export the telemetry to our systems so that we can query data after 90 days?

Using MobileCenter.Start() in OnLaunched() causes errors in logs UWP SDK

In MobileCenter UWP documentation you suggest adding MobileCenter.Start() in the application OnLaunched() method. But it will produce an error to log if you try to start an application while it's already running or suspended. E.g. clicking the app tile or starting from application list when the app is running.
[MobileCenter] ERROR: Failed to start services Microsoft.Azure.Mobile.MobileCenterException: Multiple attempts to configure Mobile Center at Microsoft.Azure.Mobile.MobileCenter.InstanceConfigure(String appSecretOrSecrets) at Microsoft.Azure.Mobile.MobileCenter.StartInstanceAndConfigure(String appSecret, Type[] services)

Didn't find class "md5077d3f1b65f0ebbab0ee71c2383ed9a2.AndroidCrashListener

Get TargetInvocationException in release mode on Xamarin.Android with Multi-dex enabled.

12-17 16:14:05.343 I/MonoDroid( 5125): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Microsoft.AppCenter.Crashes.Crashes' threw an exception. ---> Java.Lang.ClassNotFoundException: Didn't find class "md5077d3f1b65f0ebbab0ee71c2383ed9a2.AndroidCrashListener" on path: DexPathList[[zip file "/data/app/fiveminute.toeicphoto.droid-1/base.apk"],nativeLibraryDirectories=[/data/app/fiveminute.toeicphoto.droid-1/lib/arm64, /data/app/fiveminute.toeicphoto.droid-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]] 12-17 16:14:05.343 I/MonoDroid( 5125): at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x00114] in <319dac7ba7564adc955025895d5353b6>:0 12-17 16:14:05.343 I/MonoDroid( 5125): at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <319dac7ba7564adc955025895d5353b6>:0 12-17 16:14:05.343 I/MonoDroid( 5125): at Java.Interop.JniPeerMembers+JniInstanceMethods..ctor (System.Type declaringType) [0x00064] in <319dac7ba7564adc955025895d5353b6>:0 12-17 16:14:05.343 I/MonoDroid( 5125): at Java.Interop.JniPeerMembers+JniInstanceMethods.GetConstructorsForType (System.Type declaringType) [0x0002c] in <319dac7ba7564adc955025895d5353b6>:0 12-17 16:14:05.344 I/MonoDroid( 5125): at Java.Interop.JniPeerMembers+JniInstanceMethods.StartCreateInstance (System.String constructorSignature, System.Type declaringType, Java.Interop.JniArgumentValue* parameters) [0x00032] in <319dac7ba7564adc955025895d5353b6>:0 12-17 16:14:05.344 I/MonoDroid( 5125): at Java.Lang.Object..ctor () [0x00034] in <ac06db5fbce34cf48377b108a8d23789>:0 12-17 16:14:05.344 I/MonoDroid( 5125): at Microsoft.AppCenter.Crashes.AndroidCrashListener..ctor (Microsoft.AppCenter.Crashes.PlatformCrashes owner) [0x00000] in <8ab89aac5c594cccad87baafb7dfe305>:0 12-17 16:14:05.344 I/MonoDroid( 5125): at Microsoft.AppCenter.Crashes.PlatformCrashes..ctor () [0x00006] in <8ab89aac5c594cccad87baafb7dfe305>:0 12-17 16:14:05.344 I/MonoDroid( 5125): at Microsoft.AppCenter.Crashes.Crashes..cctor () [0x0000a] in <8ab89aac5c594cccad87baafb7dfe305>:0

Unable to use Xamarin Forms previewer with Mobile Center SDK

I just recently added the Mobile Center SDK to my Xamarin Forms app, then realized it broke Xamarin Forms previewer for my forms pages. The exception is...

Could not create an native instance of the type 'Microsoft.Azure.Mobile.iOS.Bindings.MSWrapperSdk': the native class hasn't been loaded.

I can't copy the full error, so here's a screenshot...

image

Visual Studio for Mac: 7.3 build 740
Xamarin Forms: 2.4.0.74863
Mobile Center SDK: 0.17.1

Sometimes App hangs without internet connection UWP SDK

I am using MobileCenter 0.17.1 in the App. I've got a lot of hangs in Developer Dashboard. I suspect MobileCenter.Start method in App.ctor().
devCenter.zip

I was able to reproduce the hang in local environment both MobileCenter 0.17.1 and AppCenter 1.0.1. It happens rarely. Steps:

  • Disable internet on the target device.
  • Run a in-process background task without launching the app.
  • It hangs on PauseExecutionUntilNetworkBecomesAvailable()
    -- I also tried disable/enable internet connection while running background task. It seems to cause issue much often.
    appcenterlog.txt
    LocalDump
    untitled

Attachments don't show up in Mobile Center

Crashes_GetErrorAttachment callback gets called. Verbose logging shows

"os_exception_address" : "0x1171d0f06",
"os_exception_code" : "#0",
"error_attachment" : {
        "binary_attachment" : {
          "file_name" : "image.png",
          "data" : "mydatahere",
          "content_type" : "image/png"
        }
      }

and crash shows up in Mobile Center, but no attachment. Is the display of attachments associated with a crash not implemented yet in Mobile Center?

Not seeing any events in the events tab of a crash report

I thought events were supposed to be like breadcrumbs for a crash report. I see events in Analytics-Events (and also I see them in Log Flow), but I don't see any events showing up in Crashes-Group-Report-Events. I just see

Collecting data…
If you don’t see any logs here after a few minutes, please ensure your app has the App Center Analytics SDK installed.

Is there something else I need to do? I can't find any additional steps in the documentation. Seems like it ought to work.

Send Crashes at the time of Crash, not on restart?

I believe that you are copying Crash logging logic from Hockeyapp and I dont know who favors those delayed crash reports! In my opinion, It is super useless.. In my experience, If new user gets a crash on a new app, he will not open the app 2nd time and will just uninstall it and you will never know that his exception even exist. Why would you locally store it and send it later?
You have already had better logic with Xamarin Insights way. I am getting crash instantly on Xamarin Insights, I dont need to restart the app. And this is the reason still today many of us stick with Xamarin Insights.
Devs want to 2 things for crash reporting

  1. Real time crashes, not delayed on next start of the app.
  2. Handled exceptions (already other issue exist)
    These 2 are working perfectly on xamarin Insights. why cant we get it in mobile center?

Ability to defer registering for notifications on iOS

It is very common for an application to provide an onboarding carousel or other guidance to the user to improve the chances of them opting into push notifications.

By requiring that all the services be started at once, there is no way to start crash reporting and analytics at an appropriate time while still being able to prompt the user prior to the OS-provided prompt to be displayed.

I would propose an info.plist flag to defer the call to RegisterForRemoteNotifications() similar to AppCenterAppDelegateForwarderEnabled and provide a method to be called later such as Push.Register().

I hope that makes sense. Would this be something that would be acceptable if a pull request were to be generated?

Including Mobile Center SDK in Android app causing randomly app crashes.

Mobile Center included in MainApplication.OnCreate.

 [Application]
    public class MainApplication : Application
    {
        protected MainApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
        {
        }

       public override void OnCreate()
        {
                MobileCenter.Start("there is my guid", typeof(Crashes));
        }
}

Sometimes when I open activity app crashes with SIGABRT or SIGSEGV.

I repeat it issue on two devices in two different ways:

  1. One Plus 3. I finish one activity and launch another activity which contains WebView. It fails with:
W/google-breakpad(16680): ### ### ### ### ### ### ### ### ### ### ### ### ###
W/google-breakpad(16680): Chrome build fingerprint:
W/google-breakpad(16680): 1.0
W/google-breakpad(16680): 1
W/google-breakpad(16680): ### ### ### ### ### ### ### ### ### ### ### ### ###
A/libc(16680): Fatal signal 6 (SIGABRT), code -6 in tid 16747 (RenderThread)
W/(462): debuggerd: handling request: pid=16680 uid=10065 gid=10065 tid=16747
D/ActivityTrigger(3927): ActivityTrigger activityStopTrigger
A/DEBUG(16982): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
A/DEBUG(16982): Build fingerprint: 'OnePlus/OnePlus3/OnePlus3:7.1.1/NMF26F/09151000:user/release-keys'
A/DEBUG(16982): Revision: '0'
A/DEBUG(16982): ABI: 'arm'
A/DEBUG(16982): pid: 16680, tid: 16747, name: RenderThread >>> there_is_app_name <<<
A/DEBUG(16982): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr 
A/DEBUG(16982): Abort message: 'Mobile Center SDK configured successfully.'
A/DEBUG(16982): r0 00000000 r1 0000416b r2 00000006 r3 00000008
A/DEBUG(16982): r4 cea7a978 r5 00000006 r6 cea7a920 r7 0000010c
A/DEBUG(16982): r8 f58c9008 r9 0000004f sl cea7983c fp 0000000a
A/DEBUG(16982): ip 0000000b sp cea79788 lr f5884517 pc f5886d98 cpsr 200f0010
A/DEBUG(16982): backtrace:
A/DEBUG(16982): #00 pc 00049d98 /system/lib/libc.so (tgkill+12)
A/DEBUG(16982): #01 pc 00047513 /system/lib/libc.so (pthread_kill+34)
A/DEBUG(16982): #02 pc 0001d765 /system/lib/libc.so (raise+10)
A/DEBUG(16982): #03 pc 000192a1 /system/lib/libc.so (__libc_android_abort+34)
A/DEBUG(16982): #04 pc 00017308 /system/lib/libc.so (abort+4)
A/DEBUG(16982): #05 pc 002a6235 /data/app/com.google.android.webview-2/lib/arm/libwebviewchromium.so

This error happens only on this device. I tried others, all works ok.

  1. Xiaomi Redmi. Fails when I try launch activity with many UI elements on screen.
Build fingerprint: 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/V8.5.6.0.MHOMIED:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 10730, tid: 12015, name: Thread-16370  >>> there_is_app_name <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Abort message: 'Mobile Center SDK configured successfully.'
    x0   0000000000000000  x1   0000000000000000  x2   2683544603596ed8  x3   0000000000000070
    x4   00000055687dfea0  x5   00000055687dfe38  x6   0000000000000000  x7   0000000000000000
    x8   0000005569c6919f  x9   0000000000000061  x10  0000005569c6919f  x11  0101010101010101
    x12  000000000000002f  x13  0000005569c69171  x14  0000000000000030  x15  0000005569c6916f
    x16  0000007fb3835ec0  x17  0000007fb6aff6a4  x18  000000000000001c  x19  0000007fb378a000
    x20  0000007fb2dfb200  x21  0000007fb3788000  x22  0000007fb3836000  x23  00000055687dfe30
    x24  0000000000000000  x25  0000007fb3836000  x26  0000000000000001  x27  0000000000000000
    x28  0000000000000000  x29  0000007fb2dfb070  x30  0000007fb33312ec
    sp   0000007fb2dfb070  pc   0000007fb6aff6b4  pstate 0000000040000000

backtrace:
    #00 pc 000000000001a6b4  /system/lib64/libc.so (strlen+16)
    #01 pc 00000000001292e8  /system/lib64/libart.so (_ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc+60)
    #02 pc 000000000045b710  /system/lib64/libart.so (_ZN3art6Thread6AttachEPKcbP8_jobjectb+1012)
    #03 pc 000000000042f30c  /system/lib64/libart.so (_ZN3art7Runtime19AttachCurrentThreadEPKcbP8_jobjectb+24)
    #04 pc 000000000030a524  /system/lib64/libart.so (_ZN3art3JII19AttachCurrentThreadEP7_JavaVMPP7_JNIEnvPv+208)
    #05 pc 000000000014523c  /system/lib64/libart.so (_ZN3art8CheckJII19AttachCurrentThreadEP7_JavaVMPP7_JNIEnvPv+124)
    #06 pc 0000000000011b74  /data/app/there_is_app_name-1/lib/arm64/libmonodroid.so
    #07 pc 000000000017f660  /data/app/Mono.Android.DebugRuntime-1/lib/arm64/libmonosgen-64bit-2.0.so

When I remove Mobile Center SDK line in MainApplication - all works ok.
Application targetting Android API 24. Installed Latest Xamarin SDK. Used Mirosoft.Azure.Mobile 0.15.0 AppCompat version 25.3.1.

Custom Exception type with Xamarin.Android and AppCenter SDK "is not marked as serializable."

Hi!

Wondering, how do we resolve this warning below?
ApiException is defined in the PCL (I know I know) and is marked with [DataContract].

[MobileCenterCrashes] System.Runtime.Serialization.SerializationException: Type '***********.Sdk.Core.ApiException' in Assembly '***********.Sdk.Core, Version=1.0.6541.21029, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize (System.Object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) [0x00107] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize (System.Object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) [0x00006] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize (System.Object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, System.Boolean fCheck) [0x0018b] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers, System.Boolean fCheck) [0x0006e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 
[MobileCenterCrashes]   at Microsoft.Azure.Mobile.Crashes.CrashesUtils.SerializeException (System.Exception exception) [0x0000c] in <39aacded211f4ad3ac8b3f87600853cf>:0 

Thank you!

Updated from 0.13.1 to 0.14 and Receiving "error: cannot find symbol" on Android Build

I updated from 0.13.1 to 0.14 and am now receiving "error: cannot find symbol" when building for Android.

Minimum Android Version: API Level 15 (4.0.3)
Target: API 25

/DroidApp/obj/Debug/android/src/md5bf7db09e0a40f5ef5da2cf34b1b37d54/PlatformCrashes_CrashListener.java(45,45): Error:  error: cannot find symbol
		com.microsoft.azure.mobile.crashes.Crashes.WrapperSdkListener
  symbol:   class WrapperSdkListener
  location: class Crashes
 (SafeUT.Droid) javac

/DroidApp/obj/Debug/android/src/md5bf7db09e0a40f5ef5da2cf34b1b37d54/PlatformCrashes_GetLastSessionCrashReportCallback.java(29,29): Error:  error: cannot find symbol
		com.microsoft.azure.mobile.ResultCallback
  symbol:   class ResultCallback
  location: package com.microsoft.azure.mobile
 (SafeUT.Droid) javac

/DroidApp/obj/Debug/android/src/mono/com/microsoft/azure/mobile/crashes/Crashes_WrapperSdkListenerImplementor.java(45,45): Error:  error: cannot find symbol
		com.microsoft.azure.mobile.crashes.Crashes.WrapperSdkListener
  symbol:   class WrapperSdkListener
  location: class Crashes
 (SafeUT.Droid)

Thanks,

John

Manually sending Exceptions

The Xamarin Insights SDK has the possibility to manually send an Exception object to the backend. This is very useful in cases where you are able to try/catch Exceptions from which you can recover (show message to user) but would like to have more insights into how and when these occur in a production app.
I don't see that possibility in the current mobile center SDK. There is however the possibility to send a test crash (void GenerateTestCrash ();), so I don't see how it could be hard generalizing this to accept an Exception object.
The only option I see at this point is to serialize the exception object and to send it as a Analytics event to the backend, which feels like a hack.
Am I missing something, is this a feature on the roadmap or is this not considered?

Thanks.

Can't use Microsoft.AppCenter.Crashes in Multi-Targeted projects

The NuGet package installs correctly, but when trying to compile, you get hit with this error:

Microsoft.AppCenter.Crashes.targets(14,5): error : Please build your project specifically for one of the following platforms: x86, x64, ARM

Is there a way around this, or is there a way to compile .NET standard projects for specific architectures?

Edit: On closer assessment, it happens because one of the targets of the project is uap10.0, and that is causing the issue.

Analytics.TrackEvent is broken after handling UnhandledException event in UWP App

After handling an otherwise unhandled exception, Analytics.TrackEvent becomes broken.

I handle an unhandled exception as so in App.xaml.cs:

    public App()
    {
        this.UnhandledException += App_UnhandledException;
    }

    private void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
    {
        e.Handled = true;
    }

Henceforth, all calls to Analytics.TrackEvent generate the following message in the debug output:

[AppCenter] ERROR: Error persisting log
Microsoft.AppCenter.Storage.StorageException: The operation has been cancelled
at Microsoft.AppCenter.Storage.Storage.PutLog(String channelName, Log log)
at Microsoft.AppCenter.Channel.Channel.d__39.MoveNext()
[AppCenter] ERROR: Error persisting log

The events are indeed not persisted.

documentation says an UWP Crash preview is available, but on nuget it is not.

The App Center's changelog says:

UWP Crash preview released: Visual Studio App Center now offers a preview of our support for getting Crash data from your UWP apps.

The Crashes documentation has an article describing how to use it on UWP:

PM> Install-Package Microsoft.AppCenter.Crashes
AppCenter.Start("{Your App Secret}", typeof(Crashes));

But when I do that, AppCenter states that Crashes is not yet supported:

[AppCenter] ASSERT: App Center SDK configured successfully.
[AppCenter] WARN: Crashes service is not yet supported on this platform.

Is the preview really available? Also I searched this repo for the error message and could not find a thing - where is it logged?

Crash reports on UWP are unreliable

After your explanations in #544, I have contacted the app center support more than a month ago.

Hello!
I have been testing AppCenter SDK's preview that includes crash reporting for UWP.
I have added the SDK and Crashes to my app as is described in your documentation[1], but no crashes are showing up, and the AppCenter-SDK folks have sent me here [2] as they suspect this is not an SDK issue.
A short description of my setup:

The support promptly responded, and asked an interesting question:

Hi, sorry for the trouble! Can you please check if crashes of the app have been sent to your Windows Dev Center portal?

And we indeed have issues with the dev center portal, as you can see here. No matter how often I trigger the exception, nothing except "Unknown" failures are listed, and the unknown hit count is zero:

grafik

Which I immediately reported to the support:

The information displayed on the app's dashboard is inconsistent - It lists 5 failure hits for the most recent package version, but the failure list contains only a TaskCanceledException (1 hit) and Unknown (0 hits). I am dividing by zero, so my test exception is not listed.

The support has not responded to any further inquiry since then (13th of december 2017).

Is the crash report delivery depending on the dev center portal? If so, will you stick with that design decision? We are considering to switch to AppCenterSDK because the dev center is unrealiable in the first place.

sqlite-net-pcl dependency causing challenges on UWP

AppCenter for UWP have a dependency on sqlite-net-pcl. This poses a challenge if the project is already using SQLite in a certain way.

Specifically, if the project have opted for using sqlite-net-base in order to choose a different SQLite-net provide, such as SQLitePCLRaw.bundle_sqlcipher, which is handy if you want to add encryption to the storage of date.

In this case the result is this error:

Severity Code Description Project File Line Suppression State
Error Payload contains two or more files with the same destination path 'SQLitePCLRaw.batteries_v2.dll'. Source files:
C:\Users[...]\packages\sqlitepclraw.bundle_green\1.1.5\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll
C:\Users[...]\packages\sqlitepclraw.bundle_sqlcipher\1.1.9\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll

The workaround should be straight forward, i.e. to create a second set of NuGet's that references sqlite-net-base for UWP.

For iOS and Android there is currently no challenge, since there is no dependency on SQLite for those platforms.

Azure Mobile Center build resulting in error XA5213: java.lang.OutOfMemoryError

I have a Xamarin forms solution targeting Android, iOS and UWP that I am building using the Azure Mobile Center. I added the latest (0.14.0) packages of Microsoft.Azure.Mobile, Microsoft.Azure.Mobile.Analytics and Microsoft.Azure.Mobile.Crashes to the platform-specific libraries as well as the common shared Xamarin.Forms project, and I added the following line of code into the init section for the Xamarin Forms App.xaml.cs file:

MobileCenter.Start("uwp={{mySecret}};" +
                   "android={{mySecret}};" +
                   "ios={{mySecret}};",
    typeof(Analytics));

Locally, I can build all projects fine, and I can run the projects as well. However, if I try to build it on AMC, I get the following error:

"d:\a\1\s\src\MyApp.UI.Android\MyApp.UI.Android.csproj" (default target) (6:2) ->
  COMPILETODALVIK : UNEXPECTED TOP-LEVEL error :  [d:\a\1\s\src\MyApp.UI.Android\MyApp.UI.Android.csproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1965,3): error XA5213: java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing 'java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.2\\lib\dx.jar" --no-strict --dex --output=obj\Release\android\bin obj\Release\android\bin\classes "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v7.1\mono.android.jar" 

I tried to degrade to the previous version (0.13.0), but it results in the same error message. Then just for an experiment, I removed the packages from the solution (all 3) along with that line of code, and it built fine, so I'm certain that the issue is caused by one of them. Have I missed a step while setting this up, or is there a bug in the package somewhere?

Thank you!

Send custom identifiers

It should be able to sent custom info like email or user id manually so we can see exactly how many users are using, not just how many devices are using.

InvalidOperationException in SessionTracker..ctor UWP SDK

I am getting a lot of new crash reports for my UWP app. More details in an attached stack trace and a dump file. I am using 0.16.0 SDK
stackTrace.txt
83098ccc-8f90-45b5-9da6-d7aa4fca1149.ext.zip

STOWED_EXCEPTION_System.InvalidOperationException_80131509_CryptoCoins.UWP.dll!System::Collections::Generic::Dictionary$2_System::Int64,System::Guid_::ValueCollection::Enumerator.MoveNext

System::Collections::Generic::Dictionary$2_System::Int64,System::Guid_::ValueCollection::Enumerator.MoveNext 0xA4 System::Linq::Enumerable.Aggregate_System.Guid,_System.__Canon_ 0x7E Microsoft::Azure::Mobile::Analytics::Channel::SessionTracker..ctor 0x1D9 Microsoft::Azure::Mobile::Analytics::Analytics.CreateSessionTracker 0x4D Microsoft::Azure::Mobile::Analytics::Analytics.ApplyEnabledState 0x61 Microsoft::Azure::Mobile::Analytics::Analytics.OnChannelGroupReady 0x4C Microsoft::Azure::Mobile::MobileCenter.StartService 0xF2 Microsoft::Azure::Mobile::MobileCenter.StartInstance 0x1A5 Microsoft::Azure::Mobile::MobileCenter.StartInstanceAndConfigure 0x29 Microsoft::Azure::Mobile::MobileCenter.PlatformStart 0x54 CryptoCoins::UWP::App.ConfigureMobileCenter 0xC2 CryptoCoins::UWP::App..ctor 0x90 CryptoCoins::UWP::Program::__c._Main_b__0_0 0x18 SQLitePCL::SQLite3Provider_e_sqlite3::NativeMethods::callback_rollback.Invoke 0x28 __Interop::ReverseComStubs.Stub_20_System.__Canon_ 0x6D

Cannot include App Center and Azure Mobile Services in the same project.

It appears the same type (Bindings.MSCustomProperties) is defined in both libraries:

MTOUCH : error MT4116: Could not register the assembly 'Microsoft.AppCenter.iOS.Bindings': error MT4118: Cannot register two managed types ('Microsoft.AppCenter.iOS.Bindings.MSCustomProperties, Microsoft.AppCenter.iOS.Bindings' and 'Microsoft.Azure.Mobile.iOS.Bindings.MSCustomProperties, Microsoft.Azure.Mobile.iOS.Bindings') with the same native name ('MSCustomProperties'). [/Users/vsts/agent/2.124.0/work/1/s/src/GardenHelper.iOS/GardenHelper.iOS.csproj]

urgent: "java.exe" exited with code 2

Installing the latest nugets from Mobile Center
Microsoft.Azure.Mobile
Microsoft.Azure.Mobile.Analytics
Microsoft.Azure.Mobile.Crashes

Breaks Xamarin Forms android with error "java.exe" exited with code 2

Please can we have a fix or work around on urgent basis, I have a release pending.

Native linker errors preventing compiling for iOS Device

Hi,

When I add the Microsoft.Azure.Mobile, Microsoft.Azure.Mobile.Analytics, and Microsoft.Azure.Mobile.Crashes packages to my iOS project, switch the Xamarin Studio active configuration to Debug / Device, and hit build all, I get this:

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSAnalytics. The symbol 'OBJC_CLASS$_MSAnalytics' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSCrashes. The symbol 'OBJC_CLASS$_MSCrashes' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSDevice. The symbol 'OBJC_CLASS$_MSDevice' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSErrorAttachment. The symbol 'OBJC_CLASS$_MSErrorAttachment' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSErrorBinaryAttachment. The symbol 'OBJC_CLASS$_MSErrorBinaryAttachment' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSErrorReport. The symbol 'OBJC_CLASS$_MSErrorReport' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSException. The symbol 'OBJC_CLASS$_MSException' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSLogger. The symbol 'OBJC_CLASS$_MSLogger' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSMobileCenter. The symbol 'OBJC_CLASS$_MSMobileCenter' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSServiceAbstract. The symbol 'OBJC_CLASS$_MSServiceAbstract' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSStackFrame. The symbol 'OBJC_CLASS$_MSStackFrame' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSWrapperExceptionManager. The symbol 'OBJC_CLASS$_MSWrapperExceptionManager' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSWrapperLogger. The symbol 'OBJC_CLASS$_MSWrapperLogger' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5211: Native linking failed, undefined Objective-C class: MSWrapperSdk. The symbol 'OBJC_CLASS$_MSWrapperSdk' could not be found in any of the libraries or frameworks linked with your application.

MTOUCH: error MT5202: Native linking failed. Please review the build log.

This is preventing development on device, I have to use my iOS simulator for all development or remove these packages from the project.

iOS | Device on Xamarin Studio mac is a supported configuration, right? ;)

Can't see data in Mobile Center

I can't see any data in mobile center - neither crashes nor analytics from android os. It's just empty and says - waiting for data. I use version 0.15.0 - latest stable at this moment.

In output window I found following:

09-24 21:07:00.468 F/MobileCenter(22564): Mobile Center SDK configured successfully.
09-24 21:07:00.481 W/MobileCenter(22564): Unable to get installID from Shared Preferences

Upgrade to 4.0.1 icompatible with Xamarin PCL ?

I have been working with Xamarin PCL, suddenly v4.0.1 is incompatible with my UWP and my Xamarin PCL.. It IS compatible with my Android project.

What should I do ??

Error:
You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259'

Analytics - Xamarin.Android Class not found

Hi,

I have an issue with the Analytics package (v1.4.0) for Xamarin.Android.
When I launch the app, I get this exception:

Unhandled Exception:
Java.Lang.NoClassDefFoundError: Failed resolution of: Lcom/microsoft/appcenter/analytics/channel/SessionTracker;

I have no linking and no AOT enabled, and no issue with iOS, it works fines.
If I exclude Analytics and only include Crashes, it works fine.

Is it a known issue?


Full stack trace:

02-20 09:39:41.571 E/AndroidRuntime(31758): FATAL EXCEPTION: AppCenter.Looper
02-20 09:39:41.571 E/AndroidRuntime(31758): Process: fr.company.app, PID: 31758
02-20 09:39:41.571 E/AndroidRuntime(31758): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/microsoft/appcenter/analytics/channel/SessionTracker;
02-20 09:39:41.571 E/AndroidRuntime(31758): at com.microsoft.appcenter.analytics.Analytics.applyEnabledState(Analytics.java:444)
02-20 09:39:41.571 E/AndroidRuntime(31758): at com.microsoft.appcenter.AbstractAppCenterService.onStarted(AbstractAppCenterService.java:193)
02-20 09:39:41.571 E/AndroidRuntime(31758): at com.microsoft.appcenter.AppCenter.finishStartServices(AppCenter.java:565)
02-20 09:39:41.571 E/AndroidRuntime(31758): at com.microsoft.appcenter.AppCenter.access$400(AppCenter.java:51)
02-20 09:39:41.571 E/AndroidRuntime(31758): at com.microsoft.appcenter.AppCenter$5.run(AppCenter.java:549)
02-20 09:39:41.571 E/AndroidRuntime(31758): at android.os.Handler.handleCallback(Handler.java:751)
02-20 09:39:41.571 E/AndroidRuntime(31758): at android.os.Handler.dispatchMessage(Handler.java:95)
02-20 09:39:41.571 E/AndroidRuntime(31758): at android.os.Looper.loop(Looper.java:154)
02-20 09:39:41.571 E/AndroidRuntime(31758): at android.os.HandlerThread.run(HandlerThread.java:61)
02-20 09:39:41.571 E/AndroidRuntime(31758): Caused by: java.lang.ClassNotFoundException: com.microsoft.appcenter.analytics.channel.SessionTracker
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.VMClassLoader.findLoadedClass(Native Method)
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
02-20 09:39:41.571 E/AndroidRuntime(31758): ... 9 more
02-20 09:39:41.571 E/AndroidRuntime(31758): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/microsoft/appcenter/channel/AbstractChannelListener;
02-20 09:39:41.571 E/AndroidRuntime(31758): ... 9 more
02-20 09:39:41.571 E/AndroidRuntime(31758): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.microsoft.appcenter.channel.AbstractChannelListener" on path: DexPathList[[zip file "/data/app/fr.company.app-1/base.apk"],nativeLibraryDirectories=[/data/app/fr.company.app-1/lib/arm, /system/fake-libs, /data/app/fr.company.app-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
02-20 09:39:41.571 E/AndroidRuntime(31758): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
02-20 09:39:41.571 E/AndroidRuntime(31758): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Payload contains two ore more files with the same destination path 'WatsonRegistrationUtility.dll'

On my UWP Xamarin mobile app, after updating from Microsoft.Azure.Mobile.Crashes v0.14.0 to v0.14.2 I started getting this error on compile. Reverting resolves the issue.

I have references to both Microsoft.Azure.Mobile.Crashes and Microsoft.Azure.Mobile.Analytics, my app targets x86, x64 and arm. I've seen it with any of the target build options including Any CPU.

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(1740,5): error APPX1101: Payload contains two or more files with the same destination path 'WatsonRegistrationUtility.dll'. Source files:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(1740,5): error APPX1101: C:\Users\User\.nuget\packages\microsoft.azure.mobile.crashes\0.14.2\build\uap10.0....\runtimes\win10-x86\native\WatsonRegistrationUtility.dll
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(1740,5): error APPX1101: C:\Users\User\.nuget\packages\Microsoft.Azure.Mobile.Crashes\0.14.2\runtimes\win10-x86\lib\uap10.0\WatsonRegistrationUtility.dll

Analytics.TrackEvent - allow different property types (besides string)

Hi!

C# Analytics class allows us to track events with some extra properties.
However, properties are accepted in a format of Dictionary<string,string>.
https://github.com/Microsoft/AppCenter-SDK-DotNet/blob/develop/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.iOS/Analytics.cs#L64
https://github.com/Microsoft/AppCenter-SDK-DotNet/blob/develop/SDK/AppCenterAnalytics/Microsoft.AppCenter.Analytics.Android/Analytics.cs#L62

I was ok with that but then noticed in device logs this:

01-31 14:13:11.512: V/AppCenter(6888):       "properties": [
01-31 14:13:11.512: V/AppCenter(6888):         {
01-31 14:13:11.512: V/AppCenter(6888):           "name": "DriverId",
01-31 14:13:11.512: V/AppCenter(6888):           "type": "number",
01-31 14:13:11.512: V/AppCenter(6888):           "value": 163
01-31 14:13:11.512: V/AppCenter(6888):         },
01-31 14:13:11.512: V/AppCenter(6888):         {
01-31 14:13:11.512: V/AppCenter(6888):           "name": "ENV",
01-31 14:13:11.512: V/AppCenter(6888):           "type": "string",
01-31 14:13:11.512: V/AppCenter(6888):           "value": "INT"
01-31 14:13:11.512: V/AppCenter(6888):         }

So I assume AppCenter SDK tries to understand type of a data from string and then send it to the AppCenter API.
On the other hand, in the app code, we have to call .ToString() on anything that is not a string yet.

Feels like useless actions. We could have Dictionary<string, object> and you would have your type information without guessing and we would not have to call .ToString() all the time.

Maybe, somehow related is, that sometimes we have to send a string property with DateTime value inside (DateTime.UtcNow.ToString("u")) and AppCenter sees that as a DateTime and then tries to recreate a DateTime.

And when it does, it creates a DateTime of a different kind (Kind = Local or Kind = Unspecified) and then this aligned UTC DateTime gets lost and misinterpreted by analytics.

AppCenter doesn't send data to server when on Release config (Xamarin.Forms on Android)

I have a Xamarin.Forms app and when I'm using with Debug configuration, it works as it should, but when I try to test it using Release, it doesn't send anything.

To understand the problem I set the LogLevel to Verbose and here's what I noticed:

  • It shows the message "App Center SDK configured successfully"
  • It shows the Active Network Info right with "state: CONNECTED"
  • Then after "onActivityResumed" it shows another Active Network Info that says that the type of my connection is "VPN[]" and the state is "DISCONNECTED" with reason "(unspecified)".
  • After that message it says "Network is down. Pausing 0 network calls".
  • Then, when it tries to send the persisted data to server, it says "Call triggered with no network connectivity, waiting network to become available...".
  • And when AppCenter tries to send new data to server, it shows the message "Already sending 3 batches of analytics data to the server.".

log.txt

After examining the logs, I tried to run a Packet Capture app and see if any connection is actually being made, and when I did the exact same thing than before but capturing the packages, the data was sent to the servers.

I reproduced this some times to be sure and every time was the same thing, if I run my app alone, no data gets sent, but when I run it capturing the packets, it works as expected.

.NET Standard 2.0 Support without warning and without adding extra configuration

What is the status of .NET Standard for the Microsoft.Azure.Mobile.* NuGet packages? Looking at the release notes, the last release that mentions .NET Standard was from quite some time ago and references the outdated project.json. Also, when I install v0.16 to a .NET Standard 2.0 library I get the following message:

Package 'Microsoft.Azure.Mobile 0.16.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Looking at ~/.nuget/packages/microsoft.azure.mobile/0.16.0/lib, it seems PCLs are still being used. Any plans to update this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.