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.
This bug was originally marked as duplicate of bug 235471, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE Dev (Build 201309100337) VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43 OS: Windows 7 User Comments: GUEST: 1. create new html5 project 2. javascript libraries selection screen 3. press the link update libraries 4. close the new project window GUEST: On Project properties I tried to update the libraries. akozlov75: on javascript library update GUEST: Project Properties -> JavaScript - Update Failed GUEST: Went to configure Android SDK Location Keda87: i don't know what happen GUEST: <Please provide a description of the problem or the steps to reproduce> Error whiles updating javascript libraries akozlov75: Same bug in dev version from 5th Sept. dave1703: java.lang.AssertionError: cdnjs-cdnjs-0aab807/ajax/libs/package.json at org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider.readLibraries(CDNJSLibrariesProvider.java:141) at org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider.getLibraries(CDNJSLibrariesProvider.java:118) at org.netbeans.modules.web.clientproject.api.WebClientLibraryManager.addLibraries(WebClientLibraryManager.java:311) at org.netbeans.modules.web.clientproject.api.WebClientLibraryManager.getLibraries(WebClientLibraryManager.java:219) at org.netbeans.modules.web.clientproject.api.jslibs.JavaScriptLibrarySelectionPanel$LibrariesTableModel$1.run(JavaScriptLibrarySelectionPanel.java:1252) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042) Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to at org.openide.util.RequestProcessor.post(RequestProcessor.java:424) GUEST: upding javascript libaries GUEST: After update js error apear GUEST: updating javascript libraries GUEST: Only update JS Stacktrace: java.lang.AssertionError: LibraryFiles{, packageInfo=nullversions={1.2=[base.css, base.min.css, layout.css, skeleton.css, skeleton.min.css]}} at org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider.readLibraries(CDNJSLibrariesProvider.java:198) at org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider.getLibraries(CDNJSLibrariesProvider.java:118) at org.netbeans.modules.web.clientproject.api.WebClientLibraryManager.addLibraries(WebClientLibraryManager.java:311) at org.netbeans.modules.web.clientproject.api.WebClientLibraryManager.getLibraries(WebClientLibraryManager.java:219) at org.netbeans.modules.web.clientproject.api.jslibs.JavaScriptLibrarySelectionPanel$LibrariesTableModel$1.run(JavaScriptLibrarySelectionPanel.java:1255) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
Created attachment 139908 [details] stacktrace
Is this another possible HR fix candidate or was it fixed by issue 235471? There is also likely duplicate issue 235777
IMHO another problem; Davide, could you please evaluate, I will fix it and backport if needed. Thanks.
*** Bug 235777 has been marked as a duplicate of this bug. ***
The problem is simple: "Skeleton" library was added two weeks ago into CDNJS but its package.json had few syntax errors and was not parsable. This has been resolve yesterday. See: https://github.com/cdnjs/cdnjs/commits/master/ajax/libs/skeleton/package.json We should change CDNJSLibrariesProvider.readPackage() to not throw exception but return null and simply skip JS library with corrupted package.json. I think this is worth to fix for 7.4 because fix is simple and mistake like this on CNDJS side has a very big impact on NetBeans - none of the CDNJS libraries are available and user gets periodically this exception I think. Tomas, could you look into this please? Thanks. Tomas, could you also review other code reading CDNJS libraries for similar type of issues? The code should be more defensive and simply ignore anything what's wrong. Thanks.
I will try to look at it.
Should be fixed I hope - Davide, please review the fix, thanks. After updating JS libs, I found this [1] in the IDE log - is it OK? Maybe we should log it with FINE level... Thanks. http://hg.netbeans.org/web-main/rev/796c63798a8c [1] INFO [org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider]: Misplaced file: cdnjs-cdnjs-1de51fb/ajax/libs/documentup/latest.js INFO [org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider]: Misplaced file: cdnjs-cdnjs-1de51fb/ajax/libs/documentup/latest.min.js INFO [org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider]: Misplaced file: cdnjs-master/ajax/libs/documentup/latest.js INFO [org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider]: Misplaced file: cdnjs-master/ajax/libs/documentup/latest.min.js INFO [org.netbeans.modules.web.clientproject.libraries.CDNJSLibrariesProvider]: Unexpected file directly in ajax libs directory: cdnjs-master/ajax/libs/package.json
Let's log these messages as FINE or FINEST. The fix looks OK but it you still need to remove "Exceptions.printStackTrace(ex)" from readPackage() and double check what happens when readPackage() returns null - such library should be skipped.
Done, Davide please review the fix. Láďo, please verify so I can transplant it to 7.4. Thanks. http://hg.netbeans.org/web-main/rev/92e20090c008
I've tried to update JS libs, added random folder with some content to the downloaded archive and then restarted IDE and add some JS file to project. No problems even after next update. Verified in web-main Product Version: NetBeans IDE Dev (Build web-main-11599-on-20130913) Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Transplanted to releases repo, branch release74. Thanks. http://hg.netbeans.org/releases/rev/4d4f5a6d2033 http://hg.netbeans.org/releases/rev/5c613a2626d2
Integrated into 'main-silver', will be available in build *201309140002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/92e20090c008 User: Tomas Mysik <tmysik@netbeans.org> Log: #235774 cont'd - AssertionError: LibraryFiles{, packageInfo=nullversions={1.2=[base.css, base.min.css, layout.css, skeleton.css, skeleton.min.css]}}
Cannot reproduce, verified Product Version: NetBeans IDE 7.4 RC1 (Build 201309152201) Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b49 Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b107 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Looks good. Thanks.