Cannot get visualixir to work

I am trying to look into my Phoenix app’s processes using visualixir.

I started visualixir using the directions in https://github.com/koudelka/visualixir and I started my other app using the following command line:

iex --sname messenger -S mix phoenix.server # localhost:5000

but I am unable to see any visualizations from localhost:4000 (visualixir).

Has anyone been able to get visualixir working? I am on macOS. Any help is appreciated (I’ve been stuck at this for a while now)

Does the example application integrated in the visualixir sources work?

Have you tried using longnames instead of shortnames? There seem to be problems with short names under certain conditions: https://github.com/elixir-lang/elixir/issues/5264

How do I use the example application? (I apologize if this is a newbie question)

When I load “localhost:4000” all I can see is this:

It appears a few others are able to get it working, but I’d like to understand what I’m doing wrong.

(I did try --name in place of --sname (Thanks for the suggestion!) but that did not make a difference)

I see the following error when I try to start visualixir:

% elixir --name visualixir --hidden -S mix phoenix.server

[warn] using the :root endpoint configuration for watchers is deprecated.
Pass the :cd option at the end of your watcher argument list in config/dev.exs. For example:

    watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin",
               cd: Path.expand("../", __DIR__)]]

[info] Running Visualixir.Endpoint with Cowboy using http://localhost:4000
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x1f645cfcfb51 <JS Object>#0#
    1: .node [module.js:583] [pc=0xd7e023ae664] (this=0x2c8c45dcd279 <an Object with map 0x28a690b1ad01>#1#,module=0xed8a1adf771 <a Module with map 0x28a690b1bc21>#2#,filename=0xed8a1add079 <String[81]: /Users/debajita/Developer/visualixir/node_modules/fsevents/build/Release/fse.node>)
    2: load [module.js:473] [pc=0xd7e0233d5d2] (this=0xed8a1adf771 <a Module with map 0x28a690b1bc21>#2#,filename
==== JS stack trace =========================================

Security context: 0x1f645cfcfb51 <JS Object>#0#
    1: .node [module.js:583] [pc=0xd7e023ae664] (this=0x2c8c45dcd279 <an Object with map 0x28a690b1ad01>#1#,module=0xed8a1adf771 <a Module with map 0x28a690b1bc21>#2#,filename=0xed8a1add079 <String[81]: /Users/debajita/Developer/visualixir/node_modules/fsevents/build/Release/fse.node>)
    2: load [module.js:473] [pc=0xd7e0233d5d2] (this=0xed8a1adf771 <a Module with map 0x28a690b1bc21>#2#,filename/Users/debajita/Developer/visualixir/node_modules/brunch/lib/fs_utils/file_list.js:77
        return path.match(test);
                    ^

TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'
  at RegExp.exec (native)
  at RegExp.[Symbol.match] (native)
  at String.match (native)
  at FileList.module.exports.FileList.isIgnored (/Users/debajita/Developer/visualixir/node_modules/brunch/lib/fs_utils/file_list.js:77:21)
  at /Users/debajita/Developer/visualixir/node_modules/

I fixed the ‘cd’ issue reported, but I still see the following error when starting up visualixir (I’m not sure if this is the cause of visualixir not showing up any visualization)

% elixir --name visualixir --hidden -S mix phoenix.server
[info] Running Visualixir.Endpoint with Cowboy using http://localhost:4000
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x146707acfb51 <JS Object>#0#
    1: .node [module.js:583] [pc=0x21313ceac884] (this=0x222257612051 <an Object with map 0x2d2808e1ad01>#1#,module=0xdf1812e7a19 <a Module with map 0x2d2808e1bc21>#2#,filename=0xdf1812e5321 <String[81]: /Users/debajita/Developer/visualixir/node_modules/fsevents/build/Release/fse.node>)
    2: load [module.js:473] [pc=0x21313ce3d5d2] (this=0xdf1812e7a19 <a Module with map 0x2d2808e1bc21>#2#,filena
==== JS stack trace =========================================

Security context: 0x146707acfb51 <JS Object>#0#
    1: .node [module.js:583] [pc=0x21313ceac884] (this=0x222257612051 <an Object with map 0x2d2808e1ad01>#1#,module=0xdf1812e7a19 <a Module with map 0x2d2808e1bc21>#2#,filename=0xdf1812e5321 <String[81]: /Users/debajita/Developer/visualixir/node_modules/fsevents/build/Release/fse.node>)
    2: load [module.js:473] [pc=0x21313ce3d5d2] (this=0xdf1812e7a19 <a Module with map 0x2d2808e1bc21>#2#,filena/Users/debajita/Developer/visualixir/node_modules/brunch/lib/fs_utils/file_list.js:77
        return path.match(test);
                    ^

TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'
  at RegExp.exec (native)
  at RegExp.[Symbol.match] (native)
  at String.match (native)
  at FileList.module.exports.FileList.isIgnored (/Users/debajita/Developer/visualixir/node_modules/brunch/lib/fs_utils/file_list.js:77:21)
  at /Users/debajita/Developer/visualixir/node_modules/

The remaining error-messages are some JavaScript-Stuff. I can’t help you with that. Also I doubt that the example application will work, since your screenshot shows that there is no JavaScript or CSS loaded.

I am not experienced with visualixir either, but I will try to reproduce the behaviour during lunch time. (in about 4 hours).

Until then, it would be nice if you could tell us a little about your environment. node-js, elixir and erlang versions should be sufficient for now.

I finally got it working after downgrading from Node 6 (6.5.0) to Node 5 (5.12.0) — visualixir loads now :slight_smile:

Here are my environment details:

  • OS: macOS 10.12 Sierra
  • Elixir 1.3.2
  • Erlang 19
  • Node 6.5.0 (this did not work for me — switching to a lower version of Node (5.12.0) fixed the issue and visualixir is able to load now, even with --sname)

Thanks for all the help.

That is odd, I’ve used visualixir with Node v6.7.0 without issue… Hmm, maybe try that newer version?