You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
If I try to access the database from the OnAfterRenderAsync lifecycle method, or binding to a method that accesses the database, the following exception is thrown:
One or more errors occurred. (JSRuntime must be set up correctly and must be an instance of JSRuntimeBase to use DotNetObjectRef.)
With the following stack trace:
at Microsoft.JSInterop.DotNetObjectRefManager.get_Current()
at Microsoft.JSInterop.DotNetObjectRef`1..ctor(TValue value)
at Microsoft.JSInterop.DotNetObjectRef.Create[TValue](TValue value)
at TG.Blazor.IndexedDB.IndexedDBManager.OpenDb()
at TG.Blazor.IndexedDB.IndexedDBManager.EnsureDbOpen()
at TG.Blazor.IndexedDB.IndexedDBManager.GetRecords[TResult](String storeName)
at Blazor.IndexedDB.Framework.Extensions.TaskExtensions.InvokeAsyncWithResult(MethodInfo this, Object obj, Object[] parameters)
at Blazor.IndexedDB.Framework.IndexedDb.GetRows(Type propertyType, String storeName)
at Blazor.IndexedDB.Framework.IndexedDb.LoadData()
at Blazor.IndexedDB.Framework.IndexedDb.WaitForConnection()
at Blazor.IndexedDB.Framework.IndexedDbFactory.CreateT
However, if I call the same method from a button click it works as expected.
The text was updated successfully, but these errors were encountered:
If I try to access the database from the OnAfterRenderAsync lifecycle method, or binding to a method that accesses the database, the following exception is thrown:
One or more errors occurred. (JSRuntime must be set up correctly and must be an instance of JSRuntimeBase to use DotNetObjectRef.)
With the following stack trace:
at Microsoft.JSInterop.DotNetObjectRefManager.get_Current()
at Microsoft.JSInterop.DotNetObjectRef`1..ctor(TValue value)
at Microsoft.JSInterop.DotNetObjectRef.Create[TValue](TValue value)
at TG.Blazor.IndexedDB.IndexedDBManager.OpenDb()
at TG.Blazor.IndexedDB.IndexedDBManager.EnsureDbOpen()
at TG.Blazor.IndexedDB.IndexedDBManager.GetRecords[TResult](String storeName)
at Blazor.IndexedDB.Framework.Extensions.TaskExtensions.InvokeAsyncWithResult(MethodInfo this, Object obj, Object[] parameters)
at Blazor.IndexedDB.Framework.IndexedDb.GetRows(Type propertyType, String storeName)
at Blazor.IndexedDB.Framework.IndexedDb.LoadData()
at Blazor.IndexedDB.Framework.IndexedDb.WaitForConnection()
at Blazor.IndexedDB.Framework.IndexedDbFactory.CreateT
However, if I call the same method from a button click it works as expected.
The text was updated successfully, but these errors were encountered: