-
Notifications
You must be signed in to change notification settings - Fork 577
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
Unable to use the flipper realm pluggin #5440
Comments
Also I just want a way to view the contents of the realm db in react native in real time . Any approach which helps do the same will be good enough to get me started for the time being . |
I am a bit uncertain if it is related to the Realm plugin or it is a known Flipper issue: facebook/flipper#4304 If you don't use the Realm plugins, do you still see it or not? |
Did you follow these instructions?
My current config... package.json
gradle.properties:
|
FYI @KaulSalil I've upgraded to the latest versions, e.g. "react-native-flipper": "^0.180.0"
Works fine with "realm-flipper-plugin-device": "1.0.28" so far. This migth be an issue with my code though, but I don't think so... |
@ws333 Getting "Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. |
I would create a fresh new React Native project, add realm and a test schema, and get that up and running. Then add the flipper plugin and get that up and running. Then you can compare your project code with the clean version to better pinpoint the issue. |
You might want to check your index.js file (or other files you modified) to correct the "Failed to call into JavaScript module method AppRegistry.runApplication(). ". Probably not related to realm. And also resolve the "Require cycles..." issue, which could be related to the error above. If you didn't do so already, google the error messages you want to resolve, usually you'll find good info on sites like StackOverflow, GitHub etc. |
@ws333 Apologies for the late reply . I hastily created a new project from scratch and added realm to the same . Also updated the flipper plugin . I am still not able to connect flipper to the react native project . Sample repo for the same :https://github.com/KaulSalil/RealmFlipperTest/tree/master . Flipper(Version 0.182.0 (50.0.0)) showed the RSockets are getting deprecated could this be the cause for the issue ? |
@KaulSalil I made a PR on your sample repository to show where the issue may be. You may not be wrapping your app in a // TaskContext being createRealmContext({schema: [Task]});
import TaskContext, {Task} from './DBSchema';
import RealmPlugin from 'realm-flipper-plugin-device';
...
function MainScreen() {
const {useRealm, useQuery, RealmProvider} = TaskContext;
const realm = useRealm();
...
return (
<RealmProvider>
<RealmPlugin realms=[realm] />
{/* Rest of the content... */}
</RealmProvider>
);
} This worked for me with |
@gagik I merged and pulled in your code and this is what flipper is showing . I guess some issues at flippers end or at my end dont know what exactly (could it be cause I am on a mac m1 machine ) . I guess things wont work till facebook/flipper#4304 gets resolved :( |
@KaulSalil Yes, feel free to close if the issue has been solved (or at least things work at your end) |
@kneth flipper is breaking at my end don't know the exact reason why . I can manage by exporting the realm db and viewing the same in realm studio but the bigger problem is that since my app uses realm and realm doesn't allow me to use chrome debugger I have no way of debugging my app ( as an aside I am unable to debug my app using VSCode:-(. ) . I wanted to know could you suggest some way in which I can debug my app ? |
@kneth When I tried to run the |
I haven't tested this out yet, as it just came to my attention, but this "might" work instead of using Flipper: https://reactnative.dev/docs/hermes#debugging-js-on-hermes-using-google-chromes-devtools |
@takameyer enabled hermes for android and followed the instructions provided ran into "DevTools failed to load source map: Could not load content for Fetch through target.." . It seems this doesnt work as well . facebook/react-native#35600 . |
Working Flipper Solution (as of Dec 7 2023)I created a Gist on how to install/configure Realm and Redux Debugger Flipper Plugins working for a RN project here: https://gist.github.com/kalyncoose/0d3fd640fc0c3b1e0174959003a8e911
|
How frequently does the bug occur?
Always
Description
I was expecting to integrate the realm plugin into flipper and view the state/content/hierarchy of my realm tables . After following the instructions provided here :https://www.mongodb.com/docs/realm/sdk/react-native/test-and-debug/debugging-with-flipper/ . After doing the steps mentioned the flipper app isnt able to connect to realm
Stacktrace & log output
I am getting a lot of crashes in the native code but I dont know what are the relevant logs
Can you reproduce the bug?
Always
Reproduction Steps
Create a react native app integrate realm and then try to integrate flipper in the same . I have followed the steps mentioned in the guide but I am not able to debug the same .
"realm": "11.0.0",
"realm-flipper-plugin-device": "^1.1.0"
"react": "18.1.0",
"react-native": "0.70.0",
"react-native-flipper": "^0.180.0",
Version
11.0.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
apple macbook pro M1
Build environment
Which debugger for React Native: ..
Cocoapods version
NA
The text was updated successfully, but these errors were encountered: