-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net MAUI app throws System.Net.NetworkInformation.NetworkInformationException when creating AblyRealtime object #1205
Comments
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3330 |
@bikramjitkar I have a hunch, the error might be related to network state monitoring. ( Detailed error log will be more useful ) |
Sample code
|
Hi, System.TypeLoadException: 'Could not load type of field 'IO.Ably.Realtime.Workflow.RealtimeWorkflow+d__36:<>u__2' (11) due to: Could not resolve type with token 010000ba from typeref (expected class 'System.Runtime.CompilerServices.ValueTaskAwaiter1' in assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e') assembly:mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e type:System.Runtime.CompilerServices.ValueTaskAwaiter1 member:(null)' |
Can I get the dotnet lib version, dotnet version and platform you are trying to run the app on ( android. windows machine, ios ) ? |
Also, if possible, it would be useful if you can push demo version of your app on the github and post link here so it's easy to debug the code + configuration |
I'm using the ably.io nuget package (1.2.10), target .net runtime - net6.0, target platform - android 12.0 - api Level 31 |
here's a link to a demo app with the issue: |
@bikramjitkar we will check and get you back on this 👍 |
@bikramjitkar I was able to reproduce the issue locally on the android emulator. I feel this might be related to the linker issue, where dependencies are not preserved while building Also, Can you try running the same app on |
@bikramjitkar This seems to be more relevant in current case |
hi, yes, it does work properly when Windows Machine is selected. |
@bikramjitkar try running the app in release mode for android. You can check for logs from |
This seems to be related https://riptutorial.com/dot-net-core/topic/5994/understanding-system-runtime-vs--mscorlib (reason why we don't face issues in xamarin, is because it's based on mono framework (netstandard is also stable) instead of .net 6) I am not sure why dotnet build is choosing |
I have found similar issues related to this, involved with For both of those issues, the app works well on windows machines, yet it fails to work on android. I will be creating an issue for this under https://github.com/dotnet/maui/issues. |
I have created a new issue for this on official repo. dotnet/runtime#82193. It seems we can't move forward without a proper explanation/fix from the MAUI team. |
@bikramjitkar it seems we need to explicitly add targets for Meanwhile, you can use the temporary solution mentioned here Go into your local NuGet package cache folder /.nuget/packages/ably.io/1.2.10/lib/ and remove the mono android folder there, then rebuild the app. That will make it pick the netstandard2.0 version instead of mono android. And it works : ) |
@bikramjitkar This issue has been fixed as a part of new release 1.2.11. |
Is .Net MAUI supported?
The text was updated successfully, but these errors were encountered: