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 222319 - HTML5 Chrome integration worked to start, and then stopped working. Now Chrome browser shows only blank page
Summary: HTML5 Chrome integration worked to start, and then stopped working. Now Chrom...
Status: RESOLVED INCOMPLETE
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-17 18:35 UTC by tomoke
Modified: 2012-11-20 23:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (59.92 KB, text/plain)
2012-11-17 18:35 UTC, tomoke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomoke 2012-11-17 18:35:05 UTC
Product Version = NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_07
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.3-b01

Started to use the HTML5/Chrome integration to do some testing of the facility.
On initial project creation, the first time the feature had been used after NetBeans install, I was prompted to setup the Chrome extension, and did.
Chrome then displayed the web page under development, including updating as the page was saved after editing.

At some point it ceased doing this, showing only a page with a URL like: file:///C:/Users/xxxx/AppData/Local/Temp/blank2817610606705526993.html, and only showing a run button in the IDE (I can't remember if it started able to show a debug buttom).

Deactivated the feature, and dropped the extension from Chrome. On start of the HTML5 project, I was prompted to load the extension, and did. It showed the NetBeans icon in the URL bar.
However, starting the run, again gave me the blank page file, the icon disappeared from the URL bar.

Don't have a workaround to get the feature to allow debugging through Chrome.
Comment 1 tomoke 2012-11-17 18:35:08 UTC
Created attachment 127980 [details]
IDE log
Comment 2 David Konecny 2012-11-18 21:22:33 UTC
The log shows that WebSocket server which is needed for communication with the browser failed to start. But I do not think that's the root cause of your problem - it looks more like a side-effect of you disabling the feature and re-enabling it.

What's the version of your Chrome - could you open "chrome://version/" in your Chrome and copy and paste here the output. There was a problem in older Chrome versions (v18 and v20) (see issue 222020 for example).

If your Chrome version is latest (ie 23), could you please try to switch off all open Chrome windows and restart the NetBeans IDE and try to run HTML5 project again. Do you get again blank page and nothing else? Could you please append the NetBeans Connection extension log? to do so open Extensions page in Chrome, enabled Developer Mode, click on "Inspect views: html/main.html" in NetBeans Connector section and in Developer Tools which just opened have a look into Console tab. Thanks.
Comment 3 tomoke 2012-11-19 01:21:24 UTC
I am using 23.0.1271.64



Google Inc.
Copyright © 2006-2012 Google Inc. All Rights Reserved.
Google Chrome	23.0.1271.64 (Official Build 165188) m
OS	Windows
WebKit	537.11 (@132838)
JavaScript	V8 3.13.7.5
Flash	11.5.31.2
User Agent	Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11
Command Line	"C:\Users\tomoke\AppData\Local\Google\Chrome\Application\chrome.exe" --flag-switches-begin --flag-switches-end
Executable Path	C:\Users\tomoke\AppData\Local\Google\Chrome\Application\chrome.exe
Profile Path	C:\Users\tomoke\AppData\Local\Google\Chrome\User Data\Default
Variations	853359fa-186f5907
1d3048f1-9de009d0
cd73da34-cf196cb
6214fa18-9e6dc24d
b03ddc1f-2d9ef0cc
4dcb0cd6-d31c4ca1
fe0a565e-595c7724
f9b252d0-fd526c81
5c8ef264-2d5b6ed9
6b981c71-4ad60575
ccee547a-766fa2d
571ffcab-766fa2d
f67325bd-f6c7f0b3
75f7fb7e-766fa2d
24dca50e-837c4893
ca65a9fe-91ac3782
d1a7fd3-4c2186eb
9c097cbc-d00c3f8d
3028188e-741eb6b6
2bd5ec9c-275837c2
5a3c10b5-e1cc0f14
244ca1ac-4ad60575
246fb659-bca011b3
f296190c-e2346573
4442aae2-6e597ede
75f0f0a0-4ad60575
e2b18481-4c073154
e7e71889-4ad60575
980cfc4b-7fb74f1c

I closed all windows, with Chrome closing on its own on the last window close.
Exited and restarted NetBeans.
On the run, It showed a blank page again.

The Chrome Extensions, NetBeans Connector, in Developer mode, shows a console with just a ">" prompt.

If I look at main.html, it shows the following:

<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 2011 Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.

Contributor(s):

Portions Copyrighted 2011 Sun Microsystems, Inc.
-->
<!DOCTYPE html>
<html>
  <head>
    <title>Background page of NetBeans Connector</title>
    <meta name="author" content="Jan Stola" />
    <script src="../i18n/i18n.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/chrome.js"></script>
  </head>
</html>

The Elements tab of the Developer Tools, shows:

<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 2011 Oracle and/or its affiliates. All rights reserved.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.

The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.

Contributor(s):

Portions Copyrighted 2011 Sun Microsystems, Inc.
-->
<DOCTYPE html>
<html>
  <head>...</head>
  <body></body>
</html>

The actual index.html in the NetBeans editor window shows:

<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div>TODO write content</div>
    </body>
</html>


The page source of the Chrome page indicates contents of:


<html :netbeans_temporary="true"></html>
Comment 4 David Konecny 2012-11-19 02:15:46 UTC
Thanks for the info. I must admit I have no idea what's wrong so far. I have not seen this problem before. Few more thing to try please. See inline:

(In reply to comment #3)
> The Chrome Extensions, NetBeans Connector, in Developer mode, shows a console
> with just a ">" prompt.

At the bottom you can filter whether Console should show Errors, Warnings, Logs or All. I assume you tried All option.

> The Elements tab of the Developer Tools, shows:
> 

Could you please have a look into Network and see what's there? Whenever a new tab is opened in the Chrome the NetBeans Connector makes an attempt to connect to a web socket server at ws://127.0.0.1:8008/. The NetBeans starts this server automatically upon first execution of an HTML5 project. You are not running any other local server on port 8008 by any chance, are you? Your previous IDE log showed that the websocket server startup failed - could you please look into IDE log again and double check that this is not happening anymore - there should not be any "java.net.BindException: Address already in use: bind". Or just append the IDE log to this issue again please. So, the Chrome's Network tab in Dev Tools should show that NetBeans Connector attempted to open communication to "127.0.0.1". Selecting the network request shows the details. What can you see there? Again, at the bottom are filters for what communication to show so go for WebSockets or All. Thanks.
Comment 5 tomoke 2012-11-20 05:58:04 UTC
For Console, I had tried all of "All", "Errors", "Warnings", "Logs". The only thing that shows in the console output is the ">" prompt.

Looking at the Network table, I see nothing, it is blank, only the column headers of Name, Method, Status, Type, Initiator, Size, Time and Timeline show up.

The status line below the table says: "No requests captured. Reload the page to see detailed information on the network activity.".

When the page is reloaded, no activity appears, which is probably normal since the url bar has a file url: "file:///C:/Users/tomoke/AppData/Local/Temp/blank1392509002325042248.html".
Comment 6 tomoke 2012-11-20 06:30:31 UTC
I rebooted my machine (a Dell Laptop), and then tried again. 

On the run of the project, it launched Chrome, and showed the yellow "'NetBeans Connector' is debugging this tab.", then turned into "localhost:8383/Mp4GenPages/index.html", and showed the correct page.

Updating html content in NetBeans, and doing a save, causes Chrome to update automatically.

So it looks like, for some reason, I was not getting the server up, as you had noted a bind collision, but I had shut down NetBeans before, in much of the testing.

I had not done a Process Explorer, to see what might still be left around, or a TcpView to see about the ports. If this re-occurs, I will look up that additional information.

For interests sake, the Chrome Developer console is loaded with information, like "Sent message: ...", though the Network table is still empty.

This is the first reboot of the machine after the initiation of the problem.
Comment 7 David Konecny 2012-11-20 19:04:33 UTC
Thanks for the info. Let's hope the issue is resolved. :-)
Comment 8 tomoke 2012-11-20 23:26:12 UTC
Thanks very much for your efforts.