Last Comment Bug 1201169 - TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0
: TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_pro...
Status: RESOLVED FIXED
: intermittent-failure, regression
Product: Calendar
Classification: Client Software
Component: Provider: GData (show other bugs)
: Lightning 4.5
: Unspecified Unspecified
-- normal (vote)
: 4.5
Assigned To: Stefan Sitter
:
:
Mentors:
: 1201812 1228776 (view as bug list)
Depends on: 1193583
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 10:51 PDT by aleth [:aleth]
Modified: 2015-11-28 13:01 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
const-to-var (3.32 KB, patch)
2015-09-02 15:18 PDT, Stefan Sitter
no flags Details | Diff | Splinter Review
const-to-var (4.43 KB, patch)
2015-09-02 16:08 PDT, Stefan Sitter
philipp: review+
clokep: review+
Details | Diff | Splinter Review

Description User image aleth [:aleth] 2015-09-02 10:51:51 PDT
JavaScript error: resource://gdata-provider/modules/gdataSession.jsm, line 136: ReferenceError: OAUTH_BASE_URI is not defined
Comment 1 User image Stefan Sitter 2015-09-02 12:15:17 PDT
Looking at build history it seems the test was OK in 
> buildid: 20150830030440 https://treeherder.mozilla.org/logviewer.html#?job_id=22994&repo=comm-central
but failed in
> buildid: 20150831030205 https://treeherder.mozilla.org/logviewer.html#?job_id=23013&repo=comm-central

Both builds are based on the same comm-central revision, indicating this might be caused by a mozilla-central change.
Comment 2 User image Philipp Kewisch [:Fallen] 2015-09-02 12:31:21 PDT
I first assumed this was just a timing change and the test is failing due to that, but it looks like it is a real bustage. I'll take a look and see if I can reproduce this soon.
Comment 3 User image Stefan Sitter 2015-09-02 12:53:58 PDT
It is not limited to Gdata provider. When trying to connect to Google Calendar using CalDAV the same error is reported in CalDAV provider using 2015-09-02 builds:

Error: ReferenceError: OAUTH_BASE_URI is not defined
Source File: file:///[...]/components/calDavCalendar.js
Line: 1608
Comment 4 User image Stefan Sitter 2015-09-02 13:56:03 PDT
Definitely caused by some change in Thunderbird Core. Verified by using different Thunderbird builds with same Lightning build. Changes: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7db14bebae9196d780b1d64d2fd32d1bda26828b&tochange=cafb1c90f794a73100a8f0afb9fe3301df0f2bde

I have no idea where the OAUTH_ values come from. Maybe some magic is done somewhere. In that case "Bug 1193583 - Fix eval to always execute under a non-extensible lexical scope" might be involved.
Comment 5 User image Stefan Sitter 2015-09-02 15:18:40 PDT
Created attachment 8656264 [details] [diff] [review]
const-to-var

This fixes it for me by changing const to var. Don't know if there could be side effects like name collision if objects now live in global scope.
Comment 6 User image Philipp Kewisch [:Fallen] 2015-09-02 15:28:35 PDT
(In reply to Stefan Sitter from comment #4)
> I have no idea where the OAUTH_ values come from. Maybe some magic is done
> somewhere. In that case "Bug 1193583 - Fix eval to always execute under a
> non-extensible lexical scope" might be involved.
Indeed they come from the obfuscation block. Great analysis, this is most definitely the bug causing it.

This will also be a problem for http://mxr.mozilla.org/comm-central/source/mail/components/cloudfile/nsBox.js#734 then, maybe you can go ahead and add this to your patch? I don't think var/const will cause problems, the global scope is just the component/module it is being executed in. CC'ing clokep since he did the box work.
Comment 7 User image Stefan Sitter 2015-09-02 16:08:51 PDT
Created attachment 8656291 [details] [diff] [review]
const-to-var

Updated patch including changes for Box.
Comment 8 User image Patrick Cloke [:clokep] 2015-09-02 16:29:39 PDT
Comment on attachment 8656291 [details] [diff] [review]
const-to-var

Review of attachment 8656291 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Comment 9 User image aleth [:aleth] 2015-09-03 12:43:42 PDT
https://hg.mozilla.org/comm-central/rev/b2fe9c3def847417af98806f138abac43f5c69a6
Bug 1201169 - TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0. r=fallen,clokep a=test-bustage-fix on CLOSED TREE
Comment 10 User image Stefan Sitter 2015-09-04 00:14:33 PDT
Thank you Philipp for creating this unit tests in first place. Don't know how long it would have take otherwise until the problem would have been found by users.
Comment 11 User image Stefan Sitter 2015-09-07 07:07:23 PDT
*** Bug 1201812 has been marked as a duplicate of this bug. ***
Comment 12 User image Stefan Sitter 2015-11-28 13:01:56 PST
*** Bug 1228776 has been marked as a duplicate of this bug. ***

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