Ошибка тестов пользовательского интерфейса Xamarin: тип «MonoDevelop.MonoDroid.DeploymentException» не помечен как сериализуемый - PullRequest
0 голосов
/ 15 мая 2018

В настоящее время я получаю следующую ошибку и трассировку стека при попытке локального запуска тестов пользовательского интерфейса для моего проекта Xamarin.Android.Эта ошибка возникает не при каждом запуске, но довольно часто.Чистая и повторная сборка обычно "исправляет" это, но при попытке запустить все тесты это набор, это действительно досадная ошибка.

Я не совсем уверен, что делать дальше.Будем весьма благодарны за любые указания о том, где искать отладку этой ошибки, или если кто-нибудь знает, что является причиной ошибки.

Информация о системе / платформе:

  • NUnit: 2.6.4
  • Xamarin.UITests Версия: 2.2.4
  • Целевая структура Android: 8.0
  • Visual Studio Professional 2017 для Mac версии 7.5 (сборка 1254)
  • Mono5.10.1.47 (2017-12 / 8eb8f7d5e74) (64-разрядная версия)
  • Xamarin.Android: Версия: 8.3.0.19 (Visual Studio Professional)

SetUp: System.Runtime.Serialization.SerializationException: Тип 'MonoDevelop.MonoDroid.DeploymentException' в сборке 'MonoDevelop.MonoDroid, версия = 4.0.0.24, Culture = нейтральный, PublicKeyToken = 3ead7498f347467b' не помечен как сериализуемый.

Server stack trace: 
  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) [0x00175] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectinfo.cs:171 
  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 /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectinfo.cs:110 
  at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write (System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo objectInfo, System.Runtime.Serialization.Formatters.Binary.NameInfo memberNameInfo, System.Runtime.Serialization.Formatters.Binary.NameInfo typeNameInfo) [0x00101] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectwriter.cs:422 
  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) [0x001d3] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryobjectwriter.cs:190 
  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 /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:233 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph, System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:211 
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize (System.IO.Stream serializationStream, System.Object graph) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/serialization/formatters/binary/binaryformatter.cs:203 
  at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage (System.Runtime.Remoting.Channels.IServerChannelSinkStack sinkStack, System.Runtime.Remoting.Messaging.IMessage requestMsg, System.Runtime.Remoting.Channels.ITransportHeaders requestHeaders, System.IO.Stream requestStream, System.Runtime.Remoting.Messaging.IMessage& responseMsg, System.Runtime.Remoting.Channels.ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x00125] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.cs:182 

Exception rethrown at [0]: 
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
  at (wrapper remoting-invoke) Xamarin.UITest.Utils.Integration.IIdeHost.PrepareTestApp(string)
  at Xamarin.UITest.Utils.Integration.IdeConnection.PrepareTestApp () [0x00037] in <1bd397951f434cd4913ddc08b7bc45af>:0 
  at Xamarin.UITest.Utils.Integration.IdeIntegrationClient.TryConnect (Xamarin.UITest.Platform platform) [0x00064] in <1bd397951f434cd4913ddc08b7bc45af>:0 
  at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x000ad] in <1bd397951f434cd4913ddc08b7bc45af>:0 
  at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration) [0x00000] in <1bd397951f434cd4913ddc08b7bc45af>:0 
  at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <1bd397951f434cd4913ddc08b7bc45af>:0 
  at Dalevia.UITests.AppInitializer.StartApp (Xamarin.UITest.Platform platform, Xamarin.UITest.Configuration.AppDataMode dataMode) [0x00010] in /Users/dfrisk/Source/Compass/Compass-Patient/src/src/Mobile/RedArrow.Compass.Patients.Mobile.UI.Tests/AppInitializer.cs:28 
  at Dalevia.UITests.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x00001] in /Users/dfrisk/Source/Compass/Compass-Patient/src/src/Mobile/RedArrow.Compass.Patients.Mobile.UI.Tests/AppInitializer.cs:14 
  at Dalevia.UITests.BaseTests.BeforeEachTest () [0x00001] in /Users/dfrisk/Source/Compass/Compass-Patient/src/src/Mobile/RedArrow.Compass.Patients.Mobile.UI.Tests/Tests/BaseTests.cs:42 
  at Dalevia.UITests.Tests.CaseStatusTests.BeforeEachTest () [0x00001] in /Users/dfrisk/Source/Compass/Compass-Patient/src/src/Mobile/RedArrow.Compass.Patients.Mobile.UI.Tests/Tests/CaseStatusTests.cs:26 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 

1 Ответ

0 голосов
/ 23 марта 2019

Добавление x86 в качестве поддерживаемого ABI устранило эту проблему для меня

...