Skip to content

Bug: After application with surrealdb extention publishing AOT Dahomey.CBOR produces errors #159

@mandars-icpl

Description

@mandars-icpl

Describe the bug

After upgrading to version surrealdb.net v0.6.0 and v0.7.0 to add compatibility with SurrealDB 2.x, my application works fine when run from Visual Studio without AOT (using runtime). However, when publishing the application with AOT, it throws the following error:

image

Steps to reproduce

Steps for reproducing are given as follows :

Note:

  • You will need a linux-x64 instance to reproduce the issue. Also, the project link provided below is an exact replica of the
  • Surrealdb.NET repository's SurrealDb.Examples.Todo.Aot project.

Step 1: Clone the Repository

Clone the repository https://github.com/mandars-icpl/sdb-aot-test.git. This application is an exact copy of the SurrealDB Todo API AOT.

git clone https://github.com/mandars-icpl/sdb-aot-test.git

Step 2: Build the Solution

Run the following command to build the solution:

dotnet build SurrealAotTest.sln

Step 3: Publish the AOT Build

Run the following command to publish the AOT build:

dotnet publish SurrealAotTest/SurrealAotTest.csproj -r linux-x64 -c Release

Step 4: Run the Binary

Navigate to the SurrealAotTest/bin/Release/net9.0/linux-x64/native directory and run the binary. Make sure the ConnectionString in the appsettings.json file is correctly configured.

Run the following commands:

cd SurrealAotTest/bin/Release/net9.0/linux-x64/native
./SurrealAotTest

Right after running the application you will see that the applicatoin couldn't start due to the CBOR error.

image

Expected behaviour

Expected behavior was that the default should be inserted in to DB.

SurrealDB version

v2.0.4

Package version(s)

The packages used in the above-mentioned project are as follows:

image

Contact Details

mandars@infopercept.com

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions