Git Product home page Git Product logo

Comments (11)

mrousavy avatar mrousavy commented on May 18, 2024 1

@yuri-lomashko-itechart afaik this is a fast refresh issue. It's currently a bit difficult to correctly install JSI functions, so this will definitely be fixed with RN 0.65/0.66 (when TurboModules are actually usable). There should be no issues in the production/release app.

from react-native-mmkv.

somebody32 avatar somebody32 commented on May 18, 2024 1

@mrousavy, unfortunately, this is happening to me in production on ios and looks like a race condition affecting older phones more often: sometimes I receive a u.MMKV.getBoolean is not a function on Sentry.

Is there any workaround for this? Any way to retry?

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024 1

@somebody32 I'll investigate this.

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024
  1. Does it work on iOS?
  2. Did you follow the installation guide?

from react-native-mmkv.

ismailyagci avatar ismailyagci commented on May 18, 2024

1 I don't know if it works on ios I don't have a mac computer
2 Yes i did it. If i run

import com.swmansion.reanimated.ReanimatedJSIModulePackage;
                               ^
  symbol:   class ReanimatedJSIModulePackage
  location: package com.swmansion.reanimated
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\JSIPackage.java:5: error: cannot find symbol
import com.mutfagim.MmkvModule;
                   ^
  symbol:   class MmkvModule
  location: package com.mutfagim
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\JSIPackage.java:11: error: cannot find symbol
public class JSIPackage extends ReanimatedJSIModulePackage {
                                ^
  symbol: class ReanimatedJSIModulePackage
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\JSIPackage.java:12: error: method does not override or implement a method from a supertype
    @Override
    ^
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\JSIPackage.java:14: error: cannot find symbol
        super.getJSIModules(reactApplicationContext, jsContext);
        ^
  symbol:   variable super
  location: class JSIPackage
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\JSIPackage.java:15: error: cannot find symbol
        MmkvModule.install(jsContext, reactApplicationContext.getFilesDir().getAbsolutePath() + "/mmkv");
        ^
  symbol:   variable MmkvModule
  location: class JSIPackage
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\MainApplication.java:40: error: cannot find symbol      
        protected JSIModulePackage getJSIModulePackage() {
                  ^
  symbol: class JSIModulePackage
C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\main\java\com\mutfagim\MainApplication.java:41: error: cannot find symbol      
          return new JSIPackage();
                     ^
  symbol: class JSIPackage
Note: C:\Users\ahest\Desktop\Projects\Mutfagim\mutfagim-client\android\app\src\debug\java\com\mutfagim\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024

Could you test if it works without reanimated? Also, can you run the Example app?

from react-native-mmkv.

yuri-lomashko-itechart avatar yuri-lomashko-itechart commented on May 18, 2024

Hello, I guess I receive the similar error on iOS sometimes when use Fast Refresh in app, while code writing. In release mode I don't receive it, but I'm not sure about the real world experience after shipping to store.

Do you have any ideas?

ScreenShot

Simulator Screen Shot - iPhone 12 Pro - 2021-04-15 at 18 41 29

Error storing data [
TypeError: _$$_REQUIRE(_dependencyMap[3], "react-native-mmkv").MMKV.getBoolean is not a function.
(In '_$$_REQUIRE(_dependencyMap[3], "react-native-mmkv").MMKV.getBoolean(MIGRATED_KEY)', '_$$_REQUIRE(_dependencyMap[3], "react-native-mmkv").MMKV.getBoolean' is undefined)
]

react-native: 0.64.0
react-native-mmkv : 1.1.6
react-native-reanimated: 2.1.0
react: 17.0.3

from react-native-mmkv.

mrousavy avatar mrousavy commented on May 18, 2024

@somebody32 are you using Reanimated?

The problem here is that reanimated uses a way of initializing their JSI/Turbo- Module which I cannot use since it can only be used by one module. I'm limited by how ready TurboModules are in React Native, but I'm sure I'll come up with a temporary solution until it can get fully automatically initialized.

from react-native-mmkv.

somebody32 avatar somebody32 commented on May 18, 2024

@mrousavy yes, but 1.x version ([email protected]), as far as I know, it is not using turbo-modules yet?

from react-native-mmkv.

lfabl avatar lfabl commented on May 18, 2024

For now, you can do your operations in a separate function. You can do a work like the visual in the function you just created. This problem will be fixed. Then you turn it back to its original state. I think the root of the problem is due to differences in the runtime of app.js and the runtime of MMKV.

Ekran görüntüsü 2021-04-24 014731

from react-native-mmkv.

lfabl avatar lfabl commented on May 18, 2024

Maybe running mmkv in index.js once will solve this situation. (to import.)

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.