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 227684 - chrome integration randomly breaks
Summary: chrome integration randomly breaks
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Jan Stola
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2013-03-19 23:37 UTC by John Jullion-ceccarelli
Modified: 2013-05-13 15:17 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Jullion-ceccarelli 2013-03-19 23:37:48 UTC
I have 7.3 + nbandroid installed. I created a few nbandroid projects and nbandroid still prompts you to set the project as main. so with the nbandroid project selected as main I select an HTML file in the Projects window. Config box still tracks to main and I don't get an option to set the chrome browser. If I run the HTML file the IDE thinks it's running but Navigator is all grey and selecting any node shows "Cannot find selected element in browser" in CSS styles window.

Setting the HTML5 project as main did not help. Closing the main project so no project was set as main did fix the problem.
Comment 1 David Konecny 2013-03-20 00:10:09 UTC
(In reply to comment #0)
> I have 7.3 + nbandroid installed. I created a few nbandroid projects and
> nbandroid still prompts you to set the project as main. so with the nbandroid
> project selected as main I select an HTML file in the Projects window. Config
> box still tracks to main and I don't get an option to set the chrome browser.

Yeap, this is as designed and I guess was the reason for dropping Main Project concept because once a project is set as a main one then most of actions are bound to that project even when it does not make sense. Configuration combo box is one of those actions. You can still change browser/configuration of non-main-project simply via its project properties. 

> If I run the HTML file the IDE thinks it's running but Navigator is all grey
> and selecting any node shows "Cannot find selected element in browser" in CSS
> styles window.

I cannot reproduce this. This works to me as expected. Try inspecting the page in browser - this syncs the IDE with the browser. 

> Setting the HTML5 project as main did not help. Closing the main project so no
> project was set as main did fix the problem.

Project's popup has action "Unset Main Project" (or in Run menu there is Set Main Project action) which should help.

I played with this for a while and I think that the only impact of setting main project is that "Configuration" combo box in the toolbar is bound to the selected project. Everything else works fine.
Comment 2 John Jullion-ceccarelli 2013-03-20 16:51:37 UTC
Upon restart I can't reproduce the behavior. I'll reopen if I see it again. I'll also file a bug with nbandroid to remove the Set as Default.
Comment 3 John Jullion-ceccarelli 2013-03-21 19:21:16 UTC
See https://dl.dropbox.com/u/70172711/android-easel.avi for a video. This is random but pretty frequent. Not tied to Main Project, just random. Running the file correctly loads it in Chrome, the status bar says the debugger is connected, but after a brief flicker the Navigator goes back to dumb view over static HTML file and CSS Styles says "Cannot find selected element in browser".

Happened to me five times today, restarting is the only thing that helps. I can do a VNC session with anyone who wants to see it happening on my machine.
Comment 4 John Jullion-ceccarelli 2013-03-22 18:28:28 UTC
So it looks like the problem here is that the IDE is stuck pointing at the wrong file in the browser. For example, if I have index.html and about.html in my project and I run index.html, it'll have the nav view showing live DOM and CSS Styles showing CSS for the browser. If I switch to about.html, it doesn't prompt me to run it in the browser. It thinks it's already running but can't get any info, so it gives me file view in the navigator and no matter what I select says "Element can't be found". If I stop debugging the tab, no matter what file I run it'll always open about.html in the browser. Have to restart.
Comment 5 John Jullion-ceccarelli 2013-03-22 18:30:17 UTC
Today this happened when I was running about.html from one project then created a new project with PhoneGap support. But when I restarted and retraced my steps I couldn't reproduce.
Comment 6 Jan Stola 2013-03-26 16:08:16 UTC
There are several problems mentioned in this issue.

1) Project Configuration combo-box tracking the Main Project
2) Disconnected view in Navigator (shown in video in Comment #3)
3) Problems with about.html described in Comment #4

Problem 1. was explained by David already.

Problem 2. seems to be some problem in html.navigator. The video shows that the Navigator was notified about the inspection. The Navigator stays in the "connected mode" for a while but then returns into "disconnected mode" for some reason. I saw this few times as well. Pressing Reload in Chrome always worked for me as a workaround. Does it work for you as well?

Regarding Problem 3, how do you execute the files once the IDE starts to be obsessed by about.html? Is about.html executed even when you run index.html using context menu in Projects view or it happens when you press the 'Run <file>' button in CSS Styles view only? If it is the latter, does the label of the button shows the name of the opened file correctly or it shows 'Run about.html' no matter what file is opened in the editor?
Comment 7 Jan Stola 2013-05-13 15:17:40 UTC
I am closing this issue as fixed because it was resolved by the recent changes. Problem 2 is resolved by removal of the merged HTML Navigator and Problem 3 is resolved by the changes in CSS Styles view - it is no longer opened by default to suggest execution of the currently focused file.