Skip to content
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

Issue when AOT enabled #298

Open
berik-99 opened this issue Oct 14, 2024 · 0 comments
Open

Issue when AOT enabled #298

berik-99 opened this issue Oct 14, 2024 · 0 comments

Comments

@berik-99
Copy link

I start by giving a big thank you to the creator of the library for all the hard work done so far and to all the contributors!

I tried to use the new AOT publishing feature, but I encountered some problems:

First Problem

The client execution stops with a NullReferenceException when calling the Connect() method, which obviously halts the execution.
the stack trace is:

System.NullReferenceException: 'Object reference not set to an instance of an object.'
   at WatsonTcp.WatsonTcpClient.Connect()
   at Program.<Main>$(String[] args)

Steps to reproduce:

  1. Create a Console Application project with AOT disabled and copy the server example from the README.
  2. Create a second Console Application project with AOT enabled, and copy the client example from the README.
  3. Start the server first, then the client.

Second Problem

The server seems to work initially, but when a client connects, it is immediately disconnected without any direct exceptions on either side, although two exceptions are logged in the server application's debug console:

Exception thrown: 'System.InvalidOperationException' in System.Text.Json.dll
Exception thrown: 'System.InvalidOperationException' in System.Private.CoreLib.dll

Steps to reproduce:

  1. Create a Console Application project with AOT enabled and copy the server example from the README.
  2. Create a second Console Application project with AOT disabled, and copy the client example from the README.
  3. Start the server first, then the client.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant