Open GoogleCodeExporter opened 9 years ago
Did you try out with the test page ($repo/leak-finder/doc/test-page.html)?
Does your page use Closure?
Original comment by marja@google.com
on 3 Sep 2012 at 7:39
yes i my page do use closure.
I tried out the test-page but instead of giving me a leak it says
C:\Projects\retail\depot_tools\file\leak-finder\src>python jsleakcheck.py -d clo
sure-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
INFO:root:No leaks found.
I m not gettign what is wrong.It should at least give me a proper output for
the test page.please help :)
Original comment by siddhart...@gmail.com
on 3 Sep 2012 at 9:34
Which Chrome version are you using?
Original comment by marja@google.com
on 3 Sep 2012 at 9:52
Chrome version : 21.0.1180.89 m
I m using python 2.5.
Can this be a reason for such an error??
Original comment by siddhart...@gmail.com
on 3 Sep 2012 at 10:04
That shouldn't be the reason. Are you sure you have the web page open in the
first tab, and no Developer Tools open?
Original comment by marja@google.com
on 3 Sep 2012 at 10:26
[deleted comment]
For my application i m using 127.0.0.1 as localhost and 8500 as my port.
If i open a single tab with my application open then the execution of file
hangs up at
INFO:root:Taking heap snapshot
and then if i open another tab wit localhost:9222 then it runs but gives me the
main error
Container not found: goog.Disposable.instances_
Original comment by siddhart...@gmail.com
on 3 Sep 2012 at 10:36
jsleakcheck will always inspect the first tab (and having developer tools open
on that tab) confuses it. If the first tab is not the page you want to inspect,
then jsleakcheck will very likely print out the "Container not found" warning.
Anyway, the real problem seems to be that when you open the test page on the
first tab, and run jsleakcheck, the execution hangs. Can you rerun with
--remote-inspector-client-debug and attach the logs here?
Original comment by marja@google.com
on 3 Sep 2012 at 10:39
Sorry but how do i run with remote-inspector-client-debug.
i just have a remote-inspector-client file.Am i missing some files in my repo.
Original comment by siddhart...@gmail.com
on 3 Sep 2012 at 10:48
You add it to the command line. Like this:
python jsleakcheck.py -d closure-disposable -v --remote-inspector-client-debug
Original comment by marja@google.com
on 3 Sep 2012 at 10:50
Now for my application if i use this command it gives me
INFO:root:Using leak definition closure-disposable
Traceback (most recent call last):
File "jsleakcheck.py", line 345, in <module>
sys.exit(main())
File "jsleakcheck.py", line 337, in main
show_socket_messages=options.remote_inspector_client_debug)
File "C:/Projects/retail/depot_tools/file/pyautolib/remote_inspector_client.py
", line 752, in __init__
tab_index, verbose, show_socket_messages)
File "C:/Projects/retail/depot_tools/file/pyautolib/remote_inspector_client.py
", line 307, in __init__
result = self._IdentifyDevToolsSocketConnectionInfo(tab_index)
File "C:/Projects/retail/depot_tools/file/pyautolib/remote_inspector_client.py
", line 546, in _IdentifyDevToolsSocketConnectionInfo
'Error accessing Chrome instance debugging port: ' + str(e))
RuntimeError: Error accessing Chrome instance debugging port: <urlopen error [Er
rno 10061] No connection could be made because the target machine actively refus
ed it>
Just as a reminder:I m using 8500 as a port to run my application but set
chrome debugging port as 9222.Is it creating prob.
Original comment by siddhart...@gmail.com
on 3 Sep 2012 at 10:56
The port where you run your web server shouldn't affect this. Chrome will
happily retrieve your web page from where ever you point it to, and once it has
retrieved it, it can be snapshotted via the remote inspector protocol.
Can you first try out with the test page to get that working, and then try out
with your application?
It seems like chrome can't listen to the port 9222 or the jsleakcheck is not
allowed to connect to it. I don't know how to debug this on Windows, maybe
check your system / firewall settings about which apps are allowed to own which
ports and connect to which ports.
Original comment by marja@google.com
on 3 Sep 2012 at 11:02
hey so finally now test-page as well as some other pages run properly.
But one more thing now is that my home page contains 60 MB of .js files loading
at once. So if i check for these, does it actually takes long time to take
snapshot or is there some error that makes it to go into a hang state.
Bcoz when i run the leakcheck for my application it is taking ample of time so
i don't really know is it hanging up or doing it's work correctly.
Thanks for your previous help :):)
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 7:03
Can you run jsleakcheck with --remote-inspector-client-debug and paste the logs
into this bug? Thanks.
Original comment by marja@google.com
on 5 Sep 2012 at 9:05
It is giving some strange output of long digits and then hangs up ending with
no message.
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 9:19
Yes, can you please direct that output into this file and attach the file on
the this bug ("Attach a file" below).
Original comment by marja@google.com
on 5 Sep 2012 at 9:22
Command promt doesn't show me the entire output but here is what i can see:
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 9:27
Attachments:
Ok, thanks, can you direct the log into a file:
python jsleakcheck.py -d closure-disposable -v --remote-inspector-client-debug
2>&1 > logfile.txt
and attach that?
It seems though that the heap snapshot is received but jsleakcheck fails to
notice it's received. (I've seen this before; there might be some quirk in the
remote inspecting protocol.)
Original comment by marja@google.com
on 5 Sep 2012 at 9:31
It hangs up at this point:
C:\Projects\retail\depot_tools\file\leak-finder\src>python jsleakcheck.py -d clo
sure-disposable -v --remote-inspector-client-debug 2>&1 > logfile.txt
INFO:root:Using leak definition closure-disposable
INFO:root:Reading suppressions from "closure-disposable-suppressions.txt"
INFO:root:Taking heap snapshot
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 9:39
Oops, not "2>&1 > logfile.txt" but "> logfile.txt 2>&1".
So:
python jsleakcheck.py -d closure-disposable -v --remote-inspector-client-debug
> logfile.txt 2>&1
Original comment by marja@google.com
on 5 Sep 2012 at 9:58
Noops, even this command doesn't work. Hangs up after the command :(
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 10:11
Yes, but it should produce some logs though?
Original comment by marja@google.com
on 5 Sep 2012 at 10:50
No, it doesn't show any log neither it generates a logfile.txt
What it does is just stops after command.
Original comment by siddhart...@gmail.com
on 5 Sep 2012 at 11:07
How does leak-finder works?
I mean does it check only the tab page which is opened in the browser or it
also checks for leak in all .js files which are just imported by the page?
For me it seems like it just check the tab page.
Original comment by siddhart...@gmail.com
on 6 Sep 2012 at 4:44
It doesn't do any analysis of the code, it just checks which JS objects are
alive at the point when it's run, and computes if they are leaks or not.
That is, in the closure-disposable configuration, it checks which Disposable
objects have been created but not yet dispose()d, and detects if they are leaks
or not. So, this is run-time analysis.
So, it doesn't check leaks "on the page" or "on the js files"; it analyses
objects which are alive at the moment, and it doesn't depend on whether the
"page" or an imported .js created them.
Original comment by marja@google.com
on 6 Sep 2012 at 8:20
Shit , could any body tell me where is the result ? I just run it with
test-page.html, then , what will happen ? There is nothing in the document ,
holly shit , it takes me half day to analyze it , but finally I don't know
which is the result!!! Is this the shit which google release , I can't belive
it.
Original comment by hancheng...@gmail.com
on 3 Dec 2012 at 9:59
The result for the test page is that the tool prints out information about a
leak on the test page (a stack trace etc.)
Original comment by marja@google.com
on 3 Dec 2012 at 10:07
I'm still running into a similar issue on windows. Python 2.7.3, Chrome
27.0.145.94 m.
$ python jsleakcheck.py -d closure-disposable -v --remote-inspector-client-debug
INFO:root:Using leak definition closure-disposable
Traceback (most recent call last):
File "jsleakcheck.py", line 367, in <module>
sys.exit(main())
File "jsleakcheck.py", line 357, in main
show_socket_messages=options.remote_inspector_client_debug)
File "../../pyautolib/remote_inspector_client.py", line 861, in __init__
self._version = self._GetVersion(url)
File "../../pyautolib/remote_inspector_client.py", line 1323, in _GetVersion
'Error accessing Chrome instance debugging port: ' + str(e))
RuntimeError: Error accessing Chrome instance debugging port: HTTP Error 503:
Service Temporarily Unavailable
Any ideas would be appreciated.
Original comment by mmcwill...@gmail.com
on 3 Jun 2013 at 2:34
It seems that jsleakcheck cannot connect to Chrome. You should try closing all
Chrome processes (with the task manager, if nothing else helps) and restarting
with --remote-debugging-port=9222
Original comment by ma...@chromium.org
on 3 Jun 2013 at 2:36
I have the same issue as #28, using windows 7 with Chrome developer version
33.0.1712.0:
Started Chrome with --remote-debugging-port=9222
--js-flags=--stack_trace_limit=-1 --user-data-dir=F://tmp
INFO:root:Using leak definition closure-disposable
Traceback (most recent call last):
File "jsleakcheck.py", line 367, in <module>
sys.exit(main())
File "jsleakcheck.py", line 357, in main
show_socket_messages=options.remote_inspector_client_debug)
File "../../pyautolib/remote_inspector_client.py", line 780, in __init__
self._version = self._GetVersion(url)
File "../../pyautolib/remote_inspector_client.py", line 1129, in _GetVersion
'Error accessing Chrome instance debugging port: ' + str(e))
RuntimeError: Error accessing Chrome instance debugging port: HTTP Error 503:
Service Unavailable
There are no other instances of Chrome; only test-page.html open in 1st tab. If
I open 2nd tab with http://localhost:9222/json/version, the Chrome version is
displayed:
{
"Browser": "Chrome/33.0.1712.0",
"Protocol-Version": "1.0",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.0 Safari/537.36",
"WebKit-Version": "537.36 (@162160)"
}
If I just enter localhost:9222, I see test-page.html as an inspectable page.
Should I give up on the Window environment for leak-finder and switch to Linux,
or has anyone resolved this issue with Windows?
Original comment by pcampb...@gmail.com
on 18 Nov 2013 at 3:54
Attachments:
yurys@, pls see comment 30; do you have an idea why we'd get "Error accessing
Chrome instance debugging port: HTTP Error 503: Service Unavailable" on
Windows, and how to debug this further?
Original comment by marja@google.com
on 19 Nov 2013 at 1:12
Pavel, do you have any clue on why we may get "HTTP Error 503" when trying
to connect to a tab over remote debugging protocol?
On Tue, Nov 19, 2013 at 5:12 AM,
<leak-finder-for-javascript@googlecode.com>wrote:
Original comment by yurys@chromium.org
on 19 Nov 2013 at 2:13
DevTools HTTP handler never returns 503 (SERVICE_UNAVAILABLE), jsleakcheck.py
must be talking to a different host/port.
Original comment by pfeld...@chromium.org
on 19 Nov 2013 at 3:27
I have tried changing the code in remote_inspector_client.py as follows to make
sure the host/port are correct and it makes no difference:
Raises:
RuntimeError: When Browser version info can't be fetched or parsed.
"""
try:
f = urllib2.urlopen('http://127.0.0.1:9222/json/version')
result = f.read();
result = simplejson.loads(result)
except urllib2.URLError, e:
raise RuntimeError(
'Error accessing Chrome instance debugging port: ' + str(e))
Original comment by pcampb...@gmail.com
on 19 Nov 2013 at 5:08
And now I changed remote_inspector_client.py back, but am dumping out
'endpoint' which is the url that is being opened. You can see in the output
that it is correctly set to localhost:9222:
File "../../pyautolib/remote_inspector_client.py", line 1129, in _GetVersion
'Error accessing Chrome instance debugging port: ' + str(e) + ' ' + str(endpoint))
RuntimeError: Error accessing Chrome instance debugging port: HTTP Error 503:
Service Unavailable http://localhost:9222
Original comment by pcampb...@gmail.com
on 19 Nov 2013 at 5:23
Original issue reported on code.google.com by
siddhart...@gmail.com
on 1 Sep 2012 at 9:01