Sequence contains no elements at 5.0.0-alpha
See original GitHub issueEvery operation with collection throw System.InvalidOperationException.
Framework: Xamarin.Forms Platform: Android OS Library Version: 5.0.0-alpha
Code to reproduce:
var db = new LiteDatabase("database.db"));
var collection = db.GetCollection<T>("exampleColleciton");
var allElements= collection.FindAll();
Also Insert, Delete, Find will throw System.InvalidOperationException: Sequence contains no elements StackTrace:
Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source)
LiteDB.Engine.LiteEngine
LiteDB.Engine.LiteEngine..ctor (LiteDB.Engine.EngineSettings settings) [0x0011b] in <c593d84b647a4ed5b475ff841900e3c2>:0
LiteDB
ConnectionString.CreateEngine ()
System
Lazy`1[T].ViaFactory (System.Threading.LazyThreadSafetyMode mode)
System
LazyHelper.ThrowException ()
System
Lazy`1[T].CreateValue ()
System
Lazy`1[T].get_Value ()
System
Lazy`1[T].CreateValue ()
System
Lazy`1[T].get_Value ()
LiteDB
LiteCollection`1[T].Find (LiteDB.Query query, System.Int32 skip, System.Int32 limit)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
c# - Sequence contains no elements?
When you get the LINQ error "Sequence contains no elements", this is usually because you are using the First() or Single() command rather...
Read more >Sequence contains no elements, ERROR - Microsoft Q&A
it is an old Entity Framework application that I am trying to reconstruct and get running. Server Error in '/' Application. ... Description:...
Read more >Error updating trailing stop order ticket (Sequence contains ...
Hi I received this error when updating a StopMarketOrder ticket. The weird issue is the code works fine with just 1 or 2...
Read more >Navigation | Jetpack
Navigation is a framework for navigating between 'destinations' within an Android application that provides a consistent API whether destinations are ...
Read more >U.S. Government Research & Development Reports
In mixtures with 5 to 10 % CS2 we have observed first - order anti - Stokes ... This implies that only the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ran into the same problem. It only occurs when I create the database completely new (0kB file). The Exception is thrown on
LiteDatabase db = new LiteDatabase(liteDbPath)
. It can however be opened by the LiteDB Studio. I solved the problem by simply downgrading to 4.1.4.yeah that was the problem, i fixed it by deleting the file creation:
Many thanks for your help! kind regards, bluekuen