zhuangzhineng / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

'IllegalStateException: Already has script with id xxx' is thrown when page is refreshed in browser #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
SDK/Debugger version: SDK 0.3.0 with WIP backend wk93101
Google Chrome/V8 Embedder + version: Chrome 15.0.874.106
OS + version: Ubuntu 11.04.

What steps will reproduce the problem?
1. Start Chrome with enabled remote debugging and open some page containing 
scripts.
2. Connect to it from Java program using WIP backend.
3. Refresh page in Chrome.

What happens instead?

The following exception in Java process is thrown (looks like SDK assumes that 
ScriptParsed events come after FrameNavigated event but actually they come 
first):

java.lang.IllegalStateException: Already has script with id 22
    at org.chromium.sdk.internal.wip.WipScriptManager.scriptIsReportedParsed(WipScriptManager.java:125)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$3.accept(WipCommandProcessor.java:213)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$3.accept(WipCommandProcessor.java:1)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$EventMap$InternalHandler.handle(WipCommandProcessor.java:282)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$EventMap.handleEvent(WipCommandProcessor.java:255)
    at org.chromium.sdk.internal.wip.WipCommandProcessor.processEvent(WipCommandProcessor.java:121)
    at org.chromium.sdk.internal.wip.WipCommandProcessor.access$3(WipCommandProcessor.java:112)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$WipMessageTypeHandler.acceptNonSeq(WipCommandProcessor.java:175)
    at org.chromium.sdk.internal.wip.WipCommandProcessor$WipMessageTypeHandler.acceptNonSeq(WipCommandProcessor.java:1)
    at org.chromium.sdk.internal.BaseCommandProcessor.processIncoming(BaseCommandProcessor.java:110)
    at org.chromium.sdk.internal.wip.WipCommandProcessor.acceptResponse(WipCommandProcessor.java:105)
    at org.chromium.sdk.internal.wip.WipTabImpl$2.textMessageRecieved(WipTabImpl.java:98)
    at org.chromium.sdk.internal.websocket.WsConnection$7$1.dispatch(WsConnection.java:210)
    at org.chromium.sdk.internal.websocket.WsConnection$8.runImpl(WsConnection.java:271)
    at org.chromium.sdk.internal.websocket.WsConnection$8.run(WsConnection.java:262)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by nik...@gmail.com on 10 Nov 2011 at 9:58

GoogleCodeExporter commented 9 years ago
I tried:
Google Chrome on Windows: 15.0.874.106
Eclipse features:
    Chromium JavaScript Remote Debugger: 0.3.0....
    ChromeDevTools SDK WIP Backends: 0.1.2
Backend: WK93101

Sites:
http://jetbrains.com (several refreshes)
http://design.ru (several refreshes)

SDK does assume that FrameNavigated comes first. Have you seen any evidence of 
opposite?
Note that future versions of protocol wouldn't work with WK93101 because they 
don't send FrameNavigated at all (unless explicitly required), but not 
15.0.874.* 

Original comment by peter.ry...@gmail.com on 10 Nov 2011 at 5:16

GoogleCodeExporter commented 9 years ago
I've reproduced the problem using 'WebKit Protocol' debug configuration in 
Eclipse. Open the attached index.html file in Chrome, start debug configuration 
in Eclipse and refresh the page. After that the stacktrace should be printed to 
stdout. Also I've attached two txt files containing messages printed to 
'Console' window in Eclipse before and after refresh. According to that 
ScriptParsed indeed comes before FrameNavigated.

Original comment by nikolay....@gmail.com on 15 Nov 2011 at 1:19

Attachments:

GoogleCodeExporter commented 9 years ago
This seems to be non-fatal exception. Nikolay, can you confirm this?

Original comment by peter.ry...@gmail.com on 15 Nov 2011 at 4:54

GoogleCodeExporter commented 9 years ago
Yes, it seems that this exception doesn't hurt.

Original comment by nikolay....@gmail.com on 23 Jan 2012 at 9:40