Git Product home page Git Product logo

Comments (13)

mrousavy avatar mrousavy commented on May 18, 2024 2

This might be related to #28 because the current way of installing the JSI bindings is a bit hacky. I'll rewrite this thing to a TurboModule, which should fix those issues.

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024 1

Okay just checked out the logs, I'm wondering what the prefix means? (aka the s. in s.MMKV.set) Is that just a thing Sentry does or is there something wrong with the import?

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024 1

Can you check if the newest version (1.1.6) works for you? Note that it requires some additional installation steps, see INSTALL.md.

Also, if you can't import the library see this issue which includes a temporary workaround. I'll find a fix that requires no native changes at all soon ๐Ÿ‘

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024
M.MMKC.delete is not a function

is that actually the error? I don't think I had a typo in there ๐Ÿคจ

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024

Also, please create a reproduceable sample app for this, I have no way of debugging that. Can you absolutely not reproduce it in debug mode? Maybe try upgrading react-native to 0.64?

from react-native-mmkv.

linzera avatar linzera commented on May 18, 2024

Okay just checked out the logs, I'm wondering what the prefix means? (aka the s. in s.MMKV.set) Is that just a thing Sentry does or is there something wrong with the import?

Sentry does this. Sorry for the small debug information that sentry gives on share mode.

from react-native-mmkv.

linzera avatar linzera commented on May 18, 2024

Also, please create a reproducible sample app for this, I have no way of debugging that. Can you absolutely not reproduce it in debug mode? Maybe try upgrading react-native to 0.64?

Debug works like a charm, but on release mode in this specific user, this happens, I will try to upgrade RN to see if I can catch some way to reproduce this.

from react-native-mmkv.

linzera avatar linzera commented on May 18, 2024

More information about the crash:

AndroidAPI
image (3)

from react-native-mmkv.

LadislavBohm avatar LadislavBohm commented on May 18, 2024

This is currently happening for me even in DEBUG (Android) when I upgrade to 1.0.11. Everything works on version 1.0.10.

from react-native-mmkv.

chr4ss1 avatar chr4ss1 commented on May 18, 2024

@mrousavy is there also a temporary workaround for iOS? I think the JSI bindings problem affect both platforms

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024

@ChrisEelmaa I haven't seen any issues on the iOS platform, so I don't think there's something wrong there. Are you experiencing crashes?

Of course I will still migrate it to TurboModules as soon as possible.

from react-native-mmkv.

chr4ss1 avatar chr4ss1 commented on May 18, 2024

I am not directly using this library however I have taken a look at how you install the iOS bindings as well your thread (facebook/react-native#31197), and am fairly confident that is not the correct way, as I also install the iOS bindings like that, and occasionally there is a race condition, I managed to reproduce it 2 times out of 300 or so, but essentially what I believe is happening is that the code

jsiRuntime.global().setProperty(jsiRuntime, "mmkvGet", ....);

gets executed too soon/too late sometimes, and in that case the global.mmkvGet is not available, and won't be available throughout the app

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024

Exactly, it is not the correct way. The correct way would be by using TurboModules, but they're not fully ready yet so we have to use this JSI install workaround. If there are also race conditions for iOS I could take a look on how I can install it there, if you find something out let me know

from react-native-mmkv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.