Comments (19)
I'm having the same problem and spent a couple minutes deleting things and testing different accounts. It looks like it only crashes for me with accounts using app specific passwords (i.e. 2fa enabled) as I have two with 2fa and two without and it's consistent on the one machine I'm having this problem with. (I thought that #26 might be related but I see console spam without crashes, so probably just a coincidence in terms of timing.)
from mail-notifr.
I also have 2fa enabled, so maybe that is it? It was working ok for a while though.
from mail-notifr.
Guys if it's truly 2fa related then we're likely to reproduce this.
Any chance you would debug it in Xcode? If not I'll have to setup an account with 2fa enabled and try to reproduce the issue.
from mail-notifr.
Just wanted to drop a quick note before you look into 2fa: I think that was an unrelated coincidence, that's what I get for trying to find an easy workaround instead of actually debugging last night :)
I thought it was a heisenbug when I built and ran from source without a problem and the MAS version ran without a problem too a couple minutes ago. But I decided to check and backtracked to my inbox state last night when the crashing started and it definitely crashes on at least one Google+ "x added you" email and possibly a similar one that arrived a short while later in the other account (and no such emails in my non-2fa accounts). Not sure why I couldn't repro on my laptop last night if that's what's going on, but there's one (better) place to start looking and I'll try to debug if I have some time later today.
from mail-notifr.
I'd be happy to try to debug it in xcode, but I'm not familiar with doing so. If you give me a bit of direction, I can certainly follow it.
from mail-notifr.
@janeylicious Thanks for this info Jane. In worst case it could be a bug in code that needs to be fixed.
@lookfirst Since the traceback shows your version is 0.9.0, below is how to run that version locally in Xcode (you need to have CocoaPods installed):
In Terminal:
gem install cocoapods (or sudo gem install cocoapods)
git clone --recursive https://github.com/ashchan/gmail-notifr-objc.git
cd gmail-notifr-objc
git checkout v0.9.0
pod install
When above is done, go to gmailn-notifr-objc folder, find a file named 'Gmail Notifr.Gmail Notifr.xcworkspace' and click it. Xcode will open it.
In Xcode use 'CMD+R' to start running and debugging the app. It will reads your accounts in your current Gmail Notifr installation. Please choose allow when keychain asks for permission.
Now if it crashes, a detailed traceback will show in debug area (use menu View - Debug Area - Show Debug Area to show it if it's hidden).
If Xcode complains it cannot build it, just stop there. Xcode updates very frequently some versions might not be working anymore.
Thank you very much!
from mail-notifr.
Thanks for great directions. Followed them and it didn't crash. I then ran the original version that I have on my mac and it works too. So, my guess is that the subject line of an email was causing the issue?
from mail-notifr.
@lookfirst Thanks! I updated the comment correcting the tag name.
If it's subject line related, we'll be able to reproduce the issue by marking that email as unread in Gmail, then relaunch Gmail Notifr again.
from mail-notifr.
Yea, I have no idea which email it was that caused the issue though. ;-) Maybe look to add a bit more defensive programming around that block of code?
from mail-notifr.
From the stack trace...
grep -r "dictionaryWithObjects" *
Binary file Libs/Growl.framework/Growl matches
Binary file Libs/Growl.framework/Versions/A/Growl matches
Binary file Libs/Growl.framework/Versions/Current/Growl matches
I don't actually have Growl enabled for both accounts though.
from mail-notifr.
Yes, I believe if any value is nil then this dictionary construction throws exception:
https://github.com/ashchan/gmail-notifr-objc/blob/master/Classes/GNChecker.m#L233
from mail-notifr.
Okay, I figured it out. I also thought I pasted the particular XML causing problems in my previous comment, but guess I was in a rush and thought @lookfirst might do that.
On Google's end, the actual time and date on the emails (which on the second account had narrowed down to multiple emails) were something along the lines of
<issued>2014-03-09T02:30:00Z</issued>
and I was really confused as to why NSDateFormatter dateFromString: returned nil only for these timestamps. Subsequently after a little testing, it turns out anything between 2:00:00 and 2:59:59 will and I realized that I forgot to account for DST and that 2 to 2:59am does not exist on March 9, 2014 in the US as a result.
So it's one hell of an edge case (I see you have another one involving the time too, not sure if google returns 0-23 or 1-24 or 0-24 (lol)) and I don't know how you want to deal with that so I don't have a pull request for you, but there you go. 😄
from mail-notifr.
@janeylicious You make our day! I don't think I'll ever figure this out without your help.
Timestamps are difficult to parse. Instead of trying to deal with all edge cases (who knows what other time ranges will cause issue like this), I guess I'll just take care of the nil value by inserting a time.
from mail-notifr.
Not sure why you are parsing it yourself? There should be some objc library for doing that.
from mail-notifr.
@lookfirst that's what's being used right now at https://github.com/ashchan/gmail-notifr-objc/blob/master/Classes/GNChecker.m#L194, and NSDateFormatter with the currently defined locale doesn't like the timestamp being returned by Google (which would be okay in other locales).
Timestamps are definitely annoying to deal with in general though.
from mail-notifr.
I'm a java guy... we are lucky with joda time which handles all this stuff with ease. ;-)
from mail-notifr.
I made a quick dirty fix in df2a447. Please see if this fixes the issue.
What it did is returning an NSDate (1 hour before current time) if parsed date is NULL. Better return a valid but wrong date than nil which causes dictionary insert error.
As I didn't plan to upgrade the none app store version, if you guys are with 0.9.0 please let me know I'll send you redeem code for the store version.
Thanks!
from mail-notifr.
Thanks. I just bought the paid version, so hopefully there will be an update there soon. I have no problem supporting your hard work. ;-)
from mail-notifr.
@lookfirst I really appreciate your support. I'm going to add support for global 'Check All' shortcut in the weekend. So if everything goes smoothly I'll be able to submit a new version next week.
from mail-notifr.
Related Issues (20)
- No podspec exists at path HOT 2
- Not working on OS X El Capitan Developer Beta 3 HOT 1
- Does't work in OS X 10.11 (El Capitan) public beta HOT 2
- The application 'Google Chrome' is not open anymore. HOT 2
- Add support for Gmail OAuth login (not password) HOT 7
- 2.0.0 TODO HOT 1
- Sound is played even if there's no new messages HOT 1
- Account gone after restart HOT 11
- Feature request: sort the accounts HOT 4
- Menu bar icon is slightly lower than it should be HOT 4
- Email opens inside "All mail" folder instead of "Inbox" folder HOT 3
- Opening inbox or email in Safari creates a new Safari window HOT 1
- Open in browser setting does not work for Safari HOT 4
- Allow user to set which Google account to use for each Notifr account
- Where's version 1.3.5? HOT 1
- FEATURE: Option for hiding app icon in dock HOT 1
- Improvement: Nicer menubar icons HOT 2
- Mailto handler is not working
- Google: Use of Restricted Gmail API scopes may require additional verification steps
- Notification text contains HTML entities
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 mail-notifr.