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

Problem updating from 1.3.0 to 1.5.2 (EngineSettings must have Filename or DataStream as data source) #107

Closed
fefferoni opened this issue Mar 11, 2022 · 13 comments

Comments

@fefferoni
Copy link

fefferoni commented Mar 11, 2022

Hey, thanks for an awesome plugin. I am trying to update from version 1.3.0 to 1.5.2 with LiteDB. I have set Barrel.Update = true right after setting the ApplicationId. No encryption is used.

When accessing barrel with Barrel.Current I am getting the following error:

EngineSettings must have Filename or DataStream as data source
at LiteDB.Engine.EngineSettings.CreateDataFactory () [0x0008d] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at LiteDB.Engine.DiskService..ctor (LiteDB.Engine.EngineSettings settings, System.Int32[] memorySegmentSizes) [0x00012] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at LiteDB.Engine.LiteEngine..ctor (LiteDB.Engine.EngineSettings settings) [0x00173] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at LiteDB.ConnectionString.CreateEngine () [0x0004a] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at LiteDB.LiteDatabase..ctor (LiteDB.ConnectionString connectionString, LiteDB.BsonMapper mapper) [0x00034] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at LiteDB.LiteDatabase..ctor (System.String connectionString, LiteDB.BsonMapper mapper) [0x00007] in <e37eae51170e472a88b7e61cb2c985c3>:0    
at MonkeyCache.LiteDB.Barrel..ctor (System.String cacheDirectory) [0x0006c] in D:\a\1\s\src\MonkeyCache.LiteDB\Barrel.cs:71    
at MonkeyCache.LiteDB.Barrel.get_Current () [0x00000] in D:\a\1\s\src\MonkeyCache.LiteDB\Barrel.cs:35

Any clues?
Thanks

@jamesmontemagno
Copy link
Owner

See: https://github.com/jamesmontemagno/monkey-cache#litedb-upgrade-4---5--nuget-13---15

There was a major change in Litedb that needs a migration

@fefferoni
Copy link
Author

Yes, like I wrote, I already tried setting Barrel.Update = true. Maybe I am missing something here? Do I need to do something else?

@jamesmontemagno
Copy link
Owner

Missed that in the original posting.

Hmmmm looking through mbdavid/LiteDB#1428 but not 100% sure

@jamesmontemagno
Copy link
Owner

I am goign to try upgrading a few things to the latest and greatest and see if that has any impact

@jamesmontemagno
Copy link
Owner

jamesmontemagno commented Mar 12, 2022

Can you try out 1.6.0-beta and see if that works for you at all, else the thing to do may be to change the bucketid and create a new db

@fefferoni
Copy link
Author

I can no longer set the Barrel.Update flag in the 1.6.0-beta version. Hence getting the old File is not a valid LiteDB database format or contains a invalid password. error message. Was the property removed?

I will investigate a bit further later on.

@jamesmontemagno
Copy link
Owner

Hmmmmm it shouldn't have been... let me check...

@jamesmontemagno
Copy link
Owner

Whoops yeah forgot to merge the old one. try 1.6.1 when it is out soon here

@fefferoni
Copy link
Author

Ok, tried now but unfortunately the same error persists. Tried it on two devices. When I go back to 1.3 it works fine..
Thanks for your effort, I appreciate it. I will investigate a bit myself later on and write here if I find anything.

Greetings from Sweden :)

@jamesmontemagno
Copy link
Owner

Gotcha, yeah I will check the litedb github as well...

If you set a different application id does it work (aka create a new cache)? that may be the easier route to go. The idea always is that it was a cache and you can clear it out when needed

@jamesmontemagno
Copy link
Owner

I figured it out! Let me boot up 1.6.2 :)

@fefferoni
Copy link
Author

Works! Thanks for your quick response to this.

@jamesmontemagno
Copy link
Owner

Whoop whoop! yeah I forgot to format the non-encrypted file name lol. I'll push to production

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

2 participants