What steps will reproduce the problem? 1. start google chrome under macosx with following command line : google-chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 2. 3.
What is the expected output? What do you see instead? Chrome may runs but... "command not found"
What version of the product are you using? On what operating system? the last one for macosx Lion
Please provide any additional information below. the good command /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
Comment #1
Posted on Aug 10, 2012 by Happy CamelI answered too quickly ...
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 [11648:-1406500160:138973865099074:ERROR:process_singleton_mac.cc(106)] Unable to obtain profile lock.
Comment #2
Posted on Aug 10, 2012 by Happy CamelWhen i tried to run the previous command, Chrome was already stated. So the response unable to obtain lock seem to be the expected behaviour. But in a comment i read that if chrome is already opened, we must use the --user-data-dir option ... but i didn't succeed in using it
Comment #3
Posted on Aug 11, 2012 by Massive GiraffeThanks for the report; the documentation didn't take into account the case where Chrome is already running. I'll take care of updating the docs (and I'll update this bug, too).
Comment #4
Posted on Aug 12, 2012 by Massive GiraffeDoes the following command work for you:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 --user-data-dir=/tmp/jsleakcheck
Comment #5
Posted on Aug 13, 2012 by Happy CamelHi when i enter your command, i get a chrome window who ask me if i want Chrome to be my default browser and another tab ask me to open a session so i guess it's okay but here is the console i get 2 warnings :
--remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 --user-data-dir=/tmp/jsleakcheck* Aug 13 09:04:20 iMac-de-Maxime.local Google Chrome Helper[530] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) [525:-1406500160:753118431229:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'blpcfgokakmgnkcojhhkbfbldkacnbeo' [525:-1406500160:753129704061:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'coobgpohoikkiipiblmjeljniedjpjpf' Aug 13 09:04:20 iMac-de-Maxime.local Google Chrome Helper[531] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) [525:-1406500160:753460617738:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'pjkljhegncpnkpknbcohdijeoejaedia'
Thank's for your help :)
Maxime Frysou 06 49 66 70 69 http://www.doyoubuzz.com/maxime-frysouhttp://www.doyoubuzz.com/maxime-frysou http://www.viadeo.com/fr/profile/maxime.frysouhttp://www.viadeo.com/fr/profile/maxime.frysou http://fr.linkedin.com/in/maximefrysouhttp://fr.linkedin.com/in/maximefrysou
Comment #6
Posted on Aug 13, 2012 by Happy CamelHi when i enter your command, i get a chrome window who ask me if i want Chrome to be my default browser and another tab ask me to open a session so i guess it's okay but here is the console i get 2 warnings :
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 --user-data-dir=/tmp/jsleakcheck Aug 13 09:04:20 iMac-de-Maxime.local Google Chrome Helper[530] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) [525:-1406500160:753118431229:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'blpcfgokakmgnkcojhhkbfbldkacnbeo' [525:-1406500160:753129704061:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'coobgpohoikkiipiblmjeljniedjpjpf' Aug 13 09:04:20 iMac-de-Maxime.local Google Chrome Helper[531] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) [525:-1406500160:753460617738:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'pjkljhegncpnkpknbcohdijeoejaedia'
Thank's for your help :)
Comment #7
Posted on Aug 13, 2012 by Massive GiraffeOk, thanks. It's normal that it asks about the default browser and other "on the first run" stuff. Also, I wouldn't worry too much about the console prints if everything works.
Comment #8
Posted on Aug 13, 2012 by Happy CamelHave a nice day !
Comment #9
Posted on Aug 20, 2012 by Helpful WombatHi, I got the same problem with maxproc and then when i try "python jsleakcheck.py -d closure-disposable -v" command in "depot_tools/leak-finder/src" i get these errors:
python jsleakcheck.py -d closure-disposable -v INFO:root:Using leak definition closure-disposable INFO:root:Reading suppressions from "closure-disposable-suppressions.txt" Traceback (most recent call last): File "jsleakcheck.py", line 336, in sys.exit(main()) File "jsleakcheck.py", line 332, in main return leak_checker.Run() File "jsleakcheck.py", line 148, in Run 'message: %s' % e.str()) leak_finder.Error: Cannot create RemoteInspectorClient; most probably you have DevTools open on the tab we're trying to inspect. Original error message: Error accessing Chrome instance debugging port:
Please help, Thanks :)
Comment #10
Posted on Aug 20, 2012 by Massive GiraffeThat's not the same problem really, can you file a different bug? (This bug was about goog.Disposable.instances_ not being found.)
Which command line do you start your chrome with? Do you have DevTools open as the error message suggets? :)
Comment #11
Posted on Aug 20, 2012 by Helpful WombatThe same problem i mean when i start chrome by this command:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --js-flags=--stack_trace_limit=-1 --user-data-dir=Downloads/tmp/jsleakcheck
then i get the same warning:
Aug 20 15:07:57 Dungs-Mac-mini.local Google Chrome Helper[1374] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) [1370:-1396337984:22241998852330:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'pjkljhegncpnkpknbcohdijeoejaedia' [1370:-1396337984:22242030029216:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'coobgpohoikkiipiblmjeljniedjpjpf' [1370:-1396337984:22242148420183:ERROR:extension_prefs.cc(1274)] Bad or missing pref 'version' for extension 'blpcfgokakmgnkcojhhkbfbldkacnbeo' Aug 20 15:07:59 Dungs-Mac-mini.local Google Chrome Helper[1375] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100) Aug 20 15:08:25 Dungs-Mac-mini.local Google Chrome Helper[1383] : CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100)
After that i try command "python jsleakcheck.py -d closure-disposable -v" and it throws error:
leak_finder.Error: Cannot create RemoteInspectorClient; most probably you have DevTools open on the tab we're trying to inspect. Original error message: Error accessing Chrome instance debugging port:
I don't open DevTools, maybe this bug of goog.Disposable is caused by accessing Chrome instance debugging port so i think this can be the consequence of look up the port for "com.apple.windowserver.active" failure.
Thanks for your help :)
Comment #12
Posted on Aug 20, 2012 by Massive Giraffe(Oops, I was confused about which bug this is, this was not the Disposable.instances_ not found bug. Pls ignore that part.)
Which tabs do you have open in the chrome instance?
Are there more chrome instances running? Maybe you could just try closing them... although, which user-data-dir it shouldn't matter.
And, you could see if somebody is listening to the port 9222. I don't know how you do that on mac.
Comment #13
Posted on Aug 20, 2012 by Helpful WombatComment deleted
Comment #14
Posted on Aug 20, 2012 by Helpful WombatI run my app on the first tab (and i open only one tab. There's no more chrome instances running). The port 9222 is listening and free. I also have tried closing and reopening Chrome several time but I still get the same error. hix hix. I don't what to do next T__T
Thanks for your help :D
Comment #15
Posted on Aug 20, 2012 by Massive GiraffeWhat do you mean by "listening and free" and how did you check that?
Could you try: sudo lsof -i | grep 9222
Hmm, interesting, the error message is: "urlopen error [Errno 8] nodename nor servname provided, or not known"
If I don't have anything listening on 9222 (on linux), the error is: "urlopen error [Errno 111] Connection refused".
Comment #16
Posted on Aug 20, 2012 by Massive GiraffeAlso, could you try opening your-repo-dir/pyautolib/remote_inspector_client.py and replacing this line: f = urllib2.urlopen('http://localhost:9222/json') with: f = urllib2.urlopen('http://127.0.0.1:9222/json')
Comment #17
Posted on Aug 20, 2012 by Helpful WombatI try "netstat -an | grep 9222" to check and the result is:
tcp4 0 0 127.0.0.1.9222 . LISTEN
I try "sudo lsof -i | grep 9222" but the console prints nothing :( (I use mac os X)
Comment #18
Posted on Aug 21, 2012 by Helpful WombatI replaced the url as your suggestion and it works.
Thanks for your support, Have a nice day^^
Comment #19
Posted on Aug 21, 2012 by Helpful WombatI am sorry to annoy you again. I run leak checking command and i get an exception:
Dungs-Mac-mini:src dungltk$ python jsleakcheck.py -d closure-disposable -v INFO:root:Using leak definition closure-disposable INFO:root:Reading suppressions from "closure-disposable-suppressions.txt" INFO:root:Taking heap snapshot INFO:root:Analyzing heap snapshot INFO:root:Retrieving creating stack traces for leaking objects Exception in thread Thread-2: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 530, in __bootstrap_inner self.run() File "../../pyautolib/remote_inspector_client.py", line 571, in run asyncore.loop(timeout=1, count=1, use_poll=True) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 214, in loop poll_fun(timeout, map) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 140, in poll r, w, e = select.select(r, w, e, timeout) error: (9, 'Bad file descriptor')
INFO:root:No leaks found.
Could you help me figure it out. Thank you very much :)
Comment #20
Posted on Aug 21, 2012 by Massive GiraffeOkay, cool that replacing localhost with 127.0.0.1 works. That plus the error message you get suggest that you're having some issues with the DNS.
Then, it also seems the stack traces cannot be retrieved... You could just try to retrieve the leaking objects without the stack traces, to get started:
python jsleakcheck.py --containers="goog.Disposable.instances_" --bad-nodes="goog.events"
Btw, does the error occur every time you run the program? And every time the same way?
Comment #21
Posted on Aug 22, 2012 by Helpful WombatThe error doesn't occur every time in the same way. Sometime the terminal hangs forever at Taking heap snapshot step:
Dungs-Mac-mini:src dungltk$ python jsleakcheck.py -d closure-disposable -v INFO:root:Using leak definition closure-disposable INFO:root:Reading suppressions from "closure-disposable-suppressions.txt" INFO:root:Taking heap snapshot
At that time, the terminal tab running Chrome prints out an error:
[3033:-1256083456:978872428323:ERROR:stream_listen_socket.cc(136)] send failed: buffer overrun
Comment #22
Posted on Aug 22, 2012 by Massive GiraffeOk, I might have seen the problem where it just hangs when trying to get a heap snapshot. However, I've never been able to reproduce it myself :/
Which version of chrome are you using? Can you try out the most recent chrome you can get (canary seems to be version 23, dev version 22)?
Comment #23
Posted on Aug 22, 2012 by Helpful WombatComment deleted
Comment #24
Posted on Aug 22, 2012 by Helpful WombatOk, I will try the most update chrome. Btw, currently I use chrome version 21.0.1180.82
Comment #25
Posted on Aug 28, 2012 by Massive GiraffeIf anybody is still having problems,could you update your checkout, and run jsleakcheck.py with the command line option --remote-inspector-client-debug (in addition to the ones your normally use), and attach the log into this bug (or send it to me).
Comment #26
Posted on Sep 4, 2012 by Quick HorseComment deleted
Comment #27
Posted on Sep 4, 2012 by Quick HorseThis steps didn't work for me. I have an other option: No extentions installed in chrome v.21!
https://groups.google.com/forum/#!topic/jsleakcheck/isfeC3MWKbg
Only open chrome with this:
open -a "Google Chrome" --args -remote-debugging-port=9222 -js-flags=--stack_trace_limit=-1 -user-data-dir=/tmp/jsleakcheck
activate developer modus (Tools > ... checkbox[true] )
open developer tools with (press Ctrl + Shift + i)
go to the CONSOLE (developer tools) and write:
goog.Disposable.MONITORING_MODE=goog.Disposable.MonitoringMode.INTERACTIVE
close the developer tools (press Ctrl + Shift + i)
open an other tab in the terminal and write: python jsleakcheck.py -d closure-disposable -v --remote-inspector-client-debug
thats all :) i hope it help
Status: Fixed
Labels:
Type-Defect
Priority-Medium