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)
- Android: Build Error
- Feature: get keys with prefix HOT 3
- .
- react-native-mmkv is not supported in Expo Go!
- The enableKeyExpire function and the expireDuration parameter are missing HOT 4
- React-Native Android build is failing with error - Task :react-native-mmkv:prepareBoost FAILED HOT 14
- Naming events
- 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead. HOT 3
- Read main application's mmkv values from Notification Service (IOS) HOT 7
- app groups: value undefined until restart HOT 4
- having problems with npx pod-install
- react-native-mmkv and encryption export regulations
- App group enhancement introduced a breaking change (2.10.0) HOT 2
- A lot of logs even in production builds HOT 8
- Make `Set` and `Get` method consistent HOT 6
- Error: react-native-mmkv is not supported in Expo Go! Use EAS HOT 5
- com.facebook.react.JavaScript (17): EXC_BAD_ACCESS (code=1, address=0xcf9b17) from bytes[m_position++]; HOT 2
- EXC_BAD_ACCESS on IOS with codepush restart
- detox throws error when metro is run with mocks HOT 2
- mmkv관련 로그 발생 해결
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.