Errors about not being able to connect to SonarQube were being displayed in Eclipse. I decided to delete my existing connection and reconnect to SonarQube, but the SonarQube binding wizard would not complete at the last step. I restarted Eclipse using consolelog and debug options:
.\eclipse\jee-2020-09\eclipse\eclipse.exe -consolelog -debug
When clicking Finish at the end of the wizard an exception was thrown and visible in the console log window (exception displayed below). I know my login credentials are good because I can go the web page https://sonarqube.di2e.net/ and authenticate with those same credentials to get access.
Using:
- Windows 10 Enterprise
- SonarQube version SonarLint for Eclipse 5.4.0.22606
- Eclipse IDE for Enterprise Java Developers (includes Incubating components)
Version: 2020-09 (4.17.0) Build id: 20200910-1200
Steps to reproduce:
- In open Eclipse project, Open Bind to SonarQube wizard by:
right clicking project > SonarLint > Bind to SonarQube or SonarCloud - Select SonarQube, then select Next
- Enter URL https://sonarqube.di2e.net/ …then select Next
- Select 'Username + Password" …then select Next
- Enter Username and Pazssword …then select Next
- Ensure the connection name is displayed in the box, mine is sonarqube.di2e.net …then select Next
6.Configuraton completed should be displayed along with a message indicating success - Click Finish to complete the wizard.
- Observe that the wizard doesn’t respond when clicking Finish
This problem also happens when using a token instead of username/password to authenticate.
What is happening is that Sonarlint is throwing an exception:
!ENTRY org.eclipse.ui 4 0 2021-03-15 18:36:33.714
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: Unable to store connection credentials in secure storage: No password provided.
at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacadeManager.storeCredentials(ConnectedEngineFacadeManager.java:272)
at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacadeManager.addServer(ConnectedEngineFacadeManager.java:257)
at org.sonarlint.eclipse.ui.internal.binding.wizard.connection.ServerConnectionWizard.performFinish(ServerConnectionWizard.java:217)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:472)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4195)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4012)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3612)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: org.eclipse.equinox.security.storage.StorageException: No password provided.
at org.eclipse.equinox.internal.security.storage.SecurePreferences.put(SecurePreferences.java:242)
at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.put(SecurePreferencesWrapper.java:128)
at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacadeManager.storeCredentials(ConnectedEngineFacadeManager.java:268)
... 33 more