Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

SignalR raise error in IOS #15311

Open
AHComp opened this issue Apr 13, 2022 · 4 comments
Open

SignalR raise error in IOS #15311

AHComp opened this issue Apr 13, 2022 · 4 comments
Labels
s/unverified New report that has yet to be verified t/bug 🐛

Comments

@AHComp
Copy link

AHComp commented Apr 13, 2022

Description

2022-04-13 16:59:30.363903+0200 Xamarin-Test.iOS[9212:98547] One or more errors occurred. (Connection refused)
[0:] System.MissingMethodException: Method not found: Microsoft.AspNetCore.Http.Connections.NegotiationResponse Microsoft.AspNetCore.Http.Connections.NegotiateProtocol.ParseResponse(System.ReadOnlySpan1<byte>) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:471
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync (System.Uri url, System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILogger logger, System.Threading.CancellationToken cancellationToken) [0x0003d] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync (System.Uri uri, System.Threading.CancellationToken cancellationToken) [0x00011] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport (Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken) [0x0017b] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore (Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken) [0x00127] in :0
at System.Threading.Tasks.ForceAsyncAwaiter.GetResult () [0x0000c] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync (Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken) [0x00091] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync (System.Net.EndPoint endPoint, System.Threading.CancellationToken cancellationToken) [0x00114] in :0
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync (System.Net.EndPoint endPoint, System.Threading.CancellationToken cancellationToken) [0x001bf] in :0
at System.Threading.Tasks.ValueTask`1[TResult].get_Result () [0x0001b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:813
at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore (System.Threading.CancellationToken cancellationToken) [0x000a9] in <4639281004df4d719a98de096e09dd22>:0
at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncInner (System.Threading.CancellationToken cancellationToken) [0x001a3] in <4639281004df4d719a98de096e09dd22>:0
at System.Threading.Tasks.ForceAsyncAwaiter.GetResult () [0x0000c] in <4639281004df4d719a98de096e09dd22>:0
at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync (System.Threading.CancellationToken cancellationToken) [0x00091] in <4639281004df4d719a98de096e09dd22>:0
at Xamarin.App.<.ctor>b__14_1 () [0x0004f] in C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin\App.xaml.cs:59

Steps to Reproduce

  1. Open Sample
  2. Start Server
  3. Start IOS Client

Expected Behavior

Like in Android the connection should be sucsessfully, it's shared code !

Actual Behavior

In Android and UWP it works but not in IOS

Basic Information

The problem exists since sep 2021
https://developercommunity.visualstudio.com/t/bug-in-visual-studio-2022-xamarin-signalr-method-n/1528510

  • Version with issue: all
  • Last known good version: i don't know
  • Platform Target Frameworks:
    • iOS: latest 17.1.4

Environment

Build Logs

Neuerstellen gestartet...
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Shared\BlazorWebAssemblySignalRApp.Shared.csproj" wiederhergestellt (in "0,9 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Server\BlazorWebAssemblySignalRApp.Server.csproj" wiederhergestellt (in "19 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin\Xamarin-App.csproj" wiederhergestellt (in "21 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Client\BlazorWebAssemblySignalRApp.Client.csproj" wiederhergestellt (in "24 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin.iOS\Xamarin-Test.iOS.csproj" wiederhergestellt (in "33 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin.Android\Xamarin-Test.Android.csproj" wiederhergestellt (in "49 ms").
"C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin.UWP\Xamarin-Test.UWP.csproj" wiederhergestellt (in "338 ms").
1>------ Neues Erstellen gestartet: Projekt: Xamarin-App, Konfiguration: Debug Any CPU ------
1>Xamarin-App -> C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin\bin\Debug\netstandard2.0\Xamarin-App.dll
2>------ Neues Erstellen gestartet: Projekt: Xamarin-Test.iOS, Konfiguration: Debug iPhoneSimulator ------
2> Executing SayHello Task to establish a connection to a Remote Server.
2> Properties:
2> SessionId=60e86c1846a1d34766444d738379d620361df267ca16fa97aeed8be8cfd7a8b5,
2> Addresss=192.168.178.65,
2> SshPort=22,
2> TcpPort=59774,
2> User=Alexander Hailfinger,
2> AppName=XamarinTest.iOS,
2> VisualStudioProcessId=45344,
2> ContinueOnDisconnected=False
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : [xma]: An error occurred when trying to start the forwarded port from '55415' to '57362'
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : bei System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : bei System.Net.Sockets.Socket.Bind(EndPoint localEP)
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : bei Renci.SshNet.ForwardedPortLocal.InternalStart()
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : bei Renci.SshNet.ForwardedPortLocal.StartPort()
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.Messaging.Build.targets(109,3): warning : bei Xamarin.Messaging.Ssh.PortForwarder.StartForwardedPort(Int32 boundPort, Int32 port, ForwardedPortType type) in D:\a_work\1\s\src\Xamarin.Messaging.Ssh\PortForwarder.cs:Zeile 108.
2> Erkannte Signaturidentität:
2>
2> Bundle Id: com.companyname.Xamarin
2> App Id: com.companyname.Xamarin
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 Resources/icon_about.png obj/iPhoneSimulator/Debug/optimized/icon_about.png
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/icon_about@2x.png" "obj/iPhoneSimulator/Debug/optimized/icon_about@2x.png"
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/icon_about@3x.png" "obj/iPhoneSimulator/Debug/optimized/icon_about@3x.png"
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 Resources/icon_feed.png obj/iPhoneSimulator/Debug/optimized/icon_feed.png
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/icon_feed@2x.png" "obj/iPhoneSimulator/Debug/optimized/icon_feed@2x.png"
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/icon_feed@3x.png" "obj/iPhoneSimulator/Debug/optimized/icon_feed@3x.png"
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 Resources/xamarin_logo.png obj/iPhoneSimulator/Debug/optimized/xamarin_logo.png
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/xamarin_logo@2x.png" "obj/iPhoneSimulator/Debug/optimized/xamarin_logo@2x.png"
2> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -q -iphone -f 0 "Resources/xamarin_logo@3x.png" "obj/iPhoneSimulator/Debug/optimized/xamarin_logo@3x.png"
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Es wurden Konflikte zwischen verschiedenen Versionen von "System.Numerics.Vectors" gefunden, die nicht aufgelöst werden konnten.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Konflikt zwischen System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a und System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a wurde aufgrund der primären Eigenschaft System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a vorgezogen.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Verweise, die von "System.Numerics.Vectors, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" abhängig sind [C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.Vectors.dll].
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.Vectors.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Elementincludes einer Projektdatei, die den Verweis "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.Vectors.dll" verursacht haben.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: System.Numerics.Vectors
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Verweise, die von "System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" abhängig sind [].
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.memory\4.5.4\lib\netstandard2.0\System.Memory.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Elementincludes einer Projektdatei, die den Verweis "C:\Users\alexander.hailfinger.nuget\packages\system.memory\4.5.4\lib\netstandard2.0\System.Memory.dll" verursacht haben.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.memory\4.5.4\lib\netstandard2.0\System.Memory.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.http.connections.common\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.http.connections.client\6.0.4\lib\netstandard2.1\Microsoft.AspNetCore.Http.Connections.Client.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin\bin\Debug\netstandard2.0\Xamarin-App.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.client\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.common\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.client.core\6.0.4\lib\netstandard2.1\Microsoft.AspNetCore.SignalR.Client.Core.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.protocols.json\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.protocols.newtonsoftjson\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.extensions.logging.abstractions\6.0.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.extensions.logging\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Logging.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.extensions.primitives\6.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.extensions.options\6.0.0\lib\netstandard2.1\Microsoft.Extensions.Options.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.diagnostics.diagnosticsource\6.0.0\lib\netstandard2.0\System.Diagnostics.DiagnosticSource.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.io.pipelines\6.0.2\lib\netstandard2.0\System.IO.Pipelines.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.connections.abstractions\6.0.4\lib\netstandard2.1\Microsoft.AspNetCore.Connections.Abstractions.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.text.encodings.web\6.0.0\lib\netstandard2.0\System.Text.Encodings.Web.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.text.json\6.0.3\lib\netstandard2.0\System.Text.Json.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.text.json\6.0.3\lib\netstandard2.0\System.Text.Json.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: Elementincludes einer Projektdatei, die den Verweis "C:\Users\alexander.hailfinger.nuget\packages\system.text.json\6.0.3\lib\netstandard2.0\System.Text.Json.dll" verursacht haben.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\system.text.json\6.0.3\lib\netstandard2.0\System.Text.Json.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.http.connections.common\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.http.connections.client\6.0.4\lib\netstandard2.1\Microsoft.AspNetCore.Http.Connections.Client.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin\bin\Debug\netstandard2.0\Xamarin-App.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.client\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.common\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.client.core\6.0.4\lib\netstandard2.1\Microsoft.AspNetCore.SignalR.Client.Core.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.protocols.json\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3277: C:\Users\alexander.hailfinger.nuget\packages\microsoft.aspnetcore.signalr.protocols.newtonsoftjson\6.0.4\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.dll
2> Führen Sie ggf. mit app.config eine erneute Zuordnung der System.Runtime.CompilerServices.Unsafe, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a-Assembly von Version 4.0.4.1 [] zu 6.0.0.0 [C:\Users\alexander.hailfinger.nuget\packages\system.runtime.compilerservices.unsafe\6.0.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll] durch, um den Konflikt zu lösen und Warnmeldungen zu vermeiden.
2> Führen Sie ggf. mit app.config eine erneute Zuordnung der netstandard, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51-Assembly von Version 2.0.0.0 [] zu 2.1.0.0 [C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\netstandard.dll] durch, um den Konflikt zu lösen und Warnmeldungen zu vermeiden.
2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3276: Es wurden Konflikte zwischen verschiedenen Versionen derselben abhängigen Assembly gefunden. Legen Sie die "AutoGenerateBindingRedirects"-Eigenschaft in der Projektdatei auf TRUE fest. Weitere Informationen finden Sie unter http://go.microsoft.com/fwlink/?LinkId=294190.
2>C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin.iOS\CustomHttpMessageHandler.cs(10,13,10,26): warning CS0618: "NSUrlSessionHandler.TrustOverride" ist veraltet: "Use the 'TrustOverrideForUrl' property instead."
2> Xamarin-Test.iOS -> C:\Git\blazor-samples\6.0\BlazorWebAssemblySignalRApp\Xamarin\Xamarin.iOS\bin\iPhoneSimulator\Debug\Xamarin-Test.iOS.exe
2> /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/alexanderhailfinger/Library/Caches/Xamarin/mtbs/builds/XamarinTest.iOS/60e86c1846a1d34766444d738379d620361df267ca16fa97aeed8be8cfd7a8b5/obj/iPhoneSimulator/Debug/response-file.rsp
========== Alles neu erstellen: 2 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

========== Bereitstellen: 0 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========
"XamarinTest.iOS" wird auf "iPhone 13 iOS 15.4" gestartet...
Launching...
Using Xcode 13.3.1 found in /Applications/Xcode.app/Contents/Developer
Xamarin.Hosting: Xamarin.Hosting
Xamarin.Hosting: Version: 5958360612 (xcode13.3)
Xamarin.Hosting: Xcode: /Applications/Xcode.app
Xamarin.Hosting: Xcode Version: 13.3.1
Xamarin.Hosting: Verbosity: 1
Xamarin.Hosting: Simulator watchdogs are already disabled for 'iOS 15.4 (19E240) - iPhone 13'.
Xamarin.Hosting: No need to boot (already booted): iPhone 13
Xamarin.Hosting: Installing /Users/alexanderhailfinger/Library/Caches/Xamarin/mtbs/builds/XamarinTest.iOS/60e86c1846a1d34766444d738379d620361df267ca16fa97aeed8be8cfd7a8b5/bin/iPhoneSimulator/Debug/Xamarin-Test.iOS.app with Bundle Identifier com.companyname.Xamarin on 'iOS 15.4 (19E240) - iPhone 13'...
Xamarin.Hosting: Installed 'com.companyname.Xamarin' from /Users/alexanderhailfinger/Library/Caches/Xamarin/mtbs/builds/XamarinTest.iOS/60e86c1846a1d34766444d738379d620361df267ca16fa97aeed8be8cfd7a8b5/bin/iPhoneSimulator/Debug/Xamarin-Test.iOS.app
Xamarin.Hosting: Could not find any potentially troublesome weak load commands.
Xamarin.Hosting: The bundle id com.companyname.Xamarin was successfully installed.
Xamarin.Hosting: Creating shared memory for:
XAMARIN_DEBUG_PORT=59888
Xamarin.Hosting: Created shared memory token: 294878
Xamarin.Hosting: Created shared memory id: 65536
Xamarin.Hosting: Mapped shared memory: 0x106d10000 for key 294878 and id 65536
Xamarin.Hosting: Launching com.companyname.Xamarin async on 'iOS 15.4 (19E240) - iPhone 13' with: {
arguments = (
"-monodevelop-port",
59888
);
environment = {
NSUnbufferedIO = YES;
"OS_ACTIVITY_DT_MODE" = YES;
"XAMARIN_DEBUG_PORT" = 59888;
};
}
Xamarin.Hosting: Launched com.companyname.Xamarin with pid 9212
Xamarin.Hosting: Simulated process has exited.
Simulator wird zum Starten der App gestartet...
Der Simulator wurde zum Starten der App gestartet...
Starten war erfolgreich. Die Anwendung "XamarinTest.iOS" wurde erfolgreich auf "iPhone 13 iOS 15.4" gestartet.

Workaround

If you add the nuget package System.Memory 4.5.0 it works !

BlazorWebAssemblySignalRApp.zip

@AHComp AHComp added s/unverified New report that has yet to be verified t/bug 🐛 labels Apr 13, 2022
@AHComp
Copy link
Author

AHComp commented May 4, 2022

Why nobody verify this bug ? The bug exists since September 2021.

@AHComp
Copy link
Author

AHComp commented May 15, 2022

https://developercommunity.visualstudio.com/t/bug-in-visual-studio-2022-xamarin-signalr-method-n/1528510

Here again the link to the problem isssued in Sept 21.

@andyzukunft
Copy link

I can confirm that this issue is "back". It seems not to be the exact same issue which I encountered earlier this year with Android on Visual Studio 2022 Release however it does looks similar. The Android issue disappeared - I think - by using the Preview version of Visual Studio 2022. I just started having a look at the iOS version and there it is again. I tried the Visual Studio 2022 v17.3 Preview but I can't deploy to iOS or Android at all with this version :-/.

Error during SignalRHub.StartAsync()
System.MissingMethodException: Method not found: Microsoft.AspNetCore.Http.Connections.NegotiationResponse Microsoft.AspNetCore.Http.Connections.NegotiateProtocol.ParseResponse(System.ReadOnlySpan1<byte>)

I have been working on/off on this issue for the last few days. In the end - somehow - the well known System.Buffer and System.Memory workaround made it work for me (see 1, 2, 3). It never had before for the earlier problem.

Interesting information

  • Using Visual Studio 2022 v17.2.5
  • Setting the xamarn shared project back to SignalR v5.0.14? (or similar) generated the "old" error message I had with Android earlier this year.
  • It now works (with the mentioned workaround) for SignalR 6.0.6 (newest at the moment).
  • Xamarin shared project is set to .NET Standard 2.0
  • Turning Hot Reload off did not help (Xamarin iOS only or even all Hot Reload).

When did it start to work?
I cleaned the solution, removed all \bin and \obj folders manually (to make sure), modified the three csproj files by hand with the following entries:

<PackageReference Include="System.Buffers" Version="4.5.1" IncludeAssets="none" />
<PackageReference Include="System.Memory" Version="4.5.4" IncludeAssets="none" />

I started the Studio, rebuild (twice or so) and started the iOS app in the "simulator". It worked. I checked with the Android emulator which is also still working.

So far so good. Unfortunately Xamarin is a lot like magic. It works now, it might work five builds from now but somewhere it might also just stop working. So lets hope for the best.

@xty123321
Copy link

#15311 (comment)
@andyzukunft You are right, it solves my problem perfectly,Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
s/unverified New report that has yet to be verified t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants