th3rdwave / flipper-plugin-relay-devtools

Flipper plugin for Relay devtools
MIT License
30 stars 3 forks source link

hook.sub is undefined in relay-devtools-core #4

Closed ghost closed 3 years ago

ghost commented 3 years ago

Dear @janicduplessis,

thanks for providing this package and https://github.com/janicduplessis/relay-devtools. As the latter is forked I can't create an issue there so I did it here.

Sadly for some reason I'm getting the error [TypeError: hook.sub is not a function. (In 'hook.sub('environment.event', function (data) { agent.onEnvironmentEvent(data); })', 'hook.sub' is undefined)]. I've inspected window.__RELAY_DEVTOOLS_HOOK__ and seen that on, sub and emit are completely missing.

I'd highly appreciate it if you could either provide me with the untranspiled source of relay-devtools-core for me to debug or provide me with some form of other assistance.

Thanks in advance!

Best regards Marces Engel

janicduplessis commented 3 years ago

I can try to update the fork to the latest version and see if it fixes that.

janicduplessis commented 3 years ago

I tested and everything now works with relay@11. Make sure to check the release notes here https://github.com/th3rdwave/flipper-plugin-relay-devtools/releases/tag/v1.0.0 on how to update. Also verify that the plugin is version 1.0.2 in Flipper.

ghost commented 3 years ago

Thank you very much 🎉 I'll test it later today and give you a heads up, thanks again :)

ghost commented 3 years ago

Hey @janicduplessis, sorry for the late response. I'm still having issues using the plugin as it complains "The DevTools didn't connect yet. Please verify your React Native app is in development mode, and that no other instance of the React DevTools are attached to the app already." However it seems impossible for me to prevent this from happening because Flipper itself also launches an instance of the React DevTools - how do you circumvent this?

Thanks in advance for your assistance.