re-frisk-rn icon indicating copy to clipboard operation
re-frisk-rn copied to clipboard

re-frisk-rn display page without content

Open markokocic opened this issue 5 years ago • 6 comments

I followed instructions to set up re-frisk-rn but in both cases I get only to the opening web page that doesn't provide any information about app-db, events or anything.

I'm using the latest react-native and shadow-cljs and android emulator.

Do you maybe have some minimal complete working example?

markokocic avatar Apr 23 '20 13:04 markokocic

make sure your app can connect to localhost:4567

flexsurfer avatar Apr 23 '20 13:04 flexsurfer

and also that you have preloads for re-frisk

flexsurfer avatar Apr 23 '20 13:04 flexsurfer

Proload is defined, when I access http://localhost:4567 I reach the page, but see only page skeleton, without any event, db or subscription data.

I don't see any exceptions in the application logs.

markokocic avatar Apr 23 '20 15:04 markokocic

please try to open http://localhost:4567 in your mobile device browser just to make sure device has access to it

flexsurfer avatar Apr 23 '20 15:04 flexsurfer

good catch. Yes, I can access http://localhost:4567 on my laptop, but not from the device browser. For some reason device/emulator decides to use 192.168.0.111 as my host ip.

After executing adp revers tcp;4567 tcp:4567 re-frisk started working, and I'm able to see events, subscriptions ... on my desktop browser.

However, the question is why I need to do port forwarding?

Application running on device somehow recognizes that it needs to connect to http://192.168.0.111:8081 to fetch compiled javascript code and shadow-cljs hot reloading also works without any port forwarding.

Now I have a workaround, but maybe one enhancement would be that re-frisk-rn uses the same IP as metro loader by default, so that port forwarding would not be required.

markokocic avatar Apr 23 '20 16:04 markokocic

thanks for your feedback, I'll take a look

flexsurfer avatar Apr 23 '20 16:04 flexsurfer