kewisch / gdata-provider

Provider for Google Calendar
https://addons.thunderbird.net/thunderbird/addon/provider-for-google-calendar/
Other
239 stars 31 forks source link

No writable calendars are configured for invitations #63

Closed timur-tabi closed 3 years ago

timur-tabi commented 4 years ago

When I add my Google Calendar using CalDav, everything works.

When I add the same calendar using gdata-provider, I cannot accept invitation sent to me via email, even though the calendar is NOT read-only and I can manually add events.

FYI, I had to use the work-around specified in bug #28 to get gdata-provider to work at all.

I'm using Thunderbird 60.9.0 on Ubuntu 19.04.

sheldonmaschmeyer commented 4 years ago

I have the same issue. Found a solution!

Tools -> Options -> Advanced -> Config Editor Set calendar.google.enableEmailInvitations to True Close thunderbird, reopen, should work :) Also, go to Calendar, right click, select properties and make sure an email address is associated with the calendar. Then should be writable for other email accounts, not just the default, as well.

jasonvincik commented 4 years ago

@sheldonmaschmeyer - This has been plaguing me, and your solution totally worked! Thank you!

CheariX commented 4 years ago

Unfortunately, calendar.google.enableEmailInvitations=true only works, if you have configured a single Google Calendar. If you have two, only the second Account can be used to accept invitations.

unode commented 4 years ago

Also bumped into this and was about to open an issue. Thanks to @sheldonmaschmeyer for the workaround.

Wondering about the default being false. Is there a reason for this or alternatively, a reason for it not default to true?

JanaJarecki commented 4 years ago

I have the same issue as @CheariX, seconding the issue about two calendars.

fulcorno commented 4 years ago

Tools -> Options -> Advanced -> Config Editor Set calendar.google.enableEmailInvitations to True

It seems that the enableEmailInvitations property is no longer available in version 78.0.1. Are there any equivalent settings to enable the 'email' property?

Pawouek commented 4 years ago

The same as @fulcorno - that mentioned option does not exists. Nothing even similar in configuration (calendar.google*) :/ Anybody have any clue what to do to enable email option?

JanaJarecki commented 4 years ago

bump is there an update on this?

garyhooper commented 4 years ago

Same issue here. Any solution?

kienli commented 4 years ago

calendar.google.enableEmailInvitations doesn't exist in TB 78.2.2 either. Do you have any solution?

PatrickBauer commented 4 years ago

Same, it looks like thats a new bug, not the same like the one the issue is about. Worked perfectly wie Thunderbird 68. I suggest you subscribe this thread for new information.

bkiziuk commented 4 years ago

Same here. calendar.google.enableEmailInvitations is not available any more after upgrade to TB >=78 and thus it is not possible to accept any invitations.

twain28 commented 3 years ago

Can confirm this on new TB... (on a Mac TB 78.3.1 64bit)...this is probably because the "calendar" settings syntax has changed in Lightlning...looks like now we now have "calendar.registry.CALENDARREGNUMBER.option" syntax ...so I tried adding a new "calendar.registry.CALENDARREGNUMBER.enableEmailInvitations" value, just to test if perchance it would work, but it does not.

just mentioning @kewisch here, so that hopefully he will take a peek into this...with many many thanks for all his hard work in this marvellous extension. :)

sgrossberndt commented 3 years ago

I had the same issue and was finally able to solve it! 🥳 Go to the calendar view, right-click on the calendar, choose "Properties". Here you find an option "Email", which was set to "none" for me. After selecting my Google Email account and saving I am finally able to accept invitations again!

Credits for this solution go to a stackoverflow answer from 2014 by the way: https://superuser.com/a/763313 🙈

Edit: Oh boy. This works on Thunderbird 78.3.2, with Thunderbird 78.4.0 the "E-Mail" option is gone again. 😭

seanbright commented 3 years ago

Nothing is going to 'solve' this problem short of a change to the code and a release. The bug is clear:

https://github.com/kewisch/gdata-provider/blob/86bb9ef918535ec0c5a1c425d7fa42f69ea20668/src/legacy/modules/gdataCalendar.jsm#L327-L337

It is referencing a pref that no longer exists.

Edit: To clarify - identifying why it is not working is relatively straightforward. Implementing a fix is more difficult and requires a level of domain knowledge that most users (myself included) do not possess.

timur-tabi commented 3 years ago

If we already know what the bug is, then why is it taking months to fix it? Who is responsible for this code?

colans commented 3 years ago

@timur-tabi Because folks like yourself are spending time complaining instead of providing pull requests that make it easier for the maintainer to review and merge. Instead of complaining, why don't you help?

If you're not a developer, you can also offer to pay the maintainer. That's how free software gets built. (The software is free, but the labour isn't.)

Comments like yours only serve to spam everyone subscribing to the issue; they don't add any value.

seanbright commented 3 years ago

If you're not a developer, you can also offer to pay the maintainer. That's how free software gets built. (The software is free, but the labour isn't.)

I don't know if there is a policy against linking directly to contribution pages, but you can find the 'Contribute' button on the project's add-ons page.

unode commented 3 years ago

Edit: Oh boy. This works on Thunderbird 78.3.2, with Thunderbird 78.4.0 the "E-Mail" option is gone again. sob

Thunderbird 78.3.3 here and the "E-mail" option is only present for calendars not managed by this plugin.

I think everyone in this thread agrees that a pull request will push things further and lowering the effort bar to the maintainer is the fastest path to a fix.

I just updated to 78.3.3 and started to bump into the most recent issues mentioned here...

DominikTrenz commented 3 years ago

There is a workaround until it is fixed: Just add the missing config option "calendar.google.enableEmailInvitations". Go to "about:config" like described above and rightclick -> new -> boolean -> paste "calendar.google.enableEmailInvitations" and select true. It should work now.

gombosg commented 3 years ago

I tried, and the calendar.google.enableEmailInvitations config option is magically removed each time I restart TB. But only this - if I create a config with any other name, it is persisted. Same if I add it to a user.js file like

user_pref("calendar.google.enableEmailInvitations", true);
user_pref("test.setting", true);

If I start TB config editor, the first config item simply won't show up, but the second will. Strange.

EDIT: surely the extension itself is the culprit, since if I start TB with disabled extensions, then both settings will show up.

TB 78.3.1, extension version 78.0.1.

gombosg commented 3 years ago

It looks like that the TB 78 compatibility commit did this. Essentially, the bulk of the extension is "legacy" and a wrapper has been created.

For some reason, config keys (prefs) are also considered legacy and are purged in the code: https://github.com/kewisch/gdata-provider/blob/0d41a4193fc12b6f9a4a6dd09cc7968f27fccd15/src/background.js#L6-L13

But these local storage settings don't seem to show up in the config editor. I'm not even sure if they work any more. Probably it needs some fixing.

kewisch commented 3 years ago

The fix here is indeed to change the property value to return the pref from storage.local. That is async, so it looks like we'll need a wrapper that keeps the preference in memory using storage.onChanged. I'd love to fix this immediately, though I'm not doing well on free time currently.

If you want to view storage.local, you can go to add-on debugging and inspect the extension, there is a storage tab which will also contain the extension storage.

MatthewVernon commented 3 years ago

Thunderbird 78.4.0 here, and while this provider has worked for me in the past, I now can't find any way to associate an email address with my google calendar (and thus have it usable for accepting invitations). the about:config editor doesn't want to let me create a new property (as suggested by @DominikTrenz above); I'm afraid I don't understand the comment by @kewisch (or at least, not how one might use this to restore the ability to reply to invitations?).

gombosg commented 3 years ago

@MatthewVernon tl;dr it's a bug (or missing feature - compatibility with the latest TB extension framework), it needs fixing, and @kewisch will hopefully do that given some free time, unless someone else steps up to fix it. I never touched FF/TB extensions personally so trying to figure everything out on my own would take ages.

ALfuhrmann commented 3 years ago

So I ran afoul of this bug, too. I tried using CalDav instead, but could not get it to work consistently.

I unzipped the XPI and looked for the code lines @seanbright mentioned. Changing

!Services.prefs.getBoolPref("calendar.google.enableEmailInvitations", false) to !Services.prefs.getBoolPref("calendar.google.enableEmailInvitations", true)

there, and at another occurrence seemed like a good idea, so I did it, not knowing what would happen.

Rezpping and installing in Thunderbird 78.4.1 seems to lead to a working calendar with associated mail address:

image

I am going to test it for a few days and then submit a pull request here, if everything works out fine.

You can download the tweaked version HERE. Please keep in mind that I do not have the slighted idea what I have been doing and cannot take any responsibilities. If you install this and all your mail gets eaten or posted publicly, I will not be held accountable.

(You can open the above file with any ZIP utility and compare it to the original, if you are paranoid. The online changes should be the two lines in gdataCalendar.jsm)

gombosg commented 3 years ago

@ALfuhrmann and do accepting/rejecting invitations work properly after this tweak? For me, the menu item shows up as above but I'm still unable to accept invitations.

ALfuhrmann commented 3 years ago

@gombosg: yes, it works for me. When I get an invitation mail and hit "accept", it gets added to my first google calendar. I am not sure if you can do this with more than one Google calendar, but for me this is enough.

twain28 commented 3 years ago

@ALfuhrmann : first of all, many thanks for your contribution. I have tested your mod today, and it works somewhat, but not completely, I fear...as far as I understand this, there's probably still something amiss, since I am not able to invite anyone to my events (attendees are not saved, so I guess they are not invited at all)...this is probably related to the fact that I am using not one, not two, but three gcals...and I guess things go rather badly, when the extension has to deal with multiple accounts. I guess I'll have to wait a little more...thumbs up for the effort, though. We'll get there, eventually...

mrkeycode commented 3 years ago

It's so frustrating. Pls fix #Thunderbird @Firefox !!!

Rolf185 commented 3 years ago

Seems that kewisch is still short on time. So, I've created an interim solution: provider_for_google_calendar_lagacy-78.0.1-tb.zip It's signed with a different id to allow a permanent installation. The default for enableEmailInvitations and sendEventNotifications is set to true and the purge of the calendar.google branch in legacey options is disabled. Therfore it's also possible to disable both options via the Thunderbird expert options dialog.

@kewisch: What do you plan for the future? Migrate all Services.prefs options to local storage? May be I can contribute some more.

Rolf

unode commented 3 years ago

Dear @Rolf185 thanks a lot for the effort but your version still doesn't work for me. I can see invitations, but adding participants has no effect. No emails are sent and attendees are not saved.

Rolf185 commented 3 years ago

@unode: Please be sure that you don't set calendar.google.enableEmailInvitations and calendar.google.sendEventNotifications to false in options. If not, can you check if it works with a calendar which is natively supported by lightning? By the way, I didn't change any logic. Rolf

gombosg commented 3 years ago

I also tried forcing the configs but experience the same problem. Looks like some logic change is needed, as well.

Coach78 commented 3 years ago

I am having the same problem. A fix would be great!

seanbright commented 3 years ago

The "me too" comments (along with this comment referencing them) are not helpful. Everyone who uses this extension is affected.

noftalette commented 3 years ago

Hi

@unode: Please be sure that you don't set calendar.google.enableEmailInvitations and calendar.google.sendEventNotifications to false in options. If not, can you check if it works with a calendar which is natively supported by lightning? By the way, I didn't change any logic. Rolf

Hi Rolf, Like unode I can have access to the e-mail field in the calendar property which enables me to link this calendar with an e-mail address. However when I create an event, add an participant and send the invitation, no e-mail is sent, and the participant disappear in the list of participants of the event. I don't catch your answer ; where do I find calendar.google.enableEmailInvitations and calendar.google.sendEventNotifications ? In the about:config there are no such options begining with calendar.google...

GCAPITAINE303 commented 3 years ago

Hello Has anyone found a solution for network invitations and not local? thank you

noftalette commented 3 years ago

Let me share you my bypass solution : https://forums.mozfr.org/viewtopic.php?f=4&t=145318&p=911105#p911105

Etzix commented 3 years ago

@unode: Please be sure that you don't set calendar.google.enableEmailInvitations and calendar.google.sendEventNotifications to false in options. If not, can you check if it works with a calendar which is natively supported by lightning? By the way, I didn't change any logic. Rolf

This solution works great for me, my only issue was the purging of the options and this fixes that. Thank you!

unode commented 3 years ago

I had no options in the config editor but the reason @Rolf185 changes weren't working for me was #138. After working around that one, things seem to be back to normal (still testing).

Manually adding/creating the following through the config editor solved it for me:

calendar.google.enableAttendees;true
calendar.google.enableEmailInvitations;true
calendar.google.sendEventNotifications;true
Dyvels commented 3 years ago

adding this three didn´t change anything for me, it always deletes the added keys after restarting thunderbird

rolbr commented 3 years ago

Hey @unode what did you do to 'work around that one' ?

After working around that one, things seem to be back to normal (still testing).

calendar.google.enableAttendees;true
calendar.google.enableEmailInvitations;true
calendar.google.sendEventNotifications;true

Every time I restart Thunderbird, those three keys are removed from config. And without restarting Thunderbird, those keys seem to have no effect. I tried switching between mail accounts, opening/closing folders, triggering mail download/sync manually, refreshing calendars. No dice.

"SOLUTION" : use CalDAV

📣 I'm using a non-english version of Thunderbird. 
   Please allow for some inconsistencies in the translation of menu entries.
  1. In Google Calendar web interface click the three dots to the right of your calendar
  2. select Settings and Sharing
  3. scroll down to Calendar Integration and make note of the calendar's ID
  4. In Thunderbird / Lightning add new calendar
  5. select Location: Network / Remote
  6. select Format: CalDAV
    • username: your email
    • url/address: https://apidata.googleusercontent.com/caldav/v2/CALENDAR-ID/events
    • replace CALENDAR-ID with the calendar ID you've noted in step 3
  7. click Next, adjust settings to your liking, and confirm
  8. a popup should appear asking you to log in to your Google account and grant Thunderbird/Lightning access to your calendar
  9. a confirmation should appear that the calendar was added successfully 🥳
Dyvels commented 3 years ago

Jesus! @rolbr thank you so much, finally a solution after month!

colans commented 3 years ago

CalDAV was always the other option for sure, but it wasn't clear to me what the differences are. According to Calendar:Using Lightning with Google Calendars:

The Provider [...] is more reliable w.r.t Alarms and some people say its also faster when refreshing.

...but that wiki page hasn't been updated in 6 years. More up-to-date information seems to be in this project's FAQ:

Why should I use the Provider, and not access via CalDAV?

The Provider predates Google Calendar's CalDAV support and was initially recommended because it was more stable. However, CalDAV support has improved with time and now offers a pretty complete Google Calendar experience. For some people, the Provider for Google Calendar works better than CalDAV. The Provider for Google Calendar also allows access to Google's task lists and there are some extra features in the Provider not available via CalDAV, for example setting EMAIL reminders. It is also easier to set up, a graphical calendar picker is available.

rolbr commented 3 years ago

Hey @colans thanks for the background info. I must admit I haven't researched this any further. Top priority was being able to accept Email Invitations. Setting up CalDAV sure is a hassle, having to go through the above steps for each single calendar, 5 in my case, but being able to one-click accept invitations was worth it 😉

unode commented 3 years ago

what did you do to 'work around that one' ?

Was referring to #138 and including calendar.google.enableEmailInvitations;true solved it for me. I still don't see the calendar drop down but invitations are being picked up.

I just tried the CalDAV suggestion and it seems to work well, with the exception that I can't dismiss some reminders on events I was invited to (but that might be unrelated).

colans commented 3 years ago

I just tried the CalDAV suggestion and it seems to work well, with the exception that I can't dismiss some reminders on events I was invited to (but that might be unrelated).

That's a known issue. The workaround IIRC is to enable the "Don't show reminders for past events" (or similar, can't remember the exact label).

dmarteau commented 3 years ago

@rolbr

Got the exact the same problem: these keys are dismissed when thunderbird is restarted - Note that this behavior is very specifice to these keys.

unode commented 3 years ago

@rolbr and @dmarteau the problem is https://github.com/kewisch/gdata-provider/blob/0d41a4193fc12b6f9a4a6dd09cc7968f27fccd15/src/api/gdata.js#L98 called from https://github.com/kewisch/gdata-provider/blob/0d41a4193fc12b6f9a4a6dd09cc7968f27fccd15/src/background.js#L11

If you use @Rolf185 version above, this code is commented out so you won't have that problem.