Last Comment Bug 1101175 - Accepting inviations doesn't work as expected (403 forbidden)
: Accepting inviations doesn't work as expected (403 forbidden)
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Provider: GData (show other bugs)
: Trunk
: All All
P1 normal (vote)
: 4.0.0.1
Assigned To: Philipp Kewisch [:Fallen]
:
:
Mentors:
: 1116374 (view as bug list)
Depends on:
Blocks: 1150571 1117541
  Show dependency treegraph
 
Reported: 2014-11-18 13:19 PST by Philipp Kewisch [:Fallen]
Modified: 2015-04-02 09:21 PDT (History)
16 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
gdata-provider-1.0.4pre1.xpi (78.52 KB, application/octet-stream)
2015-01-03 10:15 PST, Philipp Kewisch [:Fallen]
no flags Details
Fix - v1 (9.76 KB, patch)
2015-01-21 03:57 PST, Philipp Kewisch [:Fallen]
matthew.mecca: review+
Details | Diff | Splinter Review

Description User image Philipp Kewisch [:Fallen] 2014-11-18 13:19:34 PST
See hints in bug 1079659 and others.

[JavaScript Error: "[calGoogleCalendar] Modifying item Meeting Bla failed:2147500037: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}
"]
Comment 1 User image Alex 2014-11-18 13:28:15 PST
Thanks Phillip, let us know if you need any help. I have sent you an Outlook invitation weeks ago, dunno if you were able to use it.
Comment 2 User image Alex 2014-11-18 14:23:30 PST
Just received an iCloud invitation from a Mac, same problem, the event is in TB Calendar but does not synchronize with Google Calendar.
Comment 3 User image Chris Kotting 2014-11-19 12:56:42 PST
Random thought: Is it possible that this is related to the solution to the quota issue?  Phillip modified the code to connect to Google less frequently, in order to make the quota last long enough.  It could be that it will synchronize with Google, just not immediately the way 0.32 did.
Comment 4 User image Alex 2014-11-20 11:31:12 PST
No, unfortunately it does not. On the other hand if you create an event in TB calendar it appears immediately in Google, and vice versa.
What is the difference between an event appearing in TB calendar by accepting an event vs creating it manually? The problem should be in this difference.
Comment 5 User image Robert "Unlogic" Olofsson 2014-12-05 00:35:04 PST
I'm having the same issue for all Outlook/Exchange events that I receive.

Doesn't matter if I click accept or deny I always get this error in the log:

[JavaScript Error: "[calGoogleCalendar] Modifying item Foooo failed:2147500037: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}
"]

This used to work with the old provider.
Comment 6 User image Alex 2014-12-05 01:11:40 PST
Where is positioned the log so i can check mine too?
Comment 7 User image Robert "Unlogic" Olofsson 2014-12-05 01:14:06 PST
Press CTRL + SHIFT + J or select Tools -> Error console.
Comment 8 User image Alex 2014-12-05 01:36:16 PST
Thanks,

in the "messages" tab the following text appears accepting an outlook/exchange invitation. The Event is correctly set in TB calendar, it does not synch with Google Calendar.

[JavaScript Error: "[calGoogleCalendar] Adding Item test failed:2147746065: A request Error Occurred. Status Code: 400 Bad Request Body: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid value for: Invalid format: \"2014-12-05T09:33:25Z\" is malformed at \"Z\""
   }
  ],
  "code": 400,
  "message": "Invalid value for: Invalid format: \"2014-12-05T09:33:25Z\" is malformed at \"Z\""
 }
}
"]
Comment 9 User image Philipp Kewisch [:Fallen] 2014-12-05 14:52:48 PST
Alex, the timezone format issue is bug 1085287, it will be fixed in 1.0.3.

Regarding this issue, I haven't made progress on figuring it out and I think I will postpone it to 1.0.4 to get the other fixes out faster. It seems there is some aspect of this event the provider is changing, but I haven't found out which that is. It seems to happen when the event is already placed in the calendar and you are accepting the invitation then.

For further debugging, could you follow these steps?

0. Enable debugging, if you haven't already
1. Synchronize to make sure you don't get too many log messages
2. Clear your error console
3. Send the outlook invitation
4. Before you accept, synchronize again.
   - Copy out the JSON event data of the invitation from the sync run
5. Click on the invitation mail, accept or decline
   - Copy out both the error message and the JSON being sent when the item is modified
6. Ensure that the "forbidden" error mentioned in comment 0 shows up.

Then, post all the copied out messages here. If you are removing the attendee data, please keep the entry with your own attendee. You can replace the displayname/email with something generic, but I'd like to see the status and anything else. If in doubt, feel free to send the data via email.
Comment 10 User image Alex 2014-12-06 05:38:34 PST
Sorry, how to enable debugging?
Comment 11 User image Philipp Kewisch [:Fallen] 2014-12-08 02:40:38 PST
https://wiki.mozilla.org/Calendar:GDATA_Provider#Enabling_Debugging
Comment 12 User image Alex 2014-12-08 05:03:07 PST
ok.. debug enabled. Where to find the "json event data"? :(
Comment 13 User image Alex 2014-12-08 05:25:20 PST
Philipp, i have sent you a screenshot of the error console with debuging enabled.
Comment 14 User image Philipp Kewisch [:Fallen] 2014-12-10 13:43:19 PST
For the record, Alex debug logs showed bug 1085287. I'd therefore like to ask everyone else who is getting the messages in comment 0 to read comment 9 and reply. Thanks!
Comment 15 User image Philipp Kewisch [:Fallen] 2014-12-11 00:46:10 PST
Can someone invite me to a such meeting? Doesn't have to be the exact event, but the circumstances should be as similar as possible. Please send invite to kewisch@gmail.com.
Comment 16 User image dmartinri 2014-12-13 07:44:31 PST
I sent invite.
Comment 17 User image Matt F 2014-12-19 06:52:12 PST
Hi Philipp, I've gone through the steps in comment 9 and tried to Accept a meeting invite. This particular invite came from my Webex account, not an Outlook calendar, but the effect is identical.

Note I am using Google Apps for business, in case that matters. 

See my (redacted) output below:

[calGoogleCalendar] Modifying item My Event (master item)
------
[calGoogleRequest] Requesting PUT https://www.googleapis.com/calendar/v3/calendars/joe.bloggs%40somewhere.co.uk/events/_at2fdssfn4554o5l6kahak957____[REDACTED]___5l9l543gsrgdf5r6itbd
------
[calGoogleCalendar] Setting Upload Data (application/json; charset=UTF-8):
{"start":{"dateTime":"2014-12-23T11:00:00Z","timezone":"UTC"},"end":{"dateTime":"2014-12-23T12:00:00Z","timezone":"UTC"},"summary":"My Event","description":"\n\n\nJOIN MEETING[REDACTED]\n","location":"[REDACTED]","sequence":1,"status":"confirmed","organizer":{"email":"redacted@redacted.co.uk","displayName":"Redacted"},"attendees":[{"email":"joe.bloggs@somewhere.co.uk","displayName":"Joe Bloggs","responseStatus":"accepted"}],"reminders":{"overrides":[],"useDefault":true}}
------
[calGoogleCalendar] Sending request headers: ({})
------
[calGoogleRequest] Clock skew is -3 seconds
------
[calGoogleCalendar] Request PUT https://www.googleapis.com/calendar/v3/calendars/joe.bloggs%40somewhere.co.uk/events/_at2fdssfn4554o5l6kahak957____[REDACTED]___5l9l543gsrgdf5r6itbd responded with HTTP 403
------
[calGoogleCalendar] Login failed for joe.bloggs@somewhere.co.uk HTTP Status: 403 Reason: forbidden
------
[JavaScript Error: "[calGoogleCalendar] Modifying item My Event failed:2147500037: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}
"]
Comment 18 User image Philipp Kewisch [:Fallen] 2014-12-22 00:57:30 PST
Hey Matthew, thanks for the debug logs. I'm missing step 4 though, I need to figure out how the JSON has changed.
Comment 19 User image Matt F 2014-12-22 13:16:45 PST
Hi Philipp, I've sent you the full output by email. Hope it helps.
Matt
Comment 20 User image Philipp Kewisch [:Fallen] 2014-12-30 08:31:48 PST
*** Bug 1116374 has been marked as a duplicate of this bug. ***
Comment 21 User image Philipp Kewisch [:Fallen] 2015-01-03 10:15:14 PST
Created attachment 8543523 [details]
gdata-provider-1.0.4pre1.xpi

I've made some changes for another bug that should also fix this one. Please test this xpi and see if it works for you.
Comment 22 User image Robert "Unlogic" Olofsson 2015-01-04 11:28:12 PST
I'll test this as soon as I receive another Outlook invitation.
Comment 23 User image Matt F 2015-01-05 02:55:56 PST
I've installed the update, I had to restart Thunderbird twice before it would start to pick up new invitations. I've done a limited test with invites from two people that caused me problems before and I'm glad to say it worked!

I'll report back if there's any further problems, thanks for making this fix. I will donate as promised.

I did notice that the invitation email sat in my Inbox for about 10mins before the "Invitations" link appears at the bottom to allow me to accept/decline event. I've noticed this previously, is this based on a timed parameter that I can change? 

What would be amazing would be to have accept/reject buttons from within the actual email. Perhaps that's a wider Thunderbird enhancement.
Comment 24 User image Mark Banner (:standard8) 2015-01-05 03:12:38 PST
The xpi gives me the option to change the reminders (testing as requested in other bug). Thanks.
Comment 25 User image Philipp Kewisch [:Fallen] 2015-01-06 01:07:48 PST
(In reply to matthew.fletcher from comment #23)
> I did notice that the invitation email sat in my Inbox for about 10mins
> before the "Invitations" link appears at the bottom to allow me to
> accept/decline event. I've noticed this previously, is this based on a timed
> parameter that I can change? 

The preference for this is calendar.invitations.autorefresh.timeout. I didn't really expect this dialog to work, but I'm happy to hear it does.

> 
> What would be amazing would be to have accept/reject buttons from within the
> actual email. Perhaps that's a wider Thunderbird enhancement.

This should be happening, do you not get the blue bar? Any error console messages?
Comment 26 User image Matt F 2015-01-06 02:24:04 PST
I wasn't getting the options in the blue bar. I've had a play around with the config and enabled calendar.google.enableEmailInvitations=true then associated my email address with the calendar, now I get the Accept/Decline buttons. Would that make sense?

I had a look at the calendar.invitations.autorefresh.timeout as well since the dialogue box is useful when you get a lot of invites in one go. It was set to 1 which is the lowest I was allowed to set it as an integer, so I guess thats as good as it gets. It definitely seems to take more than a minute to pick up the invites though.
Comment 27 User image Robert "Unlogic" Olofsson 2015-01-06 11:40:28 PST

(In reply to matthew.fletcher from comment #26)
> I wasn't getting the options in the blue bar. I've had a play around with
> the config and enabled calendar.google.enableEmailInvitations=true then
> associated my email address with the calendar, now I get the Accept/Decline
> buttons. Would that make sense?
> 
> I had a look at the calendar.invitations.autorefresh.timeout as well since
> the dialogue box is useful when you get a lot of invites in one go. It was
> set to 1 which is the lowest I was allowed to set it as an integer, so I
> guess thats as good as it gets. It definitely seems to take more than a
> minute to pick up the invites though.

I can confirm this behavior.

The Accept/Decline buttons have never been visible for me when using the Google Calendar provider. I have three Thunderbird/Lightning installations on different computers and they all have the same behavior.

When I receive an invitation I always have to wait 5-10 before the "Invitations" link shows up in the status bar.

However if add a local calender for the given e-mail address instead then the blue bar always show up right away.
Comment 28 User image Philipp Kewisch [:Fallen] 2015-01-06 15:07:46 PST
Ok, I will investigate. I guess the organizer id is not set correctly, or some other matching is not right. Let me know if you have any error console messages that may be relevant.
Comment 29 User image Washington Tavares 2015-01-09 07:17:23 PST
Hi Philipp, 

Unfortunatelly this XPI (gdata-provider-1.0.4pre1.en-US.mac64.xpi) is returning the same error:

[JavaScript Error: "[calGoogleCalendar] Modifying item XPTO failed:2147500037: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Forbidden"
   }
  ],
  "code": 403,
  "message": "Forbidden"
 }
}
"]

Can I help you to identify this? 

Thnks a Lot!
Comment 30 User image Philipp Kewisch [:Fallen] 2015-01-09 08:01:42 PST
Hi Washington, can you give me a little more logs than that, what happens when the modification starts? You can send it to me via email if you like.
Comment 31 User image TJC 2015-01-12 13:41:23 PST
Hello Phillipp, I've got the same issue, not sure why it started but am now completely disabled in Lightning. Greatly appreciate your help!!!!!

Also, is anyone working on a provider to link Lightning and Outlook365?

Thanks,
Tom
Comment 32 User image TJC 2015-01-12 14:34:56 PST
I just added my Google calendar as a CalDav (as opposed to selecting Google Calendar when you "add" a calendar........and it seems to be working!?!

At least the accepting, alarm, snooze, and deleting events part......
Comment 33 User image Philipp Kewisch [:Fallen] 2015-01-21 03:57:16 PST
Created attachment 8552405 [details] [diff] [review]
Fix - v1
Comment 34 User image Matthew Mecca [:mmecca] 2015-01-26 21:34:06 PST
Comment on attachment 8552405 [details] [diff] [review]
Fix - v1

Untested but looks good codewise. r=mmecca
Comment 35 User image Philipp Kewisch [:Fallen] 2015-01-27 16:14:46 PST
Pushed to comm-central changeset 38e702b512dd
Comment 36 User image Robert "Unlogic" Olofsson 2015-01-28 03:32:19 PST
Any ETA when a new Provider for Google Calendar containing this fix will be released?
Comment 37 User image Cristian Vasile Mocanu 2015-01-30 02:52:31 PST
The attached xpi also fixes the problem where I couldn't dismiss reminders (getting a "forbidden" in the error console).
Comment 38 User image dmartinri 2015-01-30 08:37:04 PST
where is the xpi?
Comment 39 User image Cristian Vasile Mocanu 2015-01-31 05:23:58 PST
See above, in the comments. Search for "gdata-provider-1.0.4pre1.xpi" on this page. It's weird that it doesn't appear in the list of attachments - maybe it's attached to a different ticket.
Comment 40 User image Cristian Vasile Mocanu 2015-01-31 05:24:59 PST
Actually, it does appear in the list of attachments: you just need to click "Show obsolete".

Note You need to log in before you can comment on or make changes to this bug.