dirac 2017-08-18

@mitchelkuijpers has left the channel

@darwin Huh, I didn't know this was here. 🙂

again, what is your chrome version?

this still looks like a protocol mismatch

those internal errors should mention your versions

Oh, I guess it might still not be the proper version. I figured since I was actually seeing the console it was the right version. Version 61.0.3163.25 (Official Build) dev (64-bit)

this is still too old

Yeah, alright. Sorry to bother you. I'll go get a newer one. 🙂

you can also downgrade dirac itself

Oh, can I? I'd need to do the browser plugin and the library being used?

it is more complicated, but covered in one of the FAQ answers

but better try to stick with latest

Yeah, I'll see if I can just upgrade the package without issues.

@darwin Alright, I have a proper version, and everything seems to be working, except the clojurescript REPL times out with:

17-08-18 20:11:30 hyperion DEBUG [dirac.lib.nrepl-tunnel-server:288] - [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received :ready from client [WebSocketServerClient#4]
17-08-18 20:11:30 hyperion DEBUG [dirac.lib.nrepl-tunnel-server:288] - [NREPLTunnelServer#1 of [NREPLTunnel#1]] process :nrepl-message from [WebSocketServerClient#4] {:op :nrepl-message,
 :envelope
 {:op "eval",
  :code
  "(do (require (quote dirac.nrepl)) (dirac.nrepl/boot-dirac-repl! (quote {:runtime-tag \"sheet |  | Chrome/62.0.3178.0 | Linux/?\"})))",
  :id "024d8c4d-ffd0-4d0a-b02c-555e045e4c7d"}}



17-08-18 20:09:27 hyperion ERROR [dirac.lib.nrepl-tunnel-server:288] - [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap timeout from client [WebSocketServerClient#3] :
 {:op :bootstrap-timeout}

any idea what hyperion is?

do you see any errors in dirac’s Chrome DevTools console?

I mean internal devtools on Dirac’s window

Not sure what the "enable the :repl feature" is referring to.

"Dirac requires runtime support from page context."

This is the error I'm seeing in dirac itself: "Unable to bootstrap ClojureScript REPL due to a timeout. Usually this happens when server-side process raised an exception or crashed. Please check error output in Dirac Agent."

there must be dirac.runtime installed in your page for this to properly work

that error message should be visible even in normal (DiraC) DevTools console

I'm using powerlaces.boot-cljs-devtools to load in dirac. I thought it did this.

What should be visible in dirac?

some descriptive error that the dirac runtime is not present and how to install it

This is the first two lines of the dirac console:

Installing Dirac Runtime 1.2.15 and enabling features :repl
Installing CLJS DevTools 0.9.4 and enabling features :formatters :hints :async

now it is getting interesting

But still: "dirac.runtime.installed_QMARK_ is not a function"

what do you see when you exec dirac.runtime in DevTools console on your pade?

dirac is defined though

there should be some namespaces

{_DEBUG_EVAL: false, _DEBUG_COMPLETIONS: false, _DEBUG_KEYSIM: false, _DEBUG_FEEDBACK: false, _DEBUG_WATCHING: false, …}
addConsoleMessageToMainTarget
:
ƒ addConsoleMessageToMainTarget(type,level,text,parameters)
adoptPrompt
:
ƒ ($text_area_element$$,$use_parinfer_QMARK_$$)
codeAsString
:
ƒ codeAsString(code)
deduplicate
:
ƒ deduplicate(coll,keyFn=item=>""+item)
evalInCurrentContext
:
ƒ evalInCurrentContext(code,callback)
evalInDefaultContext
:
ƒ evalInDefaultContext(code,callback)
extractMacroNamespaceSymbolsAsync
:
ƒ extractMacroNamespaceSymbolsAsync(namespaceName)
extractNamespaceSymbolsAsync
:
ƒ extractNamespaceSymbolsAsync(namespaceName)
extractNamespacesAsync
:
ƒ extractNamespacesAsync()
extractScopeInfoFromScopeChainAsync
:
ƒ extractScopeInfoFromScopeChainAsync(callFrame)
feedback
:
ƒ $dirac$implant$post_feedback_BANG_$$($var_args$jscomp$593$$)
getFullFunctionName
:
ƒ ($munged_name$jscomp$16$$)
getFunctionName
:
ƒ ($munged_name$jscomp$15$$)
getMacroNamespaceNames
:
ƒ getMacroNamespaceNames(namespaces)
getNamespace
:
ƒ getNamespace(namespaceName)
getReplSpecialsAsync
:
ƒ ()
getRuntimeTag
:
ƒ ($callback$jscomp$81$$)
getVersion
:
ƒ ()
hasBeautifyFunctionNames
:
true
hasCleanUrls
:
true
hasClusteredLocals
:
true
hasCurrentContext
:
ƒ hasCurrentContext()
hasDefaultContext
:
ƒ hasDefaultContext()
hasFeature
:
ƒ hasFeature(feature)
hasFriendlyLocals
:
true
hasInlineCFs
:
true
hasLinkActions
:
true
hasParinfer
:
true
hasREPL
:
true
hasWelcomeMessage
:
true
initConsole
:
ƒ ()
initRepl
:
ƒ ()
invalidateNamespaceSymbolsCache
:
ƒ invalidateNamespaceSymbolsCache(namespaceName=null)
invalidateNamespacesCache
:
ƒ invalidateNamespacesCache()
isIntercomReady
:
ƒ ()
lookupCurrentContext
:
ƒ lookupCurrentContext()
notifyFrontendInitialized
:
ƒ ()
notifyPanelSwitch
:
ƒ ($panel_id$$)
nsToRelpath
:
ƒ ($ns$jscomp$60$$,$ext$jscomp$2$$)
parseNsFromSource
:
ƒ ($source$jscomp$20$$)
registerDiracLinkAction
:
ƒ registerDiracLinkAction(action)
reportNamespacesCacheMutation
:
ƒ ()
sendEvalRequest
:
ƒ ($JSCompiler_inline_result$jscomp$271_JSCompiler_inline_result$jscomp$3015_coll$jscomp$inline_3621_request_id$$,$code$jscomp$39$$,$scope_info$jscomp$1$$)
stableSort
:
ƒ stableSort(array,comparator)
startListeningForWorkspaceChanges
:
ƒ startListeningForWorkspaceChanges()
stopListeningForWorkspaceChanges
:
ƒ stopListeningForWorkspaceChanges()
stringEscape
:
ƒ stringEscape(string)
subscribeDebuggerEvents
:
ƒ subscribeDebuggerEvents(callback)
triggerInternalError
:
ƒ ()
triggerInternalErrorAsErrorLog
:
ƒ ()
triggerInternalErrorInPromise
:
ƒ ()
unsubscribeDebuggerEvents
:
ƒ unsubscribeDebuggerEvents()
_DEBUG_BACKEND_API
:
false
_DEBUG_BACKEND_CSS
:
false
_DEBUG_CACHES
:
false
_DEBUG_COMPLETIONS
:
false
_DEBUG_EVAL
:
false
_DEBUG_FEEDBACK
:
false
_DEBUG_KEYSIM
:
false
_DEBUG_WATCHING
:
false
_lazyLoaded
:
true
_namespacesCache
:
{goog.string: {…}, goog.string.Unicode: {…}, goog.object: {…}, goog.math.Integer: {…}, goog.string.StringBuffer: {…}, …}
_namespacesSymbolsCache
:
Map(0) {}
__proto__
:
Object

yeah, we are talking about your page’s context

not dirac’s window

please exec it in your page’s DevTools

Right... dirac.runtime is defined

so dirac.runtime.installed_QMARK_ is definitely there

for some reason dirac thinks it is not there in your page

or it is talking to a different page context

do you have any iframes or similar stuff going on there?

Nah, it's just an empty page.

did you open Dirac DevTools by clicking on the Dirac extension button while being on your page?

Then I closed it to open devtools for that error. Now I've opened dirac again, and that error isn't in its devtools.

Still can't bootstrap clojurescript REPL though.

If I reload with dirac open, it throws the same warning.

that’s just console history cached

close Dirac window, refresh your page

then open it again via the extension button

No warning, but can't bootstrap REPL.

try to type dirac.runtime into Dirac’s Console

just to make sure we talk to your page

Dirac's devtools console?

It's stuck with the unable to bootstrap repl message.

switch to javascript console, I think with CTRL+UP

Thanks Yeah, it's defined.

what is your Chrome version now?

Version 62.0.3178.0 (Official Build) dev (64-bit)

again, this might be old version, unfortunately DevTools devs were messing with evaluation API just few days ago

if this is the problem, there should be some error or something, not a silent failure

anyways, it seems like Dirac is unable to evaluate javascript code in the context of debugged page

you must use 62.0.3187.1. or higher

Haha, probably. Should I try to get a later version?

unfortunately the stuff is in flux right now, but it worked for me when tested on my Mac

I couldn't seem to find that version in the location the nixos package is pointing.

why don’t you install Chrome Canary? it is not available on your linux distro?

Yeah, unfortunately nixos can be a bit of a pain with specific package versions.

in this case you should simply download the chromium snapshot I link in the release section, see “Rolling DevTools”

and “Links to matching Chromium snapshots”

that combination should be at least somewhat tested

Yeah, I was hoping I could get that exact version. It wasn't available in the same location my build package is looking.

Anyways, thanks for your time.

ok, no problem, let me know after you test it against 62.0.3187.1

I can imagine why it is silently failing, the api change is only in signature, I newly pass js object as first argument, but your “old” chrome treats it as a string and simply fails to execute it

something like that

Yeah, javascript likes to fail silently like that. 😕

it is not that the function was renamed or something