This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245410 - Unexpected character (^Q) at position 0. at org.json.simple.parser.Yylex.yylex
Summary: Unexpected character (^Q) at position 0. at org.json.simple.parser.Yylex.yylex
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: RANDOM
: 245406 245750 250096 (view as bug list)
Depends on:
Blocks: 245747
  Show dependency tree
 
Reported: 2014-07-04 13:10 UTC by Vladimir Riha
Modified: 2015-02-24 14:49 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 210538


Attachments
stacktrace (1.72 KB, text/plain)
2014-07-04 13:10 UTC, Vladimir Riha
Details
patch (9.83 KB, patch)
2014-07-29 19:05 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-07-04 13:10:24 UTC
Build: NetBeans IDE Dev (Build 201407040001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13
OS: Windows 7

User Comments:
vriha: happened when I was selecting element with Inspect mode in Chromiuum




Stacktrace: 
Unexpected character (^Q) at position 0.
   at org.json.simple.parser.Yylex.yylex(Yylex.java:610)
   at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
   at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
   at org.json.simple.parser.JSONParser.parse(JSONParser.java:81)
   at org.json.simple.parser.JSONParser.parse(JSONParser.java:75)
   at org.json.simple.JSONValue.parseWithException(JSONValue.java:78)
Comment 1 Vladimir Riha 2014-07-04 13:10:28 UTC
Created attachment 147885 [details]
stacktrace
Comment 2 Vladimir Riha 2014-07-04 13:13:28 UTC
To reproduce:
 - download [1] and run it in Chrome with NB integration (I used Chromium 38)
 - start inspect mode
 - click on "Home" link in the left menu

=> all web inspection windows are closed, this exception pops out


[1] http://services.netbeans.org/synergy/server/api/attachment.php?id=140
Comment 3 Vladimir Riha 2014-07-04 13:27:41 UTC
Cannot reproduce in Chrome 35, only Chromium 38
Comment 4 Vladimir Riha 2014-07-17 09:46:33 UTC
*** Bug 245750 has been marked as a duplicate of this bug. ***
Comment 5 Petr Jiricka 2014-07-18 11:45:05 UTC
Tomas, could you please investigate?
Comment 6 Tomas Mysik 2014-07-18 12:09:06 UTC
I guess David worked on this - or not? Again, I know nothing about this area so not sure how effective it is to let me solve this issue...
Comment 7 David Konecny 2014-07-21 11:56:44 UTC
This looks to me like a variation of issue 245406 - something broken in dev build of Chrome 38 in WebSockets. I cannot reproduce this in Chrome 36.
Comment 8 David Konecny 2014-07-21 12:00:22 UTC

*** This bug has been marked as a duplicate of bug 245406 ***
Comment 9 Tomas Mysik 2014-07-29 08:10:00 UTC
Perhaps not a duplicate, it just happened to me in stable Chrome (v36).

Unexpected character (�) at position 0.
        at org.json.simple.parser.Yylex.yylex(Yylex.java:610)
        at org.json.simple.parser.JSONParser.nextToken(JSONParser.java:269)
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:118)
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:81)
        at org.json.simple.parser.JSONParser.parse(JSONParser.java:75)
        at org.json.simple.JSONValue.parseWithException(JSONValue.java:78)
[catch] at org.netbeans.modules.extbrowser.plugins.Message.parse(Message.java:113)
        at org.netbeans.modules.extbrowser.plugins.ExternalBrowserPlugin$BrowserPluginHandler.read(ExternalBrowserPlugin.java:303)
        at org.netbeans.modules.netserver.websocket.WebSocketHandler7.readDelegate(WebSocketHandler7.java:118)
Comment 10 adam_felix_fps 2014-07-29 14:29:41 UTC
This is happening to me in Stable now everytime I try and debug.  Looks like Chrome autoupdated to 36 in the background and now I cannot debug again :(
Comment 11 Petr Hejl 2014-07-29 19:05:45 UTC
Created attachment 148393 [details]
patch

Per our investigation (me and Tomas), this is likely caused by missing piece of protocol implementation in NB.

The attached patched could solve the issue. Still needs a lot of testing.
Comment 12 Tomas Mysik 2014-07-30 04:53:09 UTC
*** Bug 245406 has been marked as a duplicate of this bug. ***
Comment 13 Tomas Mysik 2014-07-30 05:00:51 UTC
Should be fixed now, please verify. Thanks.

http://hg.netbeans.org/web-main/rev/8edb2f4e6e12
Comment 14 Tomas Mysik 2014-07-30 05:12:31 UTC
PetřeH, thanks a lot for your help!
Comment 15 Quality Engineering 2014-07-31 08:58:22 UTC
Integrated into 'main-silver', will be available in build *201407310738* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8edb2f4e6e12
User: Tomas Mysik <tmysik@netbeans.org>
Log: #245410 - Unexpected character (^Q) at position 0. at org.json.simple.parser.Yylex.yylex
Comment 16 Vladimir Riha 2014-07-31 12:54:02 UTC
The fix seems to be working fine, I tested web inspection/debugging in Chrome 36/Chromium 37/Embedded browser/Mobile Safari/Cordova/Chrome for Android on Linux and Mac and no problems. I've used several builds for testing as they became available: web-main builds 1110 & 1114 and today's trunk build

Verified, thank you


Product Version: NetBeans IDE Dev (Build 201407310738)
Java: 1.7.0_65; Java HotSpot(TM) 64-Bit Server VM 24.65-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_65-b17
System: Mac OS X version 10.9.4 running on x86_64; UTF-8; en_US (nb)


Product Version: NetBeans IDE Dev (Build 201407310738)
Java: 1.8.0_05; Java HotSpot(TM) Client VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)

NetBeans IDE Dev (Build web-main-1114-on-20140731) 
NetBeans IDE Dev (Build web-main-1111-on-20140730)
Chrome 36 Version 36.0.1985.125
Chromium 37 Version 37.0.2062.20 Ubuntu 14.04 (283104)
Comment 17 David Konecny 2014-08-03 23:29:35 UTC
Good job Petr and Tomas!!
Comment 18 Jan Stola 2015-02-24 14:49:01 UTC
*** Bug 250096 has been marked as a duplicate of this bug. ***