AppCenter "App Does Launch" failed for Xamarin.Android - xamarin.forms

I am having hard time to identify what causes the "App Does Launch" test in AppCenter to failed. This is the Logs I've got :
NUnit-Console version 2.6.3.13283
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Unix 17.4.0.0
CLR Version: 4.0.30319.42000 ( Mono 4.0 ( 5.2.0.224 (d15-3/14f2c81 Thu Aug 24 10:33:52 EDT 2017) ) )
ProcessModel: Default DomainUsage: Single
Execution Runtime: mono-4.0
Installing test cloud reporter.
Connected to Xamarin.UITest.
Run list: runlist.txt
.15-03-2018 13:05:06.922 +01:00 - 0 - Full log file: /Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/tmp/uitest/log-2018-03-15_13-05-06-914.txt
15-03-2018 13:05:07.047 +01:00 - 124 - Android test running Xamarin.UITest version: 2.2.1
15-03-2018 13:05:07.076 +01:00 - 153 - Using XAMARIN_TEST_CLOUD configuration override.
15-03-2018 13:05:07.996 +01:00 - 1073 - Initializing Android app with apk: /Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/app.apk
FTook final screenshot. { Title: "After test", FileName: "/Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/screenshot-final-99776814e79442b7b1a0fba447e5c853.png", ElapsedMilliseconds: 12250 }
Completed run. 19 events collected.
[[[ XTC-Output-Path: '/Volumes/Data/xamarin/workspaces/82e558c3-7406-4ce0-8cde-1014329f0388/workspace/tmp/TestRun-20180315-120905-6895' ]]]
Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time: 239.2881854 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Errors and Failures:
1) SetUp Error : AppCenter.UITest.Android.Tests.AppDoesLaunch
SetUp : System.Exception : Failed to execute: /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb shell am instrument -e "target_package" "com.companyname.MeStudentV1" -e "main_activity" "null" -e "debug" "false" -e "test_server_port" "37777" -e "class" "sh.calaba.instrumentationbackend.InstrumentationBackend" com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner - exit code: 1
/Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:407: warning: already initialized constant ARGV
Parse am instrument -e target_package com.companyname.MeStudentV1 -e main_activity null -e debug false -e test_server_port 37777 -e class sh.calaba.instrumentationbackend.InstrumentationBackend com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
{:instrumentation=>"com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null", :class=>"sh.calaba.instrumentationbackend.InstrumentationBackend", :target_package=>"com.companyname.MeStudentV1", :package_name=>"com.companyname.MeStudentV1.test"}
Parse am instrument -e target_package com.companyname.MeStudentV1 -e main_activity null -e debug false -e test_server_port 37777 -e class sh.calaba.instrumentationbackend.InstrumentationBackend com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
{:instrumentation=>"com.companyname.MeStudentV1.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :instrumentation_name=>"sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner", :main_activity=>"null", :class=>"sh.calaba.instrumentationbackend.InstrumentationBackend", :target_package=>"com.companyname.MeStudentV1", :package_name=>"com.companyname.MeStudentV1.test"}
/Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:117:in `shel': Error while starting {"message"=>"Waited for Calabash server on 37280. Did not launch.", "device_id"=>"88b18273-1f47-476c-be16-6d0c7ce1c349", "error_code"=>104}, 503, {"message":"Waited for Calabash server on 37280. Did not launch.","device_id":"88b18273-1f47-476c-be16-6d0c7ce1c349","error_code":104}. (RuntimeError)
from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/base_gems/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Volumes/Data/xamarin/pipeline/versions/273b31185a32748d5aac56b7a2a964a8327c3225/adt/sdk/platform-tools/adb:413:in `<main>'
at Xamarin.UITest.Shared.Processes.ProcessRunner.Run (System.String path, System.String arguments, System.Collections.Generic.IEnumerable`1[T] noExceptionOnExitCodes) [0x00059] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Shared.Android.Adb.AdbProcessRunner.Run (System.String adbArguments, System.Int32[] noExceptionsOnExitCodes) [0x00011] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Shared.Android.Commands.CommandAdbInstrument.Execute (Xamarin.UITest.Shared.Android.Adb.AdbProcessRunner processRunner) [0x00081] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Shared.Execution.Executor.Execute[TDep1] (Xamarin.UITest.Shared.Execution.ICommand`1[TDep1] command) [0x0000c] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Shared.Android.TestCloudAndroidAppLifeCycle.LaunchApp (Xamarin.UITest.Shared.Android.ApkFile appApkFile, Xamarin.UITest.Shared.Android.ApkFile testServerApkFile, System.Int32 testServerPort) [0x0004c] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x001c1] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Android.AndroidApp..ctor (Xamarin.UITest.Configuration.IAndroidAppConfiguration appConfiguration) [0x00000] in <5745119407a04120bc96f6ab09d7913e>:0
at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <5745119407a04120bc96f6ab09d7913e>:0
at AppCenter.UITest.Android.Tests.SetUp () [0x00010] in <bcdaf2f196224d76ad22fb1c6eb5ef28>:0
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 <48b95f3df5804531818f80e28ec60191>:0
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
Tried to replicate the scenario on an Emulator with the same Device Model (Google PIXEL XL) and OS Version (Android 8.0) and it deploy successfully on my emulator

Upon consulting to the AppCenter's support team. They've advised me to lower my app's TargetFrameworkVersion from 8.1 to 8.0 becaused since it is currently not supported.

Related

Problems with Java moneta Money object when used in an Axon command

I have an Axon Command which has an moneta Money object.
import lombok.Getter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.javamoney.moneta.Money;
import java.time.LocalDate;
import java.util.UUID;
#Getter
#SuperBuilder
#ToString
public class MyAxonCommand {
private final UUID id;
private final Money hoogte;
private final LocalDate opleggingsdatum;
}
When i send this command with axon there is an exception.
commandGateway.sendAndWait(myAxonCommand.builder()
.id(new UUID(1, 1))
.hoogte(Money.of(0, "EUR"))
.opleggingsdatum(LocalDate.now())
.build());
The exception thrown is Caused by:
18:07:37.456 [main] INFO org.javamoney.moneta.DefaultMonetaryContextFactory - Using custom MathContext: precision=256, roundingMode=HALF_EVEN
18:07:37.465 [main] INFO nl.ind.handhaving.adapter.messaging.incoming.IndigoListener kvk:987654321 zn:Z1-31190106952 - INDiGO bericht ontvangen op methode: receiveMaatregelOpgelegd
18:07:37.928 [docker-java-stream--1691755530] INFO docker.axonserver - STDOUT: 2023-01-18 17:07:37.925 WARN 1 --- [nio-8024-exec-3] A.i.a.a.rest.DevelopmentRestController : [<anonymous>] Request to delete all events in context "default".
18:07:37.941 [EventProcessor[nl.ind.handhaving.application.query]-0] WARN org.axonframework.eventhandling.TrackingEventProcessor - Error occurred. Starting retry mode.
org.axonframework.axonserver.connector.AxonServerException: The Event Stream has been closed, so no further events can be retrieved
at org.axonframework.axonserver.connector.event.axon.EventBuffer.peekNullable(EventBuffer.java:178)
at org.axonframework.axonserver.connector.event.axon.EventBuffer.hasNextAvailable(EventBuffer.java:144)
at org.axonframework.eventhandling.TrackingEventProcessor.processBatch(TrackingEventProcessor.java:401)
at org.axonframework.eventhandling.TrackingEventProcessor.processingLoop(TrackingEventProcessor.java:300)
at org.axonframework.eventhandling.TrackingEventProcessor$TrackingSegmentWorker.run(TrackingEventProcessor.java:1072)
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.cleanUp(TrackingEventProcessor.java:1263)
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.run(TrackingEventProcessor.java:1240)
at java.base/java.lang.Thread.run(Thread.java:833)
18:07:37.942 [EventProcessor[nl.ind.handhaving.application.query]-0] WARN org.axonframework.eventhandling.TrackingEventProcessor - Releasing claim on token and preparing for retry in 1s
18:07:37.945 [EventProcessor[nl.ind.handhaving.application]-0] WARN org.axonframework.eventhandling.TrackingEventProcessor - Error occurred. Starting retry mode.
org.axonframework.axonserver.connector.AxonServerException: The Event Stream has been closed, so no further events can be retrieved
at org.axonframework.axonserver.connector.event.axon.EventBuffer.peekNullable(EventBuffer.java:178)
at org.axonframework.axonserver.connector.event.axon.EventBuffer.hasNextAvailable(EventBuffer.java:144)
at org.axonframework.eventhandling.TrackingEventProcessor.processBatch(TrackingEventProcessor.java:401)
at org.axonframework.eventhandling.TrackingEventProcessor.processingLoop(TrackingEventProcessor.java:300)
at org.axonframework.eventhandling.TrackingEventProcessor$TrackingSegmentWorker.run(TrackingEventProcessor.java:1072)
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.cleanUp(TrackingEventProcessor.java:1263)
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.run(TrackingEventProcessor.java:1240)
at java.base/java.lang.Thread.run(Thread.java:833)
18:07:37.945 [EventProcessor[nl.ind.handhaving.application]-0] WARN org.axonframework.eventhandling.TrackingEventProcessor - Releasing claim on token and preparing for retry in 1s
18:07:37.947 [EventProcessor[nl.ind.handhaving.application]-0] INFO org.axonframework.eventhandling.TrackingEventProcessor - Released claim
18:07:37.949 [EventProcessor[nl.ind.handhaving.application.query]-0] INFO org.axonframework.eventhandling.TrackingEventProcessor - Released claim
org.axonframework.commandhandling.CommandExecutionException: org.javamoney.moneta.spi.JDKCurrencyAdapter
at org.axonframework.axonserver.connector.ErrorCode.lambda$static$11(ErrorCode.java:88)
at org.axonframework.axonserver.connector.ErrorCode.convert(ErrorCode.java:182)
at org.axonframework.axonserver.connector.command.CommandSerializer.deserialize(CommandSerializer.java:164)
at org.axonframework.axonserver.connector.command.AxonServerCommandBus.lambda$doDispatch$1(AxonServerCommandBus.java:161)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at io.axoniq.axonserver.connector.command.impl.CommandChannelImpl$CommandResponseHandler.onNext(CommandChannelImpl.java:372)
at io.axoniq.axonserver.connector.command.impl.CommandChannelImpl$CommandResponseHandler.onNext(CommandChannelImpl.java:359)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:466)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:661)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:646)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: AxonServerRemoteCommandHandlingException{message=An exception was thrown by the remote message handling component: org.javamoney.moneta.spi.JDKCurrencyAdapter, errorCode='AXONIQ-4002', server='134589#xxxxxxxxx}
at org.axonframework.axonserver.connector.ErrorCode.lambda$static$11(ErrorCode.java:86)
... 16 more}
The Axonserver logging - running in a docker :
2023-01-18T17:30:30.237808536Z _ ____
2023-01-18T17:30:30.237852159Z / \ __ _____ _ __ / ___| ___ _ ____ _____ _ __
2023-01-18T17:30:30.237857221Z / _ \ \ \/ / _ \| '_ \\___ \ / _ \ '__\ \ / / _ \ '__|
2023-01-18T17:30:30.237861155Z / ___ \ > < (_) | | | |___) | __/ | \ V / __/ |
2023-01-18T17:30:30.237864060Z /_/ \_\/_/\_\___/|_| |_|____/ \___|_| \_/ \___|_|
2023-01-18T17:30:30.237866979Z Standard Edition Powered by AxonIQ
2023-01-18T17:30:30.237869529Z
2023-01-18T17:30:30.237872060Z version: 4.5.16
2023-01-18T17:30:30.326181167Z 2023-01-18 17:30:30.321 INFO 1 --- [ main] io.axoniq.axonserver.AxonServer : Starting AxonServer using Java 11.0.14 on c32eb57825c4 with PID 1 (/app/classes started by root in /)
2023-01-18T17:30:30.331544104Z 2023-01-18 17:30:30.325 INFO 1 --- [ main] io.axoniq.axonserver.AxonServer : No active profile set, falling back to 1 default profile: "default"
2023-01-18T17:30:33.989108312Z 2023-01-18 17:30:33.988 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8024 (http)
2023-01-18T17:30:34.235755158Z 2023-01-18 17:30:34.231 INFO 1 --- [ main] A.i.a.a.c.MessagingPlatformConfiguration : Configuration initialized with SSL DISABLED and access control DISABLED.
2023-01-18T17:30:37.126812182Z 2023-01-18 17:30:37.125 INFO 1 --- [ main] io.axoniq.axonserver.AxonServer : Axon Server version 4.5.16
2023-01-18T17:30:39.285810090Z 2023-01-18 17:30:39.285 WARN 1 --- [ main] .s.s.UserDetailsServiceAutoConfiguration :
2023-01-18T17:30:39.285860293Z
2023-01-18T17:30:39.285865737Z Using generated security password: f23552a4-9623-4adb-831e-506eac6a10a9
2023-01-18T17:30:39.285868706Z
2023-01-18T17:30:39.285871675Z This generated password is for development use only. Your security configuration must be updated before running your application in production.
2023-01-18T17:30:39.285874618Z
2023-01-18T17:30:41.633817404Z 2023-01-18 17:30:41.633 INFO 1 --- [ main] io.axoniq.axonserver.grpc.Gateway : Axon Server Gateway started on port: 8124 - no SSL
2023-01-18T17:30:41.667366113Z 2023-01-18 17:30:41.667 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8024 (http) with context path ''
2023-01-18T17:30:42.561266508Z 2023-01-18 17:30:42.555 INFO 1 --- [ main] io.axoniq.axonserver.AxonServer : Started AxonServer in 12.861 seconds (JVM running for 13.412)
2023-01-18T17:30:57.342935513Z 2023-01-18 17:30:57.338 INFO 1 --- [grpc-executor-1] i.a.a.logging.TopologyEventsLogger : Application connected: handhaving-service, clientId = 149931#v2l1-xxxxl, clientStreamId = 149931#v2l1-xxxxx.87e0f589-66d8-41ee-ab4a-7bc599cc2c01, context = default
2023-01-18T17:31:02.213813565Z 2023-01-18 17:31:02.213 WARN 1 --- [nio-8024-exec-3] A.i.a.a.rest.DevelopmentRestController : [<anonymous>] Request to delete all events in context "default".
2023-01-18T17:31:04.567541554Z 2023-01-18 17:31:04.567 INFO 1 --- [grpc-executor-3] i.a.a.logging.TopologyEventsLogger : Application disconnected: handhaving-service, clientId = 149931#xxxxx.87e0f589-66d8-41ee-ab4a-7bc599cc2c01, context = default: Platform connection completed by client
The issue seems to be that Axon is storing this Money object in a database, according the errorCode='AXONIQ-4002'.
What can i do to fix this? Does Axon needs a hibernate UserType so Axon is able to store this Money object or some other kind of type converter?
It seems that the de-serilizer in the axon server has problems with the Money object.
In order to store this Money object in a view database - where i store the event generated by the command - i had to make a type conversion for hibernate. this seems to be related to the occurred exception.
The project uses:
Spring Boot 2.7.6
axon-spring-boot-starter 4.5.15
moneta 1.4.2
It al runs with Java Temurin 17.0.4
For axon we have no configuration for serializing so the default is used: XML

Xamarin.iOS app fails to compile in Visual Studio for Mac 8.10.14

I have the following error when compiling an Xamarin iOS app in Visual Studio for Mac 8.10.14 when doing it in Release Mode to Generic Device:
MTOUCH : error : System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.CollectionBase.System.Collections.IList.get_Item (System.Int32 index) [0x0000d] in <92218043474744ea9d64d27064c35dcb>:0
at Mono.Cecil.GenericParameterCollection.get_Item (System.Int32 index) [0x00006] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetTypeRefFromSig (Mono.Cecil.Signatures.SigType t, Mono.Cecil.GenericContext context) [0x002ee] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetGenericArg (Mono.Cecil.Signatures.GenericArg arg, Mono.Cecil.GenericContext context) [0x00000] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetTypeRefFromSig (Mono.Cecil.Signatures.SigType t, Mono.Cecil.GenericContext context) [0x003aa] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.CreateTypeSpecFromSig (Mono.Cecil.Signatures.TypeSpec ts, System.Int32 index, Mono.Cecil.GenericContext context) [0x00000] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetTypeSpecAt (System.UInt32 rid, Mono.Cecil.GenericContext context) [0x00049] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetTypeDefOrRef (Mono.Cecil.Metadata.MetadataToken token, Mono.Cecil.GenericContext context) [0x00051] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ReflectionReader.GetMemberRefAt (System.UInt32 rid, Mono.Cecil.GenericContext context) [0x000a1] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.Cil.CodeReader.ReadCilBody (Mono.Cecil.Cil.MethodBody body, System.IO.BinaryReader br) [0x00430] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.Cil.CodeReader.VisitMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000c0] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.MethodDefinition.LoadBody () [0x00058] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.Cecil.ModuleDefinition.FullLoad () [0x00047] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.CilStripper.AssemblyStripper.FullLoad () [0x0000b] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.CilStripper.AssemblyStripper.Strip () [0x00000] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.CilStripper.AssemblyStripper.StripAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String file) [0x00016] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.CilStripper.Program.StripAssembly (Mono.Cecil.AssemblyDefinition assembly, System.String output) [0x00000] in <af3d3de500394ed18df77e27b5623689>:0
at Mono.CilStripper.Program.Main (System.String[] arguments) [0x00064] in <af3d3de500394ed18df77e27b5623689>:0
MTOUCH : error MT1009: Could not copy the assembly '/Users/.../Documents/repo/test/test/test.iOS/obj/iPhone/Release/mtouch-cache/3-Build/test.dll' to '/Users/.../Documents/repo/test/test/test.iOS/bin/iPhone/Release/test.iOS.app/test.dll': Could not strip assembly `/Users/.../Documents/repo/test/test/test.iOS/obj/iPhone/Release/mtouch-cache/3-Build/test.dll`.
Could not strip assembly `/Users/.../Documents/repo/test/test/test.iOS/obj/iPhone/Release/mtouch-cache/3-Build/test.dll`.
Could not strip assembly `/Users/.../Documents/repo/test/test/test.iOS/obj/iPhone/Release/mtouch-cache/3-Build/test.dll`.
It seems a problem with mono sdk, but I can't figured out how to fix this...
My current Visual Studio for Mac installation is:
Visual Studio Community 2019 for Mac
Version 8.10.14 (build 17)
Installation UUID: 18219619-f9f8-414d-9e88-cd653673a349
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)
Package version: 612000140
Mono Framework MDK
Runtime:
Mono 6.12.0.140 (2020-02/51d876a041e) (64-bit)
Package version: 612000140
Apple Developer Tools
Xcode 13.1 (19466)
Build 13A1030d
Xamarin.iOS
Version: 15.2.0.17 (Visual Studio Community)
Hash: 738fde344
Branch: xcode13.1
Build date: 2021-11-09 02:45:16-0500
Operating System
Mac OS X 12.0.1
Darwin 21.1.0 Darwin Kernel Version 21.1.0
Wed Oct 13 17:33:24 PDT 2021
root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 x86_64
Thanks in advance.

IIS application Build failure in ElasticBeanstalk AWS

I am deploying IIS application into .net framework. 64bit Windows Server 2016 v2.3.2 running IIS 10.0"
I kept getting this error I have no answer to. Please help
AWSDeployment.log:
2020-02-20 22:54:26,203 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Reading configuration from c:\Program Files\Amazon\ElasticBeanstalk\config\containerconfiguration
2020-02-20 22:54:26,343 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Exception during deployment.
Microsoft.Web.Deployment.DeploymentDetailedException: Object of type 'package' and path 'C:\cfn\ebdata\source_bundle_final.zip' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT. ---> Microsoft.Web.Deployment.DeploymentException: The Zip package 'C:\cfn\ebdata\source_bundle_final.zip' could not be loaded. ---> System.IO.FileNotFoundException: Could not find file 'C:\cfn\ebdata\source_bundle_final.zip'.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, Nullable`1 fileLength)
at Microsoft.Web.Deployment.ZipFile.Load()
at Microsoft.Web.Deployment.ZipPackageProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String path)
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.ZipPackageProvider.GetAttributes(DeploymentAddAttributeContext addContext)
at Microsoft.Web.Deployment.DeploymentObject.EnsureValidAttributes()
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions)
at Microsoft.Web.Deployment.DeploymentManager.CreateObject(String provider, String path, DeploymentBaseOptions baseOptions)
at AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(Container container, Boolean sync) in C:\code\EBDPT-IISCore\src\EBDPT-IISCore\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 106
at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in C:\code\EBDPT-IISCore\src\EBDPT-IISCore\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 56
2020-02-20 22:54:26,360 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Unexpected Exception: System.Exception: Exception during deployment. ---> Microsoft.Web.Deployment.DeploymentDetailedException: Object of type 'package' and path 'C:\cfn\ebdata\source_bundle_final.zip' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT. ---> Microsoft.Web.Deployment.DeploymentException: The Zip package 'C:\cfn\ebdata\source_bundle_final.zip' could not be loaded. ---> System.IO.FileNotFoundException: Could not find file 'C:\cfn\ebdata\source_bundle_final.zip'.
at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, Nullable`1 fileLength)
at Microsoft.Web.Deployment.ZipFile.Load()
at Microsoft.Web.Deployment.ZipPackageProvider..ctor(DeploymentProviderContext providerContext, DeploymentBaseContext baseContext, String path)
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.ZipPackageProvider.GetAttributes(DeploymentAddAttributeContext addContext)
at Microsoft.Web.Deployment.DeploymentObject.EnsureValidAttributes()
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.DeploymentManager.CreateObjectPrivate(DeploymentProviderContext providerContext, DeploymentBaseOptions baseOptions, DeploymentObject sourceObject, String serverVersion)
at Microsoft.Web.Deployment.DeploymentManager.CreateObject(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions)
at Microsoft.Web.Deployment.DeploymentManager.CreateObject(String provider, String path, DeploymentBaseOptions baseOptions)
at AWSBeanstalkCfnDeploy.DeploymentUtils.deployPackage(Container container, Boolean sync) in C:\code\EBDPT-IISCore\src\EBDPT-IISCore\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 106
at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in C:\code\EBDPT-IISCore\src\EBDPT-IISCore\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 56
--- End of inner exception stack trace ---
at AWSBeanstalkCfnDeploy.DeploymentUtils.UpdateApplicationVersion(Container container, Boolean sync) in C:\code\EBDPT-IISCore\src\EBDPT-IISCore\AWSBeanstalkCfnDeploy\DeploymentUtils.cs:line 71
2020-02-20 22:54:26,361 ERROR 1 AWSBeanstalkCfnDeployApp.DeployApp - Deployment failed: Unexpected Exception
2020-02-20 22:54:26,362 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [INFO]: Started Application Update
2020-02-20 22:54:26,362 INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [ERROR]: Deployment Failed: Unexpected Exception
2020-02-20 22:54:26,920 [ERROR] Error encountered during build of
Hook-EnactAppDeploy: Command hooks failed
Traceback (most recent call last):
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
ToolError: Command hooks failed
2020-02-20 22:54:26,920 [ERROR] -----------------------BUILD FAILED!------------------------
2020-02-20 22:54:26,920 [ERROR] Unhandled exception during build: Command hooks failed
Traceback (most recent call last):
File "cfn-init", line 171, in
File "cfnbootstrap\construction.pyc", line 129, in build
File "cfnbootstrap\construction.pyc", line 530, in build
File "cfnbootstrap\construction.pyc", line 544, in run_config
File "cfnbootstrap\construction.pyc", line 138, in run_commands
File "cfnbootstrap\command_tool.pyc", line 117, in apply
It's maybe late but anyone experiencing this issue just check that in your repo you have aws-windows-deployment-manifest.json.
{
"manifestVersion": 1,
"deployments": {
"aspNetCoreWeb": [
{
"name": "my-dotnet-core-app",
"parameters": {
"archive": "dotnet-core-app.zip",
"iisPath": "/"
}
}
]
}
}
Check this documentation from AWS
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/dotnet-manifest.html

EF Core with SQLite on Mono: e_sqlite3 not found

We are using Entity Framework Core 2.2.4 together with an SQLite database targeting .NET Framework 4.7.2. Following Nuget packages were installed:
Microsoft.Data.Sqlite
Microsoft.EntityFrameworkCore.Sqlite
Microsoft.EntityFrameworkCore.Tools
On my development machine (Windows 10) everything works fine but when trying to run the application with Mono on our 32-bit Linux machine, the following exception occurs:
FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type
initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.DllNotFoundException: e_sqlite3
at (wrapper managed-to-native)
SQLitePCL.SQLite3Provider_e_sqlite3+NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in <61bb3ca1db9c41ea88f280f0b1600d58>:0
at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <3d4b21fb9c764efbb11f6e3b02efff52>:0
at SQLitePCL.Batteries_V2.Init () [0x00005] in <f5d9c86a14864b5d99b8bdece1b8292c>:0
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 <a89b9d7c1a66468eb33312af7ed3a74e>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <a89b9d7c1a66468eb33312af7ed3a74e>:0
at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize () [0x0002f] in <b46e232ade014524baa458345f270c50>:0
at Microsoft.Data.Sqlite.SqliteConnection..cctor () [0x00000] in <b46e232ade014524baa458345f270c50>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection () [0x00006] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Internal.LazyRef`1[T].get_Value () [0x00008] in <adf771f92e754fe1bb85c5850cd0c16b>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection () [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.Open (System.Boolean errorsExpected) [0x00000] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Exists () [0x0000c] in <74192050a4d342039620dc7ef6678f71>:0
at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.Exists () [0x0000b] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate (System.String targetMigration) [0x00012] in <69f795dffc844780bfcfff4ff8415a92>:0
at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate (Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade) [0x00010] in <69f795dffc844780bfcfff4ff8415a92>:0
at TestEfCorePlusSqlite.Program.Main (System.String[] args) [0x0000e] in <c4fad569c9a241ef887b5b2ddbc0225f>:0
Since the application is built with Any CPU configuration, x86 and x64 folders are created in bin/Debug, both containing an e_sqlite3.dll. I already tried to copy the x86 dll to bin/Debug but the error still occurred.
What I've tried so far:
installing Microsoft.EntityFrameworkCore.Sqlite.Core together with
SQLitePCLRaw.bundle_e_sqlite3 as suggested here
installing Microsoft.EntityFrameworkCore.Sqlite (or
Microsoft.Data.Sqlite or SQLitePCLRaw.bundle_green) as suggested here
different combinations of SQLitePCLRaw.* packages
What do I have to do to get EF Core and SQlite running on Mono?
After a refreshing weekend I took another glance at the problem. I found the official Mono documentation regarding DllNotFoundException and used MONO_LOG_LEVEL=debug mono YourApp.exe to find out which lib Mono is trying to load. It was /usr/lib/libe_sqlite3.so which was not available on my system. All I did was to copy the available /usr/lib/libsqlite3.so and rename it to libe_sqlite3.so. I'm not sure if this is the preferred way but my application works.

F# Dictionary of Options

Why can't I add None to a System.Collections.Generic.Dictionary of Option? Is it an expected behavior or a bug in Mono?
F# Interactive for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License
For help type #help;;
> open System.Collections.Generic;;
> let d1 = new Dictionary<int option, int>();;
val d1 : Dictionary<int option,int> = dict []
> d1.Add(None, 1);;
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException (ExceptionArgument argument) in <filename unknown>:line 0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value, Boolean add) in <filename unknown>:line 0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value) in <filename unknown>:line 0
at <StartupCode$FSI_0004>.$FSI_0004.main# () in <filename unknown>:line 0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) in <filename unknown>:line 0
Stopped due to error
> d1.Add(Some 10, 1);;
val it : unit = ()
I'm using Mono on OS X.
$ mono --version
Mono JIT compiler version 4.2.0 (Stable 4.2.0.179/a224653 Tue Oct 6 11:28:25 PDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Its not a bug. Option<'T> uses the attribute [CompilationRepresentation(CompilationRepresentationFlags.UseNullAsTrueValue) which causes None to be represented as null.
So you actually are adding a null as a key to a Dictionary which as you know is not allowed.
For reference:
UseNullAsTrueValue:
Permit the use of null as a representation for nullary discriminators in a discriminated union.
More information here Why is None represented as null?

Resources