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

[BUG] Kermit version problem #653

Closed
ndiazgranados opened this issue Jul 26, 2024 · 1 comment · Fixed by #655
Closed

[BUG] Kermit version problem #653

ndiazgranados opened this issue Jul 26, 2024 · 1 comment · Fixed by #655
Labels
bug Something isn't working

Comments

@ndiazgranados
Copy link

ndiazgranados commented Jul 26, 2024

i have an app in kotlin multiplatform, but when im trying to use store I receive an error due to kermit (I have also a dependency of kermit in my project specific 2.0.4) so I have this code in a repository

   private val store by lazy {
       StoreBuilder.from(
           fetcher = Fetcher.of {
// entity from remote source (suspend fun)
               Entity(
                   id = 0,
                   scannedToday = 0,
                   collectedToday = 0,
                   droppedOffToday = 0,
                   beingHandled = 0,
               )
           },
           sourceOfTruth = SourceOfTruth.of(
               reader = appDatabase.dao()::get,
               writer = { _, entity -> appDatabase.dao().insert(entity) },
               delete = appDatabase.dao()::delete,
               deleteAll = appDatabase.dao()::wipe
           )
       ).cachePolicy(
           MemoryPolicy.builder<Any, Any>()
               .setMaxSize(1)
               .setExpireAfterWrite(20.seconds)
               .build()
       )
           .build()
   }
   
   

If i run android app all is going well but in IOS as soon as the class that contains the val is initialized i got this error

io.ktor.client.plugins.HttpRequest$1@61240950 thread:  error: Parent job is Cancelling]
kotlin.native.internal.IrLinkageError: Constructor 'CommonWriter.<init>' can not be called: No constructor found for symbol 'co.touchlab.kermit/CommonWriter.<init>|<init>(){}[0]'

also I notices that if I downgrade my dependency to 1.2.2 (the one is used in store5) is solved

@ndiazgranados ndiazgranados added the bug Something isn't working label Jul 26, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in Store Roadmap Jul 26, 2024
@kasem-sm
Copy link

kasem-sm commented Aug 1, 2024

Facing the same issue :/

solcott added a commit to solcott/Store that referenced this issue Sep 18, 2024
@solcott solcott mentioned this issue Sep 18, 2024
1 task
solcott added a commit to solcott/Store that referenced this issue Sep 18, 2024
Fixes MobileNativeFoundation#653 and MobileNativeFoundation#654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in Store Roadmap Sep 19, 2024
amrfarid140 pushed a commit to amrfarid140/Store that referenced this issue Oct 1, 2024
Fixes MobileNativeFoundation#653 and MobileNativeFoundation#654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
matt-ramotar pushed a commit that referenced this issue Oct 4, 2024
* Add test case

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Always Release storeLock

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Update kermit to 2.0.4 (#655)

Fixes #653 and #654

Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

* Revert "Update kermit to 2.0.4 (#655)"

This reverts commit 76f34d4.

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>

---------

Signed-off-by: Amr Yousef <amr.farid140@gmail.com>
Signed-off-by: Scott Olcott <scottolcott@gmail.com>
Co-authored-by: Scott Olcott <scottolcott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants