Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 429678 - no error displayed in UI when credentials are not being persisted
Summary: no error displayed in UI when credentials are not being persisted
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Target Milestone: 3.13   Edit
Assignee: Sam Davis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 347106 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-05 10:24 EST by Steffen Pingel CLA
Modified: 2015-04-13 13:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2014-03-05 10:24:09 EST
For unknown reasons my secure store got corrupted or at least can't store password any longer. This makes connectors fail. I can work around it if I re-enter passwords on every restart. The problem is though that it's not obvious that something is broken. Many errors are logged in the error log but there is no indication in the UI that something is a miss.


-- Error Details --
Date: Wed Mar 05 16:19:06 CET 2014
Message: Unexpected error accessing secure storage, falling back to in memory store for credentials. Some credentials may not be saved.
Severity: Error
Product: Eclipse SDK 4.4.0.v20140123-1600 (org.eclipse.sdk.ide)
Plugin: org.eclipse.mylyn.commons.repositories.core
Session Data:
eclipse.buildId=4.4.0.I20140123-1600
java.version=1.7.0_40
java.vendor=Oracle Corporation

Exception Stack Trace:
org.eclipse.equinox.security.storage.StorageException: No password provided.
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getModulePassword(SecurePreferencesRoot.java:304)
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesRoot.getPassword(SecurePreferencesRoot.java:224)
	at org.eclipse.equinox.internal.security.storage.SecurePreferences.get(SecurePreferences.java:262)
	at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.get(SecurePreferencesWrapper.java:106)
	at org.eclipse.mylyn.internal.commons.repositories.core.SecureCredentialsStore.get(SecureCredentialsStore.java:85)
	at org.eclipse.mylyn.tasks.core.TaskRepository.getAuthInfo(TaskRepository.java:306)
	at org.eclipse.mylyn.tasks.core.TaskRepository.getCredentials(TaskRepository.java:381)
	at org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage.createRepositoryCredentialsSection(AbstractRepositorySettingsPage.java:658)
	at org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage.createSettingControls(AbstractRepositorySettingsPage.java:466)
	at org.eclipse.mylyn.tasks.ui.wizards.AbstractRepositorySettingsPage.createControl(AbstractRepositorySettingsPage.java:330)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:174)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:757)
	at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:620)
	at org.eclipse.jface.window.Window.create(Window.java:432)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1115)
	at org.eclipse.mylyn.tasks.ui.TasksUiUtil.openEditRepositoryWizard(TasksUiUtil.java:204)
	at org.eclipse.mylyn.internal.tasks.ui.commands.OpenTaskRepositoryPropertiesHandler.execute(OpenTaskRepositoryPropertiesHandler.java:33)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:163)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:222)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:401)
	at org.eclipse.mylyn.commons.workbench.WorkbenchUtil.openProperties(WorkbenchUtil.java:246)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView$3.doubleClick(TaskRepositoriesView.java:181)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:849)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:847)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1487)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1254)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4171)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4014)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3653)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:615)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Comment 1 Sam Davis CLA 2014-03-07 18:10:42 EST
I'm not sure how we could detect this case given that the error is logged but no exception is thrown.
Comment 2 Steffen Pingel CLA 2014-03-12 05:34:01 EDT
(In reply to comment #1)
> I'm not sure how we could detect this case given that the error is logged but no
> exception is thrown.

Yes, we probably need API that propagates the exception or provide a way for the UI to get notified of the problem (e.g. through ErrorReporterManager).
Comment 3 Sam Davis CLA 2014-03-12 18:16:10 EDT
Sorry, I thought that exception was being caught in the platform code, but actually it's in Mylyn. We should probably throw the exception instead of logging it.
Comment 4 Sam Davis CLA 2014-08-19 17:08:51 EDT
We can't just throw the exception because that would prevent anything from working without a secure store.

I think displaying a message in the respository settings dialog saying that there's a problem with the secure store is enough, given that existing messages direct the user to the settings already:

31925: 429678: allow clients to test if secure store is available [Iefb1cc95]
https://git.eclipse.org/r/#/c/31925/

31926: 429678: no error displayed in UI when credentials are not being persisted [I1da7d1ae]
https://git.eclipse.org/r/#/c/31926/
Comment 5 Sam Davis CLA 2014-08-26 13:35:34 EDT
The tasks and build repository settings pages now display error messages when the secure store cannot be accessed.
Comment 6 Sam Davis CLA 2014-09-04 20:09:40 EDT
When certain plugins are disabled, no error is displayed. This fixes that:

32889: 429678: ensure key exists before testing secure store availability [I88eca012]
https://git.eclipse.org/r/#/c/32889/
Comment 7 Sam Davis CLA 2014-09-08 18:57:03 EDT
The change has been merged.
Comment 8 Sam Davis CLA 2014-11-28 12:45:18 EST
*** Bug 347106 has been marked as a duplicate of this bug. ***
Comment 9 Joerg Hohwiller CLA 2015-04-13 11:51:15 EDT
Just in case that someone cares:
I just got a vanilla Luna SR2 and get this error all over my Log with NO UI popup.

org.eclipse.equinox.security.storage.StorageException: Unable to locate secure storage module (org.eclipse.equinox.security.windowspasswordprovider).
	at org.eclipse.equinox.internal.security.storage.PasswordProviderSelector.findStorageModule(PasswordProviderSelector.java:190)
...
Comment 10 Sam Davis CLA 2015-04-13 13:36:30 EDT
Thanks for reporting that. It would help if you posted the entire stack trace so we could tell what is causing it.