Comments (20)
can you repro this every single time?
from yubiswitch.
I tried it twice with the same results. My buddy @zerowidth also had an immediate crash when he fired up the application. We are sitting across the table from each other right now.
from yubiswitch.
mmm mkay, can you guys trying to delete ~/Library/Preferences/*.yubiswitch.plist and try again?
from yubiswitch.
Application crashes because of an uncaught Exception:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aKeyEquivalent != nil' abort() called`
I'll dig a bit more in deep tomorrow (I'm on GMT timezone).
from yubiswitch.
@pallotron unfortunately there was no ~/Library/Preferences/*.yubiswitch.plist
entry to delete
from yubiswitch.
does the previous release work?
from yubiswitch.
do you see anything when typing defaults read pallotron.yubiswitch
?
e.g.:
$ defaults read pallotron.yubiswitch
{
hotkey = {
characters = "\\U00a5";
charactersIgnoringModifiers = y;
keyCode = 16;
modifierFlags = 1572864;
};
startAtLogin = 1;
switchOffDelay = {
enabled = 1;
interval = "10.0";
};
}
from yubiswitch.
try to replace ~/Library/Preferences/pallotron.yubiswitch.plist
with a copy taken from http://blog.angelofailla.com/download/pallotron.yubiswitch.plist
from yubiswitch.
Here are the steps I took based upon your suggestions and the results for each step.
Defaults
➙ defaults read pallotron.yubiswitch
2014-03-24 09:29:05.252 defaults[9883:507]
Domain pallotron.yubiswitch does not exist
Release v0.3
This release did work. I was able to enable / disable the yubikey nano. After installing this release there were defaults installed under the pallotron.yubiswitch
domain. There was also a .plist file in the ~/Library/Preferences
folder.
Release v0.5
With the success of the previous release I installed v0.5, and it still crashed immediately upon startup with the same NSInternalInconsistencyException
.
New .plist File
With v0.5 installed, I downloaded the .plist file from the link you provided and installed it to ~/Library/Preferences/pallotron.yubiswitch.plist
. The same crash on startup happened.
So v0.5 is simply not working for whatever reason on this machine
from yubiswitch.
meh,
ok i'll send you a dmg later that will catch and ignore that NSInternalInconsistencyException exception. i'm curious to know if ignoring that exception will get you a working application.
from yubiswitch.
I was able to reproduce the same error, including after each step that @TwP tried.
I don't know ObjC very well, but I poked around with the debugger and isolated the problem to this line: https://github.com/pallotron/yubiswitch/blob/master/yubiswitch/AppDelegate.m#L107-L108
NSDictionary* hotkey = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:@"hotkey"];
When this runs, it's getting nil
from NSUserDefaults for that "hotkey" key, and the subsequent call to set the menu item key equivalent fails because there's no value:
[[statusMenu itemAtIndex:0]
setKeyEquivalent:[hotkey valueForKey:@"charactersIgnoringModifiers"]];
I don't know how the NSUserDefaults system works or how your computer got a "hotkey" dictionary set, but it would appear that neither my nor @TwP's computers have a value there.
from yubiswitch.
Sorry for the delay in responding.
I've created a dmg in which I added the default values for the hotkey dictionary at https://github.com/pallotron/yubiswitch/blob/master/yubiswitch/DefaultPreferences.plist as showed below.
Can you please download the dmg at http://blog.angelofailla.com/download/yubiswitch_0.5.dmg then install it and let me know if it works?
+ <key>hotkey</key>
+ <dict>
+ <key>charactersIgnoringModifiers</key>
+ <string>y</string>
+ <key>keyCode</key>
+ <integer>16</integer>
+ <key>characters</key>
+ <string>\U00a5</string>
+ <key>modifierFlags</key>
+ <integer>1572864</integer>
+ </dict>
from yubiswitch.
if you install that dmg and it works, then go to preference, change the hotkey or any other parameter, then quit the app and you should see the preference file appearing in your ~/Library path
from yubiswitch.
@pallotron happy to report that the new application works!
from yubiswitch.
#successkid
i'll commit and push to the remote repo now :)
from yubiswitch.
released 0.6 -> https://github.com/pallotron/yubiswitch/releases/tag/v0.6
thanks people and sorry if it took so long. enjoy!
from yubiswitch.
from yubiswitch.
As a follow-up, the new applescript support means I can put an "KeyOn" command in my ssh aliases for servers that require yubikey, saving me clicks and typing. Such a great tool, thanks for sharing it!
from yubiswitch.
@zerowidth : do you use a LocalCommand setting in ~/.ssh_config
or just an alias or bash function?
from yubiswitch.
I run it as part of a bash function to run it before the ssh command. AFAIK LocalCommand wouldn't run until the ssh session was completely established, which requires my yubikey...
from yubiswitch.
Related Issues (20)
- removed
- evgtlindvjiublvjfeiikdhkhgcteeugrivh
- inadvertently opened issue - ignore
- "Automatically switch off Yubikey" turns on Yubikey after lockscreen HOT 2
- ccccccvkvhhejrinvubnvdlnbthrrtvuvgcvffnthtgf HOT 2
- Release new binaries for Apple Silicon HOT 13
- Feature Request: Allow multiple productID/vendorID pairs HOT 1
- Support for Yubikey 5C HOT 1
- menu bar icon is always black, hard to see on dark backgrounds HOT 1
- eieecchrvjhbgbgnjftcbkefbcghkttelnelincbkjbk HOT 4
- Global hotkey doesn't respect different keyboard layouts, only QWERTY HOT 2
- App is not notarized HOT 4
- YubiSwitch not disabling Yubikey nano on macOS 12.6 HOT 7
- yubikey is not disabled automatically HOT 7
- Doesn't work for my yubico on MacOS Monterrey HOT 11
- "Input Monitoring" permission required HOT 7
- XPC error: Connection invalid HOT 1
- [MISTAKE]
- Incorrect toggling behavior with "auto switch off Yubikey" enabled HOT 1
- Feature Request: Enable yubikey when connected to an external monitor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yubiswitch.