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.
Summary: | Plugins can't be installed through Plugins Manager if User Account Control is turned on | ||
---|---|---|---|
Product: | platform | Reporter: | el_diego <el_diego> |
Component: | -- Other -- | Assignee: | t_h <t_h> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, dlipin, gvasick, krajeswaran, mmirilovic, petersl, pgebauer, rmatous, tspiva |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
cnd-error.png
uninstalled-plugin-error-messages.log |
Description
el_diego
2007-11-16 22:40:20 UTC
Thanks for submitting the issue. I tried this but not able to reproduce it. Did you have NB installed by the same user (eg, Administrator) installing the UML plugin? Did you start NB in a fresh userdir? The account I'm using to install both the IDE and the plugins is an account with administrator rights. I installed 6.0 beta 2 fresh a couple of weeks ago and tried the uml plugin with the same result as above. I did not report it at the time. Yesterday I uninstalled beta 2 and installed rc1, tried to install the uml plugin and then reported the issue. The user-dir is new to the 6.0 rc1 installation. More info from the about dialog: Product Version: NetBeans IDE 6.0 RC1 (Build 200711131200) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows Vista version 6.0 running on x86; Cp1252; sv_SE (nb) Userdir: C:\Users\Fredrik\.netbeans\6.0rc1 I uninstalled my previous 6.0 RC1 and downloaded the full installer where the uml plugin is integrated. I had no problem with the uml plugin and it seems to work as far as I can see. I have similar problem with RC1 and RC2. I installed JavaSE version then tried to add a couple of plugins (UML, Ant documentation, Platform documentation, ...). I am getting following error when I try to start NetBeans: Warning - could not install some modules: UML Palette - The module named org.netbeans.modules.uml/1 was needed and not found. UML Properties - The module named org.netbeans.modules.uml/1 was needed and not found. UML Project - The module named org.netbeans.modules.uml/1 was needed and not found. UML Code Generation - The module named org.netbeans.modules.uml/1 was needed and not found. UML Drawing Area - The module named org.netbeans.modules.uml/1 was needed and not found. UML XML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML DOORS Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML IDE Integration - The module named org.netbeans.modules.uml/1 was needed and not found. UML - The module named org.netbeans.modules.uml/1 was needed and not found. UML Web Report - The module named org.netbeans.modules.uml/1 was needed and not found. UML Samples - The module named org.netbeans.modules.uml/1 was needed and not found. UML Java 5.0 Parser - The module named org.netbeans.modules.uml/1 was needed and not found. UML Design Center - The module named org.netbeans.modules.uml/1 was needed and not found. UML Doc Control - The module named org.netbeans.modules.uml/1 was needed and not found. 10 further modules could not be installed due to the above problems. When I click "Disable and Continue" NetBeans starts UML is disabled but other plugins that I added seems to work fine. This problem is still present in final release of 6.0. Can you provide a the IDE Log File taken from the session where the problem occurred? Thanks, George Ok. I just got my new Vista system and I now can reproduce this issue. Below is the exception. The issue seems to be a permission problem. I found this by trying to edit netbeans.conf from the NB's etc directory so that the ide userdir is pointing to a different location but saving the changes to the file got me a permission access denied problem, even though I installed nb 6 with the same user account that has adminstrator role. java.io.FileNotFoundException: C:\Program Files\NetBeans 6.0\uml4\modules\DoorsIntegrationFiles\configDoors.vbs (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:375) at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:128) Warning - could not install some modules: UML Java 5.0 Parser - The module named org.netbeans.modules.uml/1 was needed and not found. UML Palette - The module named org.netbeans.modules.uml/1 was needed and not found. UML IDE Integration - The module named org.netbeans.modules.uml/1 was needed and not found. UML IDE Integration - The module UML Project would also need to be installed. UML IDE Integration - The module UML Properties would also need to be installed. UML IDE Integration - The module UML Requirements would also need to be installed. UML Samples - The module named org.netbeans.modules.uml/1 was needed and not found. UML Samples - The module UML Project would also need to be installed. UML XML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML Project - The module named org.netbeans.modules.uml/1 was needed and not found. UML Project - The module UML Doc Control would also need to be installed. UML Project - The module UML Properties would also need to be installed. UML Design Center - The module named org.netbeans.modules.uml/1 was needed and not found. UML Design Center - The module UML Project would also need to be installed. UML Web Report - The module named org.netbeans.modules.uml/1 was needed and not found. UML Web Report - The module UML Project would also need to be installed. UML DOORS Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML - The module named org.netbeans.modules.uml/1 was needed and not found. UML - The module UML Code Generation would also need to be installed. UML - The module UML Design Center would also need to be installed. UML - The module UML Doc Control would also need to be installed. UML - The module UML DOORS Requirements would also need to be installed. UML - The module UML Drawing Area would also need to be installed. UML - The module UML IDE Integration would also need to be installed. UML - The module UML Java 5.0 Parser would also need to be installed. UML - The module UML Palette would also need to be installed. UML - The module UML Project would also need to be installed. UML - The module UML Properties would also need to be installed. UML - The module UML Requirements would also need to be installed. UML - The module UML Samples would also need to be installed. UML - The module UML Web Report would also need to be installed. UML - The module UML XML Requirements would also need to be installed. UML Drawing Area - The module named org.netbeans.modules.uml/1 was needed and not found. UML Drawing Area - The module UML Palette would also need to be installed. UML Drawing Area - The module UML Project would also need to be installed. UML Drawing Area - The module UML Properties would also need to be installed. UML Code Generation - The module named org.netbeans.modules.uml/1 was needed and not found. UML Code Generation - The module UML IDE Integration would also need to be installed. UML Code Generation - The module UML Project would also need to be installed. UML Code Generation - The module UML Properties would also need to be installed. UML Properties - The module named org.netbeans.modules.uml/1 was needed and not found. UML Properties - The module UML Doc Control would also need to be installed. UML Doc Control - The module named org.netbeans.modules.uml/1 was needed and not found. UML Requirements - The module named org.netbeans.modules.uml/1 was needed and not found. UML Requirements - The module UML Design Center would also need to be installed. *** Issue 123329 has been marked as a duplicate of this issue. *** Instead of filing a new issue, I'm re-categorizing this to the auc component. This was started with UML that several UML users were having problem installing the UML Plugin through the Plugin Manager on their Vista systems. The real issue is that Vista has the User Account Control (UAC) turned on by default which prevents the same users installing NetBeans from installing plugins due to permission problem. I have tried installing the C/C++ Plugin too when my UAC was on and got the same problem (see attached screenshot named "cnd-error.png"). So, this issue is not specific to the UML Plugin itself. After turning off UAC so I could install the UML and C/C++ Plugins, then turning on UAC will give me the same kind of permission problem uninstalling these plugins. See attached ide log file for this (uninstalled-plugin-error-messages.log) In the case of UML, the behaviour is also seen in Windows XP when the ide is installed as administrator but later the uml module update is done globally by another user. This suggests that it is not a Vista specific problem but really some underlying permissions issue and that some code in au-client should be checking for permissions... ==>>> Since there are several users running into this issue, the release note should be updated to include this issue. Created attachment 54104 [details]
cnd-error.png
Created attachment 54105 [details]
uninstalled-plugin-error-messages.log
Reassigning to 'jkovalsky' from issues@uml . Jiri: This may not be an update center issue per se, but autotupdate client issue. If so, please reassign to autoupdate component. Sorry for creating a duplicate (http://www.netbeans.org/issues/show_bug.cgi?id=123329) of this issue. Hopefully resolution won't end just with installation/release note that one has to turn UAC off. Maybe UAC prompt can be triggered by plug-in (un)installation, so that (un)installation gets performed only if user has proved to have required rights. Jirko, can Plugins Manager do something about this problem? Thanks for your evaluation! I'm going to evaluate the problem on Vista. On other platform it works for me. I let you know ASAP. *** Issue 123675 has been marked as a duplicate of this issue. *** *** Issue 123928 has been marked as a duplicate of this issue. *** The cause: New Security Features in Windows Vista. You must have administrator privileges to install files into c:\program files\. If you had installed netbeans in your home, then you wouldn't have any problems. Of course its common to install programs into "Program Files" folder on Windows, but then if you want to modify your installation (e.g.add additional plugins via Plugin Manager), then you need to have administrator privileges - can be achieved e.g. by using "Run as Administrator" action from popup on Netbeans shortcut on desktop. As soon as you finish installation(including restart if required), then you can use netbeans again without administrator privileges. Because this security feature is new there was introduced mechanism for ensuring backward compatibility, which obviously doesn't work 100%. When one starts installation of NetBeans (or any other program) under Vista into Program Files folder, window pops-up asking administrator to confirm or deny installation. If one confirms, application installation has rights to write into Program Files and installation continues. Why couldn't similar thing happen when adding plug-ins? E.g. after downloading plug-in, upon NetBeans restart window would have to pop-up for administrator to confirm. If confirmed installation of plug-in would continue, otherwise NetBeans could disable plug-in. When user tries to activate disabled plug-in that needs to be installed in Program Files, similar scenario is needed. Question is if it is a bug in NetBeans or in Vista that this already doesn't happen? Just guessing, maybe there is API in Vista that has to be called to trigger this kind of behaviour (ask for administrative privileges for a process). If Vista is supposed to do this automatically when someone tries to access protected resources, then its a bug in Vista. Quite often I've had similar problem with XP and Vista regarding windows firewall - sometimes windows would alert that application is trying to communicate on some port and would offer to open port for that application, but sometimes it decides just to be silent. Yes, I agree with sslavic. Even using the Adminstrator account which has all permission needed to write to the "Program Files" folder still has this problem. The Plugins Manager should be checking into the permission thing similar to how other programs that work properly. >Even using the Adminstrator account which has all permission needed to write to the "Program
>Files" folder still has this problem.
Yes, this is new Vista security feature (UAC ON, Admin Approval Mode which is on as dfault) .
There are a few ways how to request elevated execution level which is probably what you had in mind mentioning other
programs that work properly. The most strange and simple is to rename netbeans.exe to setup.exe (or alternatively
"setup", "install", "update", "patch"). Very strange to me, the same as virtualization or file redirection, "program
files" seems to be writable (at least File.canWrite in java returns true) and if you create files in "progam files"
folder the files are created in other virtual folder in your home. This behavior causes e.g. bug in JDK impl. for system
Preferences(API) because they are stored effectively per user and cannot be shared(which is purpose for system
preferences)
Vista nightmare continues. While searching why after upgrade a text editor suddenly began triggering UAC screen each time it was started, I found an information on support forum ( http://sourceforge.net/forum/forum.php?thread_id=1890149&forum_id=331754 ) that might be interesting to have this NetBeans issue resolved. Some sort of Vista manifest file (?!) seems to be solution/problem. After finding out about this manifest file, I've found several blogs that contained more information and here are several: http://koobmeej.blogspot.com/2006/11/cc-and-windows-vista-woes.html http://www.gregcons.com/KateBlog/CommentView.aspx?guid=682d4de9-572f-4a18-b822-19069e50410f http://blogs.msdn.com/cheller/archive/2006/08/24/how-to-embed-a-manifest-in-an-assembly-let-me-count-the-ways.aspx http://www.codeproject.com/KB/vista-security/UAC__The_Definitive_Guide.aspx Java developers, beware of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6410605 and related bugs. Agree with your latest comment. Here is my evaluation. Problem occures: - if Windows Vista - if installed not in user's home (the most common installation is in "Program Files") - if Admin Approval Mode is ON (as default) - if virtualization of file and registry is ON (as default) How plugin manager works: - if write permission for install dir => installed into install dir - if not => installed into user dir Above mentioned behavior doesn't work because of file virtualization - in other words PM doesn't know about the lack of write permission Suggested fix: - fix launcher - the primary goal is to switch off file virtualization. Adding manifest file into launcher seems to be right solution. Reassigned to core/code to fix windows launcher. There is no expected fix for Plugin Manager. Recommended workaround until its fixed: - use "Run as Administrator" action from popup on Netbeans shortcut on desktop (make this permanent - see advanced properties "Run as Administrator" ) Thanks rmatous! I agree with your evaluation and workaround. Before it's fixed, I'd request to have this issue and workaround added to the release note on the web, or at least a FAQ item. Thanks! We have added the following FAQ item that is related to this issue: http://wiki.netbeans.org/wiki/view/FaqInstallPluginVista *** Issue 124012 has been marked as a duplicate of this issue. *** Adding manifest can solve the problem, indeed (we had similar issue in NBI, Issue 102168). We had big problems with adding that manifest to the installer launcher executable for NBI (Netbeans Installer) using gcc and windres. To be honest, we failed to do that. The manifest was added (using RT_MANIFEST in resource file) to exe file but Vista thought different. The solution (for us) was using Microsoft compiler and rc.exe from MS Visual Studio C++ 2005 Express, manifest tool (mt.exe) was used from Microsoft Platform SDK (to fix Issue 109099). Afaik netbeans.exe is now compiled using gcc (under cygwin) so be prepared to solve similar problems.. Not so long ago we have found a (hopefully) correct solution so that we can now correctly add the manifest to exe file using gcc/windres but honestly we still use MS tools. If you are interested - pls have a look at nbi/engine/native/launcher/windows. We had there 2 makefiles - one for gcc/cygwin and the other for MS VC. Adding manifest cannot solve the problem. If manifest (with asInvoker access rights) is added to netbeans.exe and/or nbexec.exe these processes runs without folder virtualization. However, once java.exe is invoked by nbexec.exe it runs with folder virtualization enabled. It would be necessary to add manifest to java.exe itself which is not possible. If manifest with Level=”requireAdministrator” is added it solves the problem with virtualization (because all process created (e.g. java.exe) can run with administrative rights as well and therefore virtualization is disabled for them by default). Problem is that each time netbeans are started, elevation dialog box appears requesting user confirmation for running with administrative rights. This would be very annoying for user. So, solution is to disable virtualization explicitly for java.exe process by modifying its token via SetTokenInformation() in nbexec.exe). Changes: http://hg.netbeans.org/main/rev/e902415c82f4 Verified in build #200802041203. *** Issue 127174 has been marked as a duplicate of this issue. *** *** Issue 128517 has been marked as a duplicate of this issue. *** *** Issue 128934 has been marked as a duplicate of this issue. *** *** Issue 129011 has been marked as a duplicate of this issue. *** *** Issue 132232 has been marked as a duplicate of this issue. *** |