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.
Build: NetBeans IDE Dev (Build 201309020001) VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18 OS: Mac OS X User Comments: GUEST: After cdnjs.com updated. Keda87: error when create new project akozlov75: On javascript list scanning GUEST: Project Javascript libraries Keda87: i dont know Keda87: please fix this bugs Stacktrace: java.lang.AssertionError: cdnjs-cdnjs-754b27a/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:1255) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
Created attachment 139628 [details] stacktrace
Tomas, do you mind having a look? Thanks.
Davide, from the code, it seems to me that we are searching for "/" in "package.json" - not sure what the correct fix is - to skip such entry? Not sure because later in the code, there is some code related to "package.json" entry name... Reassigning back, sorry. Also - could this be 7.4 FCS stopper? Feel free to suggest the proper fix and assign back to me, I will do that (including the possible backport to 7.4 branch). Thanks.
BTW it is "only" assertion but in the production build, StringIndexOutOfBoundsException will occur.
There is another likely duplicate, issue 235479. Do you know "how" this could happen? I was testing it several times during past weeks and recently after the URL change so I'm just wondering why it didn't happened to me
*** Bug 235479 has been marked as a duplicate of this bug. ***
No idea but I would guess that this happens if the CDNJS ZIP file is somehow "different" than we expect it; because we are downloading the current trunk/tip/head, it could easily happen. If there were some stable tags/branches, it would work better for us, of course.
There is an unexpected file in package.json in folder cdnjs-cdnjs-754b27a/ajax/libs. The file is in the latest CDNJS snapshot but I think it is accidental and should have never been there. The content of the file confirms that - the right folder for this file is cdnjs-cdnjs-754b27a/ajax/libs/kartograph-js/. The problem is that our code is not defensive enough. The assert should be replaced with if (i == -1) {continue;} Could you do that Tomas please? I'm busy with bunch of other stuff. This should be integrated into FCS - any user who updates to latest CDNJS snapshot will hit this exception. Thanks!
Setting proper keyword and TM. Will do it.
Fixed, Láďo, please verify, I would transplant it to 7.4 release then. Thanks. http://hg.netbeans.org/web-main/rev/a746f00e37da
Davide, please review the fix. Thanks.
Reviewed. It is good.
Integrated into 'main-silver', will be available in build *201309060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/a746f00e37da User: Tomas Mysik <tmysik@netbeans.org> Log: #235471 - AssertionError: cdnjs-cdnjs-754b27a/ajax/libs/package.json
I tried to update JS libs, new unexpected package.json was present. After IDE restart, I tried to create new project, try to search among JS files in JavaScript files step and then updated JS libraries and finished project creation. No AE, verified in trunk Please continue with integration to release74 as described in [1]. Thank you [1] http://wiki.netbeans.org/NetBeans_74_HighResistance Product Version: NetBeans IDE Dev (Build 201309090001) 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)
Fix transplanted to the releases repository, branch release74. Thanks. http://hg.netbeans.org/releases/rev/e17fa7347b70
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)