Closed Bug 1201169 Opened 5 years ago Closed 5 years ago

TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0

Categories

(Calendar :: Provider: GData, defect)

Lightning 4.5
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: ssitter)

References

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file, 1 obsolete file)

JavaScript error: resource://gdata-provider/modules/gdataSession.jsm, line 136: ReferenceError: OAUTH_BASE_URI is not defined
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.
Keywords: regression
Version: Trunk → Lightning 4.5
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.
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
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.
Attached patch const-to-var (obsolete) — Splinter Review
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.
Attachment #8656264 - Flags: review?(philipp)
(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.
Attached patch const-to-varSplinter Review
Updated patch including changes for Box.
Assignee: nobody → ssitter
Attachment #8656264 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8656264 - Flags: review?(philipp)
Attachment #8656291 - Flags: review?(philipp)
Attachment #8656291 - Flags: review?(clokep)
Depends on: 1193583
Comment on attachment 8656291 [details] [diff] [review]
const-to-var

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

Thanks!
Attachment #8656291 - Flags: review?(clokep) → review+
Attachment #8656291 - Flags: review?(philipp) → review+
Keywords: checkin-needed
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
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 4.5
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.
Duplicate of this bug: 1201812
Duplicate of this bug: 1228776
You need to log in before you can comment on or make changes to this bug.