Fork me on GitHub

@bhauman is there a config option that I can set for:

optionsUrl: ""


I need this to be “” (my local ip) instead of “localhost”


The optionsUrl is in the generated index.js ; I use the local IP so I can test/refresh on a real device rather than the simulator

Oliver George11:07:15

Anyone having a good time with Krell running on a real android device? I'm seeing odd issues which I think might be race condition related.

Oliver George11:07:27

e.g. namespaces loading out of order

Oliver George11:07:50

It's proving hard to pin down

Oliver George11:07:12

Tends to express itself in errors like these: • "TypeError: goog.debug.freeze is not a function" (common on one big project) • "goog.require could not find: awesome_project.core" • "ReferenceError: re_frame is not defined"

Oliver George12:07:28

Tentitive theory that perhaps waitForCore needs to wait on more files to avoid a race condition

function waitForCore(cb) {
    // we only care if goog/base.js is actually in the cache, that's enough
    // to bootstrap regardless whether some things must be refetched
       && KRELL_CACHE.has(toPath("goog/base.js"))
       && KRELL_CACHE.has(toPath("goog/deps.js"))         // <-- HERE
       && KRELL_CACHE.has(toPath("cljs_deps.js"))         // <-- HERE
       && KRELL_CACHE.has(toPath("krell_repl_deps.js"))) {// <-- HERE
    } else if(typeof cljs !== 'undefined') {
        console.log("typeof cljs !== 'undefined'")
    } else {
        setTimeout(function() { waitForCore(cb); }, 250);

Oliver George12:07:58

@dnolen I think you had a productive android device setup - is that right? we're having trouble.


yes that sounds like load order issues - this would only occur during dev

Oliver George12:07:46

That's where we're seeing it


but I never saw that after the fixes for android


if you look closely at the code for Android in the REPL JS you'll see that there's a few things in place to ensure order


it's possible I missed something but it hasn't come up in the emulator or on the device (personally) in some time


one thing you could try is that you could bump the tcp-socket dep, I think there were several issues w/ how it worked and some have been addressed


I'm back on work that directly needs Krell so I should be more active again on in it the coming weeks

Oliver George12:07:43

Okay, thanks. I'll give that a try and see what else I can pin down.


note the issue really is the tcp-socket library


if you don't manually enforce the order then you will eval something out of order


and get the errors above


(the Java part of it, I never had issues w/ the iOS side)

Oliver George12:07:11

Certainly would describe what I'm seeing.

Oliver George12:07:37

Bumping to the latest react-native-tcp-socket doesn't seem to have helped.

Oliver George12:07:23

I have a feeling the clue is this error which appears in adb logcat > 07-15 19:29:32.163 21032 21195 I ReactNativeJS: 'Bootstrap from cache failed:', { [TypeError: undefined is not an object (evaluating 'KRELL_CACHE.get(toPath("goog/deps.js")).source')]

Oliver George12:07:47

Anyway, I'm out of ideas for today. Thanks for the suggestions.


@olivergeorge ah yeah I was going to say that's the other possibility your cache was corrupted - i.e. the issue is not related to react-native-tcp-socket at all


again I didn't observe this with the tutorials nor in our app - but I'll double check - if you can repro in a simpler situation that would be helpful