Keychain problems with version 1.1 #2268

Closed
jamesharvard opened this Issue Oct 5, 2015 · 14 comments

Projects

None yet

4 participants

@jamesharvard

[MacOS 10.6; perhaps related to #2251?]

I have a connection favourite saved that uses an SSH tunnel. Since upgrading to v1.1 I get a prompt when connecting that says:

The SSH password could not be loaded from the keychain; please enter the SSH password for SequelPro-xxxxxxxxxx: password-prompt-here

It works fine if I enter the password when prompted. I've also tried modifying the connection (by ticking & unticking the 'connect using SSL' box, which triggers the 'save changes' & 'test connection' buttons to shows) but I get this error:

Error adding password to Keychain
An error occured while trying to add the password to your Keychain. Repairing your Keychain might resolve this, but if it doesn't please report it to the Sequel Pro team, supplying the error code -25299.

@dmoagx
Collaborator
dmoagx commented Oct 5, 2015

-25299 means "Duplicate item". Try opening Keychain access.app and search for the item (by username or host name). If there are two items with exactly the same name, try deleting one.

@dmoagx dmoagx added the WaitingOnUser label Oct 5, 2015
@jamesharvard

OK, that explains why I can't re-save the connection's SSH password, but presumably it does not explain why Sequel Pro is giving an error when trying to read it in the first place?

@rowanbeentje
Collaborator

There's also a range of keychain bugs where if an item is changed, it may not be accessible for the rest of the keychain session (until a restart of OS X or whatever underlying system controls access...). I've usually seen it manifest as a blank password result rather than an error though.

@jamesharvard

I've restarted, and removed both the SSH and MySQL passwords from the keychain. Once I removed the MySQL password (ie not just the SSH password) I could re-save the connection. However I still get an error message saying that the SSH password could not be loaded from the keychain.

Could it be that the Sequel Pro v1.1 is failing to use the right/separate identifier for the SSH password, as opposed to the MySQL password? I notice that both passwords in the keychain have the same long integer in their name.

screen shot 2015-10-05 at 14 21 08

@rowanbeentje
Collaborator

The long integer is used as an identifier for the connection, so that connections with the same name don't have conflicts (although it is a bit long on 64bit!). The "SSHTunnel" in the name looks like it's using the right identifier to me...

@jamesharvard

OK, well for whatever reason v1.1 seems unable to get the SSH tunnel password from Keychain on my Mac OS 10.6.

If the connection drops (e.g. when my broadband dropped a few minutes ago) then Sequel Pro is unable to reconnect and opens a password prompt as per the screenshot attached.

I also don't seem to be able to command-tab to the application, as if it's frozen. However it doesn't show as 'not responding' if I right-click the icon in the dock.

Will have to revert to the old version of the app, I think :-(

screen shot 2015-10-05 at 16 39 49

@jamesharvard

Also, I can confirm that this was not just a problem with one particular connection. I have another connection to a different server that also uses an ssh tunnel, and this exhibited the same problem.

@dmoagx
Collaborator
dmoagx commented Oct 5, 2015

Since 1.0.2 there has been only one commit related to keychain code, related to the OS X SDK version:
834724b

This could be related, but I checked 10.6 a few weeks ago and it worked for me.

@dmoagx
Collaborator
dmoagx commented Oct 5, 2015

Just tried it on 10.6 and can reproduce.
What is a bit strange though, is that it only affects SSH. Getting the MySQL password from Keychain works fine.

@dmoagx dmoagx added a commit that closed this issue Oct 5, 2015
@dmoagx dmoagx Fix broken keychain access with SSH on 10.6 (fixes #2268)
(From the department of commits to be rolled back soon)
31de04a
@dmoagx dmoagx closed this in 31de04a Oct 5, 2015
@dmoagx dmoagx added a commit that referenced this issue Oct 5, 2015
@dmoagx dmoagx Fix broken keychain access with SSH on 10.6 (fixes #2268)
(From the department of commits to be rolled back soon)

Conflicts:
	sequel-pro.xcodeproj/project.pbxproj
0f5ae46
@dmoagx dmoagx reopened this Oct 5, 2015
@dmoagx dmoagx added this to the 1.1.1 milestone Oct 30, 2015
@jamesharvard

I (and presumably others using 10.6, maybe other OS versions too) am unable to update to the latest security release http://www.sequelpro.com/release-notes#release_1.1.0.1 because of this show-stopping bug. Any chance this could be prioritised for release, please?

@jamesharvard

Further to this, I assume the best solution is to disable automatic update checks for the time being?

@mnfgul
mnfgul commented Feb 17, 2016

Hi, I have the same problem on mac os el capitan. It was working before but now whenever i try to connect a db it ask me to allow key chain access and it freezes. Is there any solution for this? Thanks for help.

@jamesharvard

Hello, @mnfgul, my experience was that I had to downgrade to the previous version (the old version of the app is placed in 'Trash' during the upgrade, so you can just drag it back to the Applications folder).

@dmoagx
Collaborator
dmoagx commented Feb 20, 2016
@dmoagx dmoagx closed this Feb 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment