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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: SqlRawPersistentBlobCache no valid operation queue in Xamarin.iOS .net 7 when link all set #835

Open
MagneticLlama opened this issue Mar 4, 2023 · 0 comments
Labels

Comments

@MagneticLlama
Copy link

MagneticLlama commented Mar 4, 2023

Describe the bug 馃悶

After registering the app name with Akavache.Registrations.Start, a call to InsertObject results in a System.InvalidOperationException "There is not a valid operation queue".
SQLitePersistentBlobCache and SQLiteEncryptedBlobCache have been referenced in LinkerPreserve as noted in README. New instances of these classes can be successfully created and referenced (as a test.)
I've also attempted to add --linkskip Akavache to the iOS project properties, including all other Akavache namespaces.
Adding a BlobCache.EnsureInitialized(); after app name registration also didn't help.

Step to reproduce

In project properties set
<MtouchLink>full</MtouchLink>

In app start, register app name:
Akavache.Registrations.Start(blobCacheApplicationName);

Attempt to input a starting object into any cache:
await BlobCache.UserAccount.InsertObject("SuccessfullyStoredValue", true);

Exception will be hit:

System.InvalidOperationException: There is not a valid operation queue
at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception ) in /_/Rx.NET/Source/src/System.Reactive/Internal/ExceptionServicesImpl.cs:line 19
at System.Reactive.ExceptionHelpers.Throw(Exception ) in /_/Rx.NET/Source/src/System.Reactive/Internal/ExceptionServices.cs:line 16
at System.Reactive.Subjects.AsyncSubject`1[[System.Reactive.Unit, System.Reactive, Version=5.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263]].GetResult() in /_/Rx.NET/Source/src/System.Reactive/Subjects/AsyncSubject.cs:line 430

Expected behavior

Operation queue should be initialized after registering app name, allowing an object to be inserted into the cache.

IDE

Visual Studio 2022

Operating system

Windows 10 Pro

Version

10.0.19044

Device

iPhone 8

Akavache Version

9.1.7

Additional information 鈩癸笍

iOS Project framework
net7.0-ios

Visual Studio version
17.5.1

iOS version
16.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant