Fork me on GitHub
#cljsrn
<
2017-08-04
>
wojciech05:08:32

@mfikes I don't think this works out of the box

pesterhazy08:08:31

well changing it in the Chrome Devtools may not, but isn't it better to change the code anyway?

pesterhazy10:08:21

I'm trying Sentry right now - it seems like a bit of a pain to set up @austinbirch

austinbirch10:08:27

You’re talking about Sentry’s new method for RN integration, right?

pesterhazy10:08:11

well I tried raven-js first, because that seemed simpler

pesterhazy10:08:19

but that doesn't seem to work on RN/iOS anymore?

pesterhazy10:08:43

now I'm using the new rn integration, but messages seem to go through only sporadically

austinbirch10:08:17

Hmm, that’s not great. I’m using raven-js at the moment (and their iOS-native client too, to catch native exceptions).

austinbirch10:08:25

I don’t think I’ve done anything too weird to keep it working.

austinbirch10:08:33

I’ll have a quick look to confirm that.

pesterhazy10:08:03

do you get this as well? Unable to symbolicate stack trace: The stack is null

austinbirch10:08:48

No, I don’t think I’m seeing that. Pretty unhelpful!

austinbirch10:08:07

I’ve just checked, and I don’t have anything too weird going on (except for the whole source mapping thing we were talking about the other day). Roughly speaking, all I have is this (cleaned up to remove some app-specific stuff that shouldn’t make a difference):

(def Raven (js/require "raven-js"))
(def RavenRNPlugin (js/require "raven-js/plugins/react-native"))

;; kind of weird Raven plugin setup
(RavenRNPlugin Raven)

(.install (.config Raven sentry-public-dsn #js {:release release-version}))

austinbirch10:08:37

I’m probably on quite an old version as well (not upgraded in ages), which might explain.

austinbirch10:08:56

"raven-js": "^3.16.0"

austinbirch10:08:52

I might not be helping you at all here, sorry!

pesterhazy10:08:24

Raven plugin setup - interesting!

austinbirch10:08:55

> Unable to symbolicate stack trace: The stack is null I’ve just managed to get this.

austinbirch10:08:31

I don’t install the raven setup when I’m developing, I only enable it for release builds.

pesterhazy10:08:46

ah maybe it only fails in figwheel

austinbirch10:08:03

Perhaps there’s something with the RN dev error handling that doesn’t work well with it?

austinbirch10:08:23

I should say that it still reported the issue to Sentry though.

pesterhazy10:08:39

yeah it does, it's just a warning

pesterhazy10:08:56

the full blown RN integration seems pretty complicated, with symbol files etc

pesterhazy10:08:15

I'm worried it'll break something in the long run

pesterhazy10:08:28

I'm mostly interested in JS stacktraces

austinbirch10:08:49

Yeah, that’s pretty reasonable.

austinbirch10:08:05

I can’t imagine I’ll be upgrading to the newer integration unless I absolutely have to.

pesterhazy10:08:23

yeah don't touch it unless it breaks

austinbirch10:08:06

As I mentioned the other day for release builds I’m using :advanced optimisations, which means I need those hacks around metro-bundler/RN-packager to build working source maps. Once I’ve got that source map though I just upload it to Sentry to the correct release (automated in fastlane), and then it works. The only one remaining thing is that my source maps don’t include the original JS source for some of the RN/node_modules stuff. That’s less important to me, but I imagine fixable. I’d be interested to hear how you get on with the rest of this.

pesterhazy10:08:35

at this point I'd be happy just get any kind of stack traces

pesterhazy10:08:52

release builds just crash on JS errors

austinbirch10:08:57

Yeah, not fun.

pesterhazy10:08:12

and afaik no easy way to get at the device logs for release builds

austinbirch10:08:28

Oh, I also use this by the way:

austinbirch10:08:05

Kind of like centralised logging for native apps.

austinbirch10:08:34

Much better than no visibility, but it is just string logs (not structured or anything).

pesterhazy10:08:43

that's all I need

pesterhazy10:08:46

is it easy to set up??

pesterhazy10:08:51

I might go with that one instead

pesterhazy10:08:07

I don't care about structured logs for now

austinbirch10:08:39

Cool. I find it covers everything I need logging-wise.

pesterhazy10:08:51

oh no... Cocoapods

austinbirch10:08:56

> is it easy to set up?? I should have said: as easy as any RN native module is to setup. Every time I add a native module somehow header paths go crazy and I spend ages in Xcode.

pesterhazy10:08:45

do Bugfender publish a react-native module?

austinbirch10:08:52

I’m not sure.

pesterhazy10:08:53

react-native link works best in my experience

austinbirch10:08:10

Yeah, I agree.

pesterhazy10:08:25

ok I'm trying this out right now

austinbirch10:08:34

I think I was already using some other stuff via cocoapods at the time I included Bugfender.

austinbirch11:08:03

Well, I’ve got a bunch of stuff included via Cocoapods, and a bunch of stuff included via react-native link/npm.

pesterhazy11:08:17

I'm mortally afraid of Ruby dependencies

pesterhazy11:08:23

burnt too many times

austinbirch11:08:44

Yeah, not fun.

pesterhazy11:08:57

I make an exception for fastlane, which is :heavy_heart_exclamation_mark_ornament:

austinbirch11:08:25

I think I’d have given up without fastlane.

austinbirch11:08:57

I try to spend as little time as possible dealing with Xcode (well, for anything but writing native-side code for the app).

pesterhazy11:08:35

you and me both

mengu17:08:56

has anyone upgraded to react native 0.47?

joshmiller17:08:57

Has anyone successfully used react-native-tableview with cljs? Got it installed an up and working, but can’t get reorder controls to show on my table cells.

joshmiller17:08:42

Yak-shaved my way into trying to run their example project in JS, but XCode is barfing trying to build it at all, so not sure if I’m in a dead end.

mengu17:08:37

@joshmiller what's the problem you get?

joshmiller17:08:10

@mengu I can render a tableview just fine — I can give it rows, fill it with data, and swipe left to show the Delete action and everything — but I cannot reorder rows at all. I’ve got canMove set to true, and if I js/alert a row, it says that’s the case, but it never shows the reorder handle on the right side of the row.

mengu17:08:48

did you do a react-native link? maybe it has some icons and stuff that you need to add to your project

joshmiller17:08:16

Hm, possible. Let me give that a shot.

joshmiller17:08:00

That did have stuff to link apparently, but still not seeing the reorder handle; let me check and make sure I have everything still set correctly from screwing around with it.

mengu18:08:41

does anybody know where does this fighwheel-bridge.js coming from?

mengu18:08:42

which template?

mengu19:08:52

thanks @joshmiller

mengu19:08:18

it looks like they also replaced React.createClass with createReactClass

mengu19:08:56

here is how i upgraded an existing project: https://github.com/drapanjanas/re-natal/issues/129 -- for future reference

pesterhazy20:08:03

@austinbirch thanks for the recommendation... bugfender works great

chalcidfly22:08:22

What’s the reason I can’t do (.setItem js/AsyncStorage app-key (str db))?

chalcidfly22:08:35

says AsyncStorage is not an object

chalcidfly22:08:01

I guess AsyncStorage just isn’t in the js namespace.

chalcidfly22:08:23

I copied code from glittershark and got getItem returning a promise… but how do I await promises in cljs?

wilkerlucio23:08:05

@chalcidfly the simplest way is just thread as a promise, call (.then promise (fn [v] ...))

chalcidfly23:08:20

What is the result? a string or some kind of object?

chalcidfly23:08:53

https://pastebin.com/K1PJi9qX is giving me some weird results

mengu23:08:32

@chalcidfly what i do is using -> macro

mengu23:08:16

@joshmiller fixed that handle problem?