Comments (11)
@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.
@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.
@somebody32 I'll investigate this.
from react-native-mmkv.
- Does it work on iOS?
- Did you follow the installation guide?
from react-native-mmkv.
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.
Could you test if it works without reanimated? Also, can you run the Example app?
from react-native-mmkv.
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?
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.
@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.
@mrousavy yes, but 1.x version ([email protected]), as far as I know, it is not using turbo-modules yet?
from react-native-mmkv.
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.
from react-native-mmkv.
Maybe running mmkv in index.js once will solve this situation. (to import.)
from react-native-mmkv.
Related Issues (20)
- Crashing on bundle reload in beta version HOT 1
- Bug on RN 0.74 HOT 10
- How to Implement iCloud Sync to Keep Reinstalled Apps to Recover Data? HOT 3
- Building for 'iOS-simulator', but linking in dylib (/opt/local/lib/libz.1.3.1.dylib) built for 'macOS' HOT 2
- After defining the path for the MMKV instance, an empty 'MMKV' directory is still generated under $(Documents) HOT 3
- Expo managment. HOT 3
- Storage data not updating to next scene HOT 2
- Beta 5 Android build error cannot find symbol HOT 9
- > Task :app:mergeDebugNativeLibs FAILED
- trim not present HOT 3
- Android armeabi-v7a support dropped by Tencent HOT 3
- Error: Failed to create a new MMKV instance: React Native is not running on-device. HOT 4
- Error in setup: HOT 3
- ERROR Error: Failed to create a new MMKV instance: The native MMKV Module could not be found. HOT 2
- Error : TypeError: Cannot read property 'MULTI_PROCESS' of undefined HOT 1
- Android Build Error - subcommand failed HOT 4
- Critical Error in 0.74.* iOS HOT 10
- Bug on options HOT 2
- Query about tracking multiple instances HOT 2
- Add method to check if MMKV instance with given ID exists HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-mmkv.