Closed mastrgamr closed 11 months ago
On a quick look, it looks like your SOT is only emitting if there is data. Try adding an else condition here and emitting null
I'm not seeing any networking logs, so I'd also step through here to make sure you are getting a response and deserializing it correctly
Thanks for the insight matt. I am deserializing from the network correctly but for some reason I get a ReadExcpetion and vague WriteException (with no cause output to logs?). The only clues I might have is SQLDelight's executeAsOne()
function not returning a value. My console is not showing an output when running the function. I'm thinking because there's nothing being returned from the SourceOfTruth reader
function it's causing Store to fail Read/Write
Here's my latest logs:
It looks like you aren't hitting this: https://github.com/mastrgamr/KMP-Store-Prototype/blob/11fbfeedf77644a4238db9a4b6df6ca6e572eca3/shared/src/commonMain/kotlin/com/example/kmptest/store/coindata/sot/CoinCapSourceOfTruthProvider.kt#L36
We write to the SOT after fetching from network. Can you try removing the require statement and switching on the ByCoinSymbol key?
Thanks a lot for the help. I managed to get my prototype up and running just fine.
I was following the code and realized SourceOfTruth
's reader
/writer
functions are executed using the same key given to query the Store. The require()
method gave it away, guess I must restructure my CoinDataKey
Love the library!
Awesome! Happy to help if anything else comes up
Library Version:
org.mobilenativefoundation.store:store5:5.0.0
Hello, I'm reaching out for guidance on how to bootstrap a project. I tried to get insight into how to implement this by referencing the howl repo, which seems to be a bit outdated from the latest Store library version?
I recently came across this project and thought it'd be cool to get a prototype up and running with a sample project that displays data from a random public API. I'm having an issue fetching, and saving data to the Store. I'm finding it hard to debug because I don't know what the issue is and the logs I try to generate don't show any helpful info.
Logcat output (beginning from app startup)
disclaimer: I have no experience with Koin (let alone KMP)
To Reproduce
Build/Run the prototype app
Expected behavior The
Composable
should display a response from the Store query