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 228566 - JavaScript library download fails non-gracefully after network failure
Summary: JavaScript library download fails non-gracefully after network failure
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 228823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-15 12:48 UTC by Petr Jiricka
Modified: 2015-05-05 03:30 UTC (History)
2 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 Petr Jiricka 2013-04-15 12:48:20 UTC
1. Start NetBeans in an environment with direct internet connection
2. Move the computer inside an environment that requires proxy (e.g. by plugging in the network cable in the Oracle office)
3. Choose JavaScript Files in the properties of a HTML5 project
4. Select a JavaScript file from the list and add it to the project
5. Confirm the dialog

=> The IDE will display the "Downloading selected JavaScript libraries..." progress bar for a long time (while the Saving Project data dialog is also opened). At the end it will fail, displaying dialog "These JavaScript libraries failed to download: .... More information can be found in IDE log". At the same time an empty JavaScript file will be created in the project.

The correct behavior should be:
- the failure notification dialog should allow the user to set a proxy
- no empty file should be created after failure
- maybe the timeout should also be shorter, currently it takes a long time to fail
Comment 1 David Konecny 2013-04-22 22:11:12 UTC
*** Bug 228823 has been marked as a duplicate of this bug. ***
Comment 2 David Konecny 2013-04-22 22:12:03 UTC
Neither library folders should be created when download failed.
Comment 3 Tomas Mysik 2013-04-23 06:35:12 UTC
Also ensure that downloading JS libs does not block saving of project properties - see issue #228823.
Comment 4 Tomas Mysik 2013-05-15 07:12:51 UTC
Fixed - proxy button added, no empty files or folders [1], connection timeouts set.

http://hg.netbeans.org/web-main/rev/6ebcac873332

[1] Unfortunately, since the API uses FileObjects, the folders are always created but they are safely removed on error. Let me know if this is not OK, I will change the API (IMHO the current state is fine, it should not be common to have download problems).
Comment 5 Quality Engineering 2013-05-16 02:28:14 UTC
Integrated into 'main-golden', will be available in build *201305152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6ebcac873332
User: Tomas Mysik <tmysik@netbeans.org>
Log: #228566 - JavaScript library download fails non-gracefully after network failure