c4milo / node-webkit-agent

NodeJS agent for WebKit devtools front-end
http://c4milo.github.io/node-webkit-agent/
1.1k stars 128 forks source link

undefined symbol: _ZNK2v813HeapGraphNode15GetRetainedSizeEv in node 0.8.10 #17

Closed jfromaniello closed 11 years ago

jfromaniello commented 11 years ago

I am having an issue with node 0.8.10:

module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: /home/jose/projects/xxx/node_modules/webkit-devtools-agent/node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZNK2v813HeapGraphNode15GetRetainedSizeEv
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/jose/xxx/node_modules/webkit-devtools-agent/node_modules/v8-profiler/v8-profiler.js:1:77)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
jfromaniello commented 11 years ago

I dont know why, but I went to node_modules/webkit-devtools-agent/node_modules/v8-profiler/ and run make

and it started to work.. But i have to do this everytime i install it

c4milo commented 11 years ago

Hm, I'll take a look as soon as I can. Thanks for the report!

Sent from my iPhone

On Nov 30, 2012, at 9:49 AM, José F. Romaniello notifications@github.com wrote:

I dont know why, but I went to node_modules/webkit-devtools-agent/node_modules/v8-profiler/ and run make

and it started to work.. But i have to do this everytime i install it

— Reply to this email directly or view it on GitHub.

c4milo commented 11 years ago

I just tested this and it compiled just fine. Did you compile the module having nodejs 6.x and then you upgraded it to a later version? Please see: https://github.com/c4milo/node-webkit-agent#heads-up

c4milo commented 11 years ago

Also https://github.com/c4milo/node-webkit-agent/issues/11

jfromaniello commented 11 years ago

I only have 0.8.10, I did npm install webkit-devtools-agent in an empty folder.

I wrote a very basic script, and it failed with this undefined error.

I went to node_modules/webkit-devtools-agent directory and ran make. It compiled okay, and then my script worked fine.

c4milo commented 11 years ago

this is what I just did and it worked fine:

$ cd /tmp
$ npm install webkit-devtools-agent
$ node node_modules/webkit-devtools-agent/webkit-devtools-agent.js 
webkit-devtools-agent started on 127.0.0.1:1337

Debugger.causesRecompilation is not implemented
Debugger.supportsNativeBreakpoints is not implemented
Timeline.supportsFrameInstrumentation is not implemented
CSS.getSupportedCSSProperties is not implemented
Network.enable is not implemented
Page.enable is not implemented
Network.enable is not implemented
Page.getResourceTree is not implemented
CSS.enable is not implemented
Network.canClearBrowserCache is not implemented
Network.canClearBrowserCookies is not implemented
Timeline.setIncludeMemoryDetails is not implemented
Console.enable is not implemented
Inspector.enable is not implemented
Database.enable is not implemented
DOMStorage.enable is not implemented
DOM.setTouchEmulationEnabled is not implemented

Then I went to http://c4milo.github.com/node-webkit-agent/21.0.1180.57/inspector.html?host=localhost:1337&page=0 I took a snapshot and it worked.

c4milo commented 11 years ago

I used node 0.8.17

c4milo commented 11 years ago

I'm going to close this issue, I wasn't able to reproduce and I haven't seem activity from @jfromaniello in a month.

jfromaniello commented 11 years ago

sorry @c4milo I haven't time to test it again, I will do asap and provide you feedback here

c4milo commented 11 years ago

Oh cool, I'll reopen then.

jfromaniello commented 11 years ago

sorry @c4milo for the throuble and the delay. I don't know what happen before, but i think is working now

c4milo commented 11 years ago

it's ok @jfromaniello. Thanks a lot for answering back.

danmilon commented 11 years ago

Bumped into this also.

$ node -p -e 'process.versions'
{ http_parser: '1.0',
  node: '0.8.19',
  v8: '3.11.10.25',
  ares: '1.7.5-DEV',
  uv: '0.8',
  zlib: '1.2.3',
  openssl: '1.0.1c' }

$ npm install webkit-devtools-agent
info trying registry request attempt 1 at 17:08:58
http GET https://registry.npmjs.org/webkit-devtools-agent
http 304 https://registry.npmjs.org/webkit-devtools-agent
info trying registry request attempt 1 at 17:09:00
http GET https://registry.npmjs.org/ws/0.4.13
http 304 https://registry.npmjs.org/ws/0.4.13

> v8-profiler@3.6.2beta install /home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler
> node-gyp rebuild

> ws@0.4.13 preinstall /home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/ws
> make

node-waf configure build
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : ok /home/razor/.node_libraries 
Checking for node prefix                 : ok /usr 
'configure' finished successfully (0.048s)
Waf: Entering directory `/home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/ws/build'
[1/4] cxx: src/validation.cc -> build/Release/src/validation_1.o
[2/4] cxx: src/bufferutil.cc -> build/Release/src/bufferutil_2.o
make: Entering directory `/home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler/build'
  CXX(target) Release/obj.target/profiler/cpu_profiler.o
[3/4] cxx_link: build/Release/src/validation_1.o -> build/Release/validation.node
[4/4] cxx_link: build/Release/src/bufferutil_2.o -> build/Release/bufferutil.node
  CXX(target) Release/obj.target/profiler/graph_edge.o
Waf: Leaving directory `/home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/ws/build'
'build' finished successfully (0.337s)
info trying registry request attempt 1 at 17:09:04
http GET https://registry.npmjs.org/commander
info trying registry request attempt 1 at 17:09:04
http GET https://registry.npmjs.org/options
  CXX(target) Release/obj.target/profiler/graph_node.o
  CXX(target) Release/obj.target/profiler/heap_profiler.o
  CXX(target) Release/obj.target/profiler/profile.o
  CXX(target) Release/obj.target/profiler/profile_node.o
  CXX(target) Release/obj.target/profiler/profiler.o
  CXX(target) Release/obj.target/profiler/snapshot.o
  SOLINK_MODULE(target) Release/obj.target/profiler.node
  SOLINK_MODULE(target) Release/obj.target/profiler.node: Finished
  COPY Release/profiler.node
make: Leaving directory `/home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler/build'

> v8-profiler@3.6.2beta postinstall /home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler
> ln -sf build/Release/profiler.node profiler.node

http 304 https://registry.npmjs.org/commander
http 304 https://registry.npmjs.org/options
webkit-devtools-agent@0.0.4 node_modules/webkit-devtools-agent
├── v8-profiler@3.6.2beta
└── ws@0.4.13 (options@0.0.3, commander@0.5.2)

$ node -p -e "require('webkit-devtools-agent')"

module.js:485
  process.dlopen(filename, module.exports);
          ^
Error: /home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler/build/Release/profiler.node: undefined symbol: _ZNK2v813HeapGraphNode15GetRetainedSizeEv
    at Object.Module._extensions..node (module.js:485:11)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler/v8-profiler.js:1:77)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Going into node_modules/webkit-devtools-agent/node_modules/v8-profiler and running make as @jfromaniello suggests, fixes it.

AntonAM commented 11 years ago

It happens on 32bit systems.

jwulf commented 11 years ago

I got this on 0.8.22. 32-bit system.

c4milo commented 11 years ago

@danmilon Make sure you don't have a manually installed v8-profiler version. From your terminal output, this is suspicious:

> v8-profiler@3.6.2beta postinstall /home/razor/Documents/dev/node-archiver/node_modules/webkit-devtools-agent/node_modules/v8-profiler
> ln -sf build/Release/profiler.node profiler.node

It should be pulling down https://github.com/c4milo/v8-profiler/tree/v4.0.0 instead.

c4milo commented 11 years ago

Hm, it's weird, it seems like your npm install is pulling an old version of webkit-devtools-agent. The current stable version is 0.1.1 and it's already in NPM. Maybe a cache issue in your side?

danmilon commented 11 years ago

I'm not on the same 32bit system, so can't reproduce. Indeed a fresh install worked.