Comments (15)
Although I can read and understand code, I am not a programmer myself.
I won't be able to verify or do commits for the script, but if I can help out with translations or testing, hit me up.
For translations, I can do EN, NL, FR, DE. Did software translations for Bullzip PDF printer and Piriform products (CCleaner, Speccy, Recuva ...) in the past.
Also done/doing (beta-)testing for lots of software.
from googlecontactseventsnotifier.
@88scythe
That's great!
Testers are a great resource to have: at the moment this is the only development branch going on and it's quite early in its life, so testing is needed for sure. As I wrote in #55 trying this version could solve your issue as well (let's hope 😉).
If you want to be sure to read the edit on my first message: it has an important note regarding a step that is required to make this version work.
As per the translations: as you probably have already noticed French and German are already present (although if this branch is merged they, along with all the other languages, will need a slight update), while we do not have a NL translation at the moment.
You can contribute with a translation at any time, although I suggest waiting until the fate of this branch has been decided so as not to do some double work.
The best way to contribute (for translations as well as fixes) is to open a PR with git: if you don't know how to use git @rowanthorpe has written a wonderful first-steps guide. If you still don't want to use it you can just open an issue and post the translation there: we will take care of merging it into the code, although the first method is preferrable if possible.
I'll let you know by mentioning you in any issue/PR that requires a translation or testing.
Thank you a lot!
from googlecontactseventsnotifier.
While reading the code it looks alright (code always look alright while reading until you see that half of it doesn't work xD).
I'll do some tests today and if I found some bugs I'll try to fix it (my problem with that is I've never used Google API so I don't know how it works exactly).
from googlecontactseventsnotifier.
@GioBonvi
So I've done some tests and it looks like there's a problem with contacts that don't have an email address - currently, it terminates script with error 'can not run function replace of null' or something like that (line 1100).
I did some 'workaround' for that (commit 9664b14 on major-rewriting branch in my fork), but it ends up sending emails with null in place of an email address (but the mail is sent). I can look for better solution but keeping in mind that you know this code and how Google API works better it would be a lot easier for you to resolve the bug.
Addressing the issue #48 it sends mails for ppl with only g+ birthday correctly or at least I think so because I don't have anyone with year provided on g+ to test this case. For ppl with only day and month it works OK (mail with info, but without age).
I also did the function to send mails for every day in 2017 (to test every event that I have in contacts). I guess it may be useful for future so it's in commit 0048666 in the same branch.
I can open a PR for either (or both) of them if you think that they may be useful in future.
from googlecontactseventsnotifier.
@baatochan Whoops, I forgot to test contacts without emails.
The problem was not in the Google API, but in my DataCollector
structure.
I expected a contact without emails to have a 0-length email list (if you look at the code you'll see I had already prepared the script for this eventuality), but instead a contact without emails will have a single email in its list with all the fields null.
This means that the problem can be solved by tweaking the Contact.addToField()
method so that it requires a DataCollector object to have at least one non-empty property to be added to the contact's field.
I am pushing the fix to major-rewriting
right now.
Thank you!
from googlecontactseventsnotifier.
That was the only bug that I found so I guess it looks kinda OK. Maybe others should do some tests as well.
from googlecontactseventsnotifier.
Tested the major-rewrite branch.
No issues found so far, only a doubt:
Logs show:
[11-09-2017 08:16:14 Europe/Paris]I: Extracting info from raw event object...
[11-09-2017 08:16:14 Europe/Paris]I: Extracting info from Google Contact...
[11-09-2017 08:16:16 Europe/Paris]W: Invalid Google Contact ID: 2810eb950a0bbc67
[11-09-2017 08:16:16 Europe/Paris]I: Extracting info from raw event object...
[11-09-2017 08:16:16 Europe/Paris]I: Extracting info from Google Contact...
[11-09-2017 08:16:40 Europe/Paris]W: Invalid Google Contact ID: 37c89322887d84bb
[11-09-2017 08:16:40 Europe/Paris]I: Extracting info from raw event object...
[11-09-2017 08:16:40 Europe/Paris]I: Extracting info from Google Contact...
[11-09-2017 08:17:02 Europe/Paris]W: Invalid Google Contact ID: 61fd19a08e5747a8
Wondering if the "Invalid Google Contact ID" is normal?
The resulting mail looked fine.
from googlecontactseventsnotifier.
That message means that the ID was retrieved from the event, but when the script tried to use it to access the contact it failed. I had this happen to me with the Google Profile ID (I think the problem was that the contact once had a Google Plus profile and now he deleted it, but the profile ID waas kept in the contact).
What looks suspicious to me is that you had this happen multiple times...
You might want to check that you settings.user.googleEmail
value is correct.
from googlecontactseventsnotifier.
That value was correct but it contained a capital letter. Changed it to all lowercase, and the error wasn't logged anymore.
Changed it back to the original situation (with capital letter in email address), error didn't return.
Strange but the good thing is that it works ... :)
from googlecontactseventsnotifier.
Sorry for the late reply - I was "offline" a lot recently.
I just posted a PR against major-rewriting
branch based on proofreading/running/testing it. The commits should be self-explanatory.
I debated adding the commits for updating the README
(to match the new layout) and for Greek translations (due to the moving-target nature of the branch), but figured it took no extra time seeing I was reading through anyway.
For the latest version including my commits in that PR, I ran the unit-tests.gs
and ran the test()
function against a date with a few birthdays on it, and all seemed fine. I ran out of time to fuzz-test lots of silly edge-case contacts' configurations though - but because the main changes are the Google+ handling, and because I don't even use Google+ - thorough testing is probably best left to other testers anyway.
The only hiccup I struck was that the first time I ran notifStart()
it took quite a while running function notifStart()
, and then threw an exception saying that the Europe/Athens
timezone was invalid (yeah... WTF). Every time I tried to recreate that "error" since then it worked just fine though, so I am completely confused by it - my best guess is that it was just a transitory network-error which caused the relevant function to timeout and "fail", which just happened to throw that function's exception as a red-herring.
from googlecontactseventsnotifier.
Because of branch name change (major-rewriting -> development) there's an error on line 178
EDIT: I've committed the required change to my fork. I don't want to open a pull request, just cherry-pick that one commit.
from googlecontactseventsnotifier.
I also found 3 bugs.
First one (more important in my opinion) is when contact has an email address or phone with no label or label 'other' the send mail looks like that:
There is no label in sent email for that.
Second bug is that this contact have a profile pic, but it haven't been extracted or something and the mail has stock image. Don't know how to investigate it further.
Third bug is about g+ contacts. I have a contact with no birthday info, but the birthday (with year) is provided on g+. Mail is sent correctly, but the age is not calculated.
from googlecontactseventsnotifier.
Because of branch name change (major-rewriting -> development) there's an error on line 178
Yes, sorry for that: I was working on the branch merging PRs and solving some issues I found was not fully paying attention to what I was doing and fast-forwarded the development branch without pushing some commits. Fixxing that now.
I'll give a look into the two bugs.
EDITS:
Bug n° 1:
the problem seems not to be on our side: from what I can see for emails and phone numbers with "OTHER" label field.getLabel()
return ''
(empty string) instead of ContactsApp.ExtendedField.OTHER
and DataCollector
objects treat empty strings as nulls, as they bear no real information (which is true, as an empty label is indistinguishible from a OTHER label).
If this is true (it'd better to have a second hand confirmation) there is not much we can do regarding this problem.
Bug n°2:
The Contact API offers no method to retrieve the profile image of a given contact, so the script relies on the Google+ API (which obviously works only if the contact has a Google+ profile) and on the goo.contactsPhotoUrl
field of the raw event data. Could you please try investigating your problematic contacts (just log eventData['goo.contactsPhotoUrl']
on line 220 and see if it contains any meaningful value).
Bug n°3:
You'll have to dig some more information about this behaviour by yourself, because I manually tested all my G+ contacts and everything works fine... Try adding some logging in the getInfoFromGplus()
function and see if the birthday date is retrieved correctly and where the error could be.
I'd consider bug 1 closed if anyone can confirm my observations, while you might want to open n°2 and n°3 as standalone new issues since they could require some dedicated time and effort to be solved and I'd close this issue as it has served its function now that major-rewriting has been merged into development.
from googlecontactseventsnotifier.
In terms of bug n. 1 I agree with you, but I have found something that we can do about it. I will publish that in another in standalone issue.
In terms of bug n. 2 the only thing that I have found is here, but I guess we can't use it. As you noticed eventData['goo.contactsPhotoUrl']
doesn't contain anything useful.
In terms of bug n. 3 I haven't activated Google+ API before, but I have a problem with activation as well.
from googlecontactseventsnotifier.
Ok, I'm closing this issue as the three separate issue are going to be opened.
Regarding n° 3 I had to wait some time (1-2 hours in my case) after having activated the API before I could use it succesfully.
from googlecontactseventsnotifier.
Related Issues (20)
- Mandatory customization HOT 2
- Google Cloud Platform API Dashboard link not found HOT 6
- reminder eMail is not using photos from Google Contacts HOT 3
- Age displays as "-1871" in email if contact has year of birth HOT 2
- Error: “Service not found: plus v1” HOT 5
- Sends email instead of GCalendar notifications HOT 1
- Update Google Cloud API Instructions HOT 3
- The Google-EteSync Add-on: please create a google integration add-on (GoogleContactsEventsNotifier build)
- Deprecation of the Google Contacts API (June 15, 2021) HOT 31
- Documentation re triggers HOT 1
- v5.x no longer works with hidden Birthday calendar HOT 7
- French tralsation
- French translation has syntax error
- Missing age calculation in 5.1.3 HOT 19
- Nickname not present anymore HOT 10
- Describe adding People API in setup
- notificationBlacklist seems not to work anymore
- Local Cache Error after updating from 5.1.2 from 5.1.4
- Runtime permissions lost after >7 days, permissions need to be regranted HOT 11
- Script suddenly stopped notifying HOT 7
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 googlecontactseventsnotifier.