Fork me on GitHub
#cljsrn
<
2016-12-28
>
tiensonqin03:12:27

Hi, I've successfully connected to a boot cljs repl on Android, but each time reloading show me this error: console.error: "Websocket REPL error:occupied". Boot newbie.

dvcrn08:12:17

how do you guys usually persist data? I was thinking of using realm-react-native and add some events that automatically write db-atom content into realm / loading it on app start

dvcrn08:12:45

wondering how fast it would be to directly read out of realm and skip the atom for actual data. Use the db atom as temporary state only

dvcrn08:12:43

well, let's try! ¯\(ツ)

pesterhazy09:12:40

@tiensonqin I remember some websockets issues android a while back

pesterhazy09:12:24

@tiensonqin have you forwarded the port using adb reverse ?

tiensonqin09:12:00

Yeah, I've tried as below: adb reverse tcp:8081 tcp:8081 adb reverse tcp:8079 tcp:8079 adb reverse tcp:9001 tcp:9001

tiensonqin09:12:36

@vikeri Yeah, same error. Haven't checked the issues, 🙂

vikeri09:12:12

@tiensonqin I think there might be a problem with Android in React Native, since it works well on iOS. But it could also be a problem with boot-reload. Interestingly enough there seems to be a port of figwheel to boot-reload, so maybe this issue will be solved.

vikeri09:12:48

I dug around in Android websocket land but I’m not the websocket master so no luck so far...

vikeri09:12:20

@dvcrn We serialize using transit (even though it’s not recommended) #badboy and then put it in asyncStorage. Would be really nice if you could use Realm directly though!

pesterhazy09:12:36

@tiensonqin would love to resolve this

pesterhazy09:12:45

if you can find the root cause I can help debug

tiensonqin09:12:09

@pesterhazy @vikeri Thanks, I'll investigate to this problem later.

tiensonqin09:12:55

I'm working to add boot support to Exponent, I'm already fall in love with boot.

vikeri09:12:57

@pesterhazy @tiensonqin I think the issue is a websocket not being closed when you reload the javascript without reloading the native app. But I’m definitely not sure...

vikeri09:12:17

@tiensonqin Sweet!

pesterhazy09:12:19

could be an issue in boot-reload then

pesterhazy09:12:35

it shouldn't try to re-open the websocket when reloading, for sure

dvcrn09:12:46

@vikeri what speaks against using realm directly?

pesterhazy09:12:00

@tiensonqin exponent support would be amazing!

tiensonqin09:12:03

Currently reloading sometimes works, sometimes not works. So maybe it's my fault.

vikeri09:12:33

@dvcrn Time to try to get it working when asyncStorage works alright for now 😛

vikeri09:12:08

@tiensonqin Have the exact same issue, so I doubt it’s your setup. I think I reproduced it in the example repo as well.

tiensonqin09:12:11

@pesterhazy Nice to hear, @jorda0mega already created a working example: https://github.com/jorda0mega/boot-react-native-exponent-template

tiensonqin09:12:40

@vikeri I'll check your example too. Have to go now, will report later.