trilitech / tezos-unity-sdk

Tezos Unity SDK for developers. Discover the future of Web3 gaming.
https://tezos.com/unity
MIT License
24 stars 12 forks source link

Error: Sharing violation on beacon.db #47

Closed m-kus closed 1 year ago

m-kus commented 1 year ago

OS: Windows 10 Unity version: 2021.3.23f1 Unity SDK version: 1.3.0 Target platform: Windows Standalone

Steps to reproduce:

Sometimes it works, sometimes it fails.

Error: IOException: Sharing violation on path C:\Users\xxx\AppData\LocalLow\Tezos\Examples Project\beacon.db image

Workaround: If close and open the Unity editor it works well once afterwards

Hint: Most likely the c# code leaves a file open somethimes, but it should never do so.

m-kus commented 1 year ago

Need to bump beacon dependency: https://github.com/baking-bad/beacon-dotnet-sdk/releases/tag/v1.0.23

m-kus commented 1 year ago

Still reproduces on 1.3.1

We have issue at the QR generation as upon the first generation, we get an ioexception, violation of 
shared path error for the beacon.db and beacon-log.db file generated. We tried moving it to a different   
directory, the same error will still occur. Our current work around is to delete and regenerate the files, 
however this will sever the existing wallet connection and treat it as a new connection.

This error will not trigger with a fresh project.
k-karuna commented 1 year ago

This issue appears on old .db files, we have updated beacon-dotnet-sdk dependency that have updated litedb version within itself. We should to improve beacon-dotnet-sdk to handle this cases e.g. by migrations, but until it is done workaround is to use new database file, e.g. you can use new db filename in beacon options