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 245137 - Netbeans connector not able to access CSS in latest Chrome version
Summary: Netbeans connector not able to access CSS in latest Chrome version
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: Inspection (show other bugs)
Version: 8.0
Hardware: All All
: P1 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
: 246301 246751 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-19 08:32 UTC by adam_felix_fps
Modified: 2014-09-08 07:09 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 adam_felix_fps 2014-06-19 08:32:11 UTC
I am not able to access CSS when debugging with the Chrome Inspector in latest dev version of Chrome (Version 37.0.2054.3 dev-m (64-bit)).  I get the following error:

java.lang.NullPointerException
	at org.netbeans.modules.web.webkit.debugging.api.css.CSS.getMatchedStyles(CSS.java:290)
	at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel.updateMatchedRules(CSSStylesSelectionPanel.java:644)
	at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel$9.run(CSSStylesSelectionPanel.java:633)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

I can produce this every time I click on an element in Inspect mode and the CSS styles window is blank.  This still works fine using the internal webkit browser.  Let me know if you need me to attach any logs or anything.  I have sent this in using the internal Exceptions reporter but it is not showing in my list of issues so am not sure if it got through

Cheers

Adam
Comment 1 adam_felix_fps 2014-06-19 08:52:30 UTC
In fact I have just tried this in all versions of Chrome 37 including the release version and this happens in all of them so it is no longer possible to debug in Chrome since the latest round of updates
Comment 2 Vladimir Riha 2014-06-20 12:14:26 UTC
Reproducible with NB 8.0 and Dev, thank you for catching that


Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Linux version 3.11.0-12-generic running on amd64; UTF-8; en_US (nb)
Comment 3 Jan Stola 2014-07-01 14:54:40 UTC
I was able to reproduce this issue using Chromium 38. This bug is a consequence of the recent changes in CSS domain of Webkit debugging protocol used by Chrome.

There have been a lot of changes affecting our support recently:

* removal of CSSStyleSheetBody and CSS.getStyleSheet
https://chromium.googlesource.com/chromium/blink/+/6ca6984c74091cd8e84e99cda38d3f603c374217

* removal of CSSStyleId and CSSRuleId
https://chromium.googlesource.com/chromium/blink/+/6d10739ef5fb858cb0f376926960fc1f81f43d05

* removal of CSSRule.sourceURL
https://chromium.googlesource.com/chromium/blink/+/c3f7d4e447566281a6d895a6af6299d13eea601d

I have modified the corresponding code to handle these changes.

Modified files:
http://hg.netbeans.org/web-main/rev/71ba0c41f309
http://hg.netbeans.org/web-main/rev/84b694bee2f2
Comment 4 Vladimir Riha 2014-07-01 15:28:02 UTC
Thanks a lot, I'll try it tomorrow.
Comment 5 Vladimir Riha 2014-07-04 14:39:15 UTC
Thank you, I cannot reproduce this issue so marking as verified.

I tried to test web inspection more thoroughly in Chrome 38 and I've found other issues related to latest Chromium: 245411, 245390, 245400, 245406 or 245410.


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
Comment 6 adam_felix_fps 2014-07-15 11:25:03 UTC
As this is now verified fixed I appreciate this is in the nightly but will this be in an 8.1 patch version?  I only ask as I think a lot of people will be trying to use the inspector functionality as it is marked as a feature and it will not work.

Cheers

Adam
Comment 7 adam_felix_fps 2014-07-15 12:18:35 UTC
I tried the nightly and it looked like things were better, however, ther are still some issues.  Rules ARE now returned back to netbeans but all the relevant stylesheets come abck as null rather than the correct sheet.  Clicking on one of these refernces gives the following error:
java.lang.NullPointerException: The fileObject parameter cannot be null
	at org.openide.util.Parameters.notNull(Parameters.java:89)
	at org.netbeans.modules.parsing.api.Source.create(Source.java:132)
	at org.netbeans.modules.web.inspect.webkit.actions.GoToRuleSourceAction.actionPerformed(GoToRuleSourceAction.java:114)
	at org.netbeans.modules.web.inspect.webkit.actions.GoToRuleSourceAction$1.run(GoToRuleSourceAction.java:123)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:419)
	at org.netbeans.modules.web.inspect.webkit.actions.GoToRuleSourceAction.actionPerformed(GoToRuleSourceAction.java:120)
	at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel$5$1.mouseClicked(CSSStylesSelectionPanel.java:375)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
	at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:269)
	at java.awt.Component.processMouseEvent(Component.java:6530)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at java.awt.Component.processEvent(Component.java:6292)
	at java.awt.Container.processEvent(Container.java:2234)
	at java.awt.Component.dispatchEventImpl(Component.java:4883)
	at java.awt.Container.dispatchEventImpl(Container.java:2292)
	at java.awt.Component.dispatchEvent(Component.java:4705)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4542)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
	at java.awt.Container.dispatchEventImpl(Container.java:2278)
	at java.awt.Window.dispatchEventImpl(Window.java:2739)
	at java.awt.Component.dispatchEvent(Component.java:4705)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
	at java.awt.EventQueue.access$400(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.awt.EventQueue$3.run(EventQueue.java:691)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:719)
	at java.awt.EventQueue$4.run(EventQueue.java:717)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Also if you select one of the lternative states e.g. hover you get the following error:

java.lang.NullPointerException
	at org.netbeans.modules.web.inspect.webkit.Utilities.findRule(Utilities.java:474)
	at org.netbeans.modules.web.inspect.webkit.Utilities.findRule(Utilities.java:480)
	at org.netbeans.modules.web.inspect.webkit.ui.CSSStylesSelectionPanel$10.run(CSSStylesSelectionPanel.java:674)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
	at java.awt.EventQueue.access$400(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:697)
	at java.awt.EventQueue$3.run(EventQueue.java:691)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 although this is intermittent.  Sometimes it works, sometimes not.

There is also nothing shown in the properties list it always says no rule selected even when a rule IS selected.

And as previously reported after a few clicks in inspect mode the session is eventually terminated without warning.
Comment 8 adam_felix_fps 2014-07-15 12:20:50 UTC
Ignore the bit about the rules not showing.  That was user error :) However everything else applies.
Comment 9 Vladimir Riha 2014-07-15 12:40:04 UTC
Could you please report it as a new issue to web/inspection? Thank you

This fix will be in 8.0.1
Comment 10 adam_felix_fps 2014-07-15 13:52:46 UTC
Reported as a new bug Issue 245694. Hopefully those can get into 8.0.1 too :) Cheers

Adam
Comment 11 Vladimir Riha 2014-08-07 11:56:37 UTC
*** Bug 246301 has been marked as a duplicate of this bug. ***
Comment 12 Vladimir Riha 2014-09-08 07:09:27 UTC
*** Bug 246751 has been marked as a duplicate of this bug. ***