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 235774 - AssertionError: LibraryFiles{, packageInfo=nullversions={1.2=[base.css, base.min.css, layout.css, skeleton.css, skeleton.min.css]}}
Summary: AssertionError: LibraryFiles{, packageInfo=nullversions={1.2=[base.css, base....
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: All All
: P1 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: 7.4_HR_FIX
: 235777 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-11 05:02 UTC by Exceptions Reporter
Modified: 2013-09-16 20:41 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 203756


Attachments
stacktrace (2.58 KB, text/plain)
2013-09-11 05:02 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-09-11 05:02:56 UTC
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)
Comment 1 Exceptions Reporter 2013-09-11 05:02:59 UTC
Created attachment 139908 [details]
stacktrace
Comment 2 Vladimir Riha 2013-09-11 06:06:02 UTC
Is this another possible HR fix candidate or was it fixed by issue 235471? There is also likely duplicate issue 235777
Comment 3 Tomas Mysik 2013-09-11 07:36:34 UTC
IMHO another problem; Davide, could you please evaluate, I will fix it and backport if needed.

Thanks.
Comment 4 David Konecny 2013-09-11 19:43:17 UTC
*** Bug 235777 has been marked as a duplicate of this bug. ***
Comment 5 David Konecny 2013-09-11 20:00:52 UTC
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.
Comment 6 Tomas Mysik 2013-09-12 04:59:00 UTC
I will try to look at it.
Comment 7 Tomas Mysik 2013-09-12 09:36:06 UTC
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
Comment 8 David Konecny 2013-09-12 21:37:43 UTC
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.
Comment 9 Tomas Mysik 2013-09-13 05:00:37 UTC
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
Comment 10 Vladimir Riha 2013-09-13 07:10:44 UTC
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)
Comment 11 Tomas Mysik 2013-09-13 17:49:20 UTC
Transplanted to releases repo, branch release74.

Thanks.

http://hg.netbeans.org/releases/rev/4d4f5a6d2033
http://hg.netbeans.org/releases/rev/5c613a2626d2
Comment 12 Quality Engineering 2013-09-14 05:14:32 UTC
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]}}
Comment 13 Vladimir Riha 2013-09-16 14:30:59 UTC
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)
Comment 14 David Konecny 2013-09-16 20:41:15 UTC
Looks good. Thanks.