Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core-http][test] browser test failures for Edge and Firefox #6731

Closed
jeremymeng opened this issue Dec 31, 2019 · 3 comments
Closed

[core-http][test] browser test failures for Edge and Firefox #6731

jeremymeng opened this issue Dec 31, 2019 · 3 comments
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.

Comments

@jeremymeng
Copy link
Member

jeremymeng commented Dec 31, 2019

to repro, run npx karma start karma.conf.ts --single-run after applying changes from #6730

1. Edge doesn't support TextEncoder. needs polyfill
2. Unexpected DateTime format (Edge and Firefox)
3. Unexpected user agent (Firefox)
4. XML parse error (Edge and Firefox)

Failure logs:

Edge 18.18975.0 (Windows 10.0.0) msrest serializeObject should correctly serialize a Uint8Array Object FAILED
        ReferenceError: 'TextEncoder' is not defined
           at stringToByteArray (test/coreHttp.browser.test.js:68557:9)
           at Anonymous function (test/coreHttp.browser.test.js:68574:13)
Edge 18.18975.0 (Windows 10.0.0) msrest serializeObject should correctly serialize a complex JSON object FAILED
        ReferenceError: 'TextEncoder' is not defined
           at stringToByteArray (test/coreHttp.browser.test.js:68557:9)
           at Anonymous function (test/coreHttp.browser.test.js:68594:13)
Edge 18.18975.0 (Windows 10.0.0) msrest serialize should correctly serialize a ByteArray Object FAILED
        ReferenceError: 'TextEncoder' is not defined
           at stringToByteArray (test/coreHttp.browser.test.js:68557:9)
           at Anonymous function (test/coreHttp.browser.test.js:68756:13)
Edge 18.18975.0 (Windows 10.0.0) msrest serialize should correctly serialize a string in DateTimeRfc1123 FAILED
        expected 'Mon, 01 Jan 0001 00:00:00 GMT' to equal 'Mon, 01 Jan 2001 00:00:00 GMT'
        Error
           at AssertionError (test/coreHttp.browser.test.js:2585:7)
           at Assertion.prototype.assert (test/coreHttp.browser.test.js:4935:7)
           at assertEqual (test/coreHttp.browser.test.js:6101:7)
           at methodWrapper (test/coreHttp.browser.test.js:12592:5)
           at Anonymous function (test/coreHttp.browser.test.js:68801:13)
Edge 18.18975.0 (Windows 10.0.0) ServiceClient serializeRequestBody() should serialize a JSON ByteArray request body FAILED
        ReferenceError: 'TextEncoder' is not defined
           at stringToByteArray (test/coreHttp.browser.test.js:71187:9)
           at Anonymous function (test/coreHttp.browser.test.js:70717:13)
Edge 18.18975.0 (Windows 10.0.0) ServiceClient serializeRequestBody() should serialize an XML ByteArray request body FAILED
        ReferenceError: 'TextEncoder' is not defined
           at stringToByteArray (test/coreHttp.browser.test.js:71187:9)
           at Anonymous function (test/coreHttp.browser.test.js:70781:13)
Edge 18.18975.0 (Windows 10.0.0) XML serializer parseXML(string) with undefined FAILED
        error.message ("XML Parsing Error: syntax error") should have contained "Document is empty": expected -1 to not equal -1
        Error
           at AssertionError (test/coreHttp.browser.test.js:2585:7)
           at Assertion.prototype.assert (test/coreHttp.browser.test.js:4935:7)
           at assertEqual (test/coreHttp.browser.test.js:6101:7)
           at methodWrapper (test/coreHttp.browser.test.js:12592:5)
           at assert.notStrictEqual (test/coreHttp.browser.test.js:9102:5)
           at Anonymous function (test/coreHttp.browser.test.js:72271:29)
           at step (test/coreHttp.browser.test.js:54360:13)
           at Anonymous function (test/coreHttp.browser.test.js:54341:46)
           at fulfilled (test/coreHttp.browser.test.js:54331:43)
Edge 18.18975.0 (Windows 10.0.0) XML serializer parseXML(string) with null FAILED
        error.message ("XML Parsing Error: syntax error") should have contained "Document is empty": expected -1 to not equal -1
        Error
           at AssertionError (test/coreHttp.browser.test.js:2585:7)
           at Assertion.prototype.assert (test/coreHttp.browser.test.js:4935:7)
           at assertEqual (test/coreHttp.browser.test.js:6101:7)
           at methodWrapper (test/coreHttp.browser.test.js:12592:5)
           at assert.notStrictEqual (test/coreHttp.browser.test.js:9102:5)
           at Anonymous function (test/coreHttp.browser.test.js:72285:29)
           at step (test/coreHttp.browser.test.js:54360:13)
           at Anonymous function (test/coreHttp.browser.test.js:54341:46)
           at fulfilled (test/coreHttp.browser.test.js:54331:43)

Firefox 71.0.0 (Windows 10.0.0) MsRestUserAgentPolicy for browser MsRestUserAgentPolicy (Browser) should be space delimited and contain two fields FAILED
expected 5 to equal 2
AssertionError@test/coreHttp.browser.test.js:2585:13
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/assertion.js/module.exports/Assertion.prototype.assert@test/coreHttp.browser.test.js:4935:13
assertEqual@test/coreHttp.browser.test.js:6101:12
methodWrapper@test/coreHttp.browser.test.js:12592:25
./test/msRestUserAgentPolicyTests.ts/</</</</</<@test/coreHttp.browser.test.js:66941:61
step@test/coreHttp.browser.test.js:54360:23
verb/<@test/coreHttp.browser.test.js:54341:53
fulfilled@test/coreHttp.browser.test.js:54331:58

Firefox 71.0.0 (Windows 10.0.0) msrest serialize should correctly serialize a string in DateTimeRfc1123 FAILED
expected 'Mon, 01 Jan 0001 00:00:00 GMT' to equal 'Mon, 01 Jan 2001 00:00:00 GMT'
AssertionError@test/coreHttp.browser.test.js:2585:13
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/assertion.js/module.exports/Assertion.prototype.assert@test/coreHttp.browser.test.js:4935:13
assertEqual@test/coreHttp.browser.test.js:6101:12
methodWrapper@test/coreHttp.browser.test.js:12592:25
./test/serializationTests.ts/</</</<@test/coreHttp.browser.test.js:68801:41

Firefox 71.0.0 (Windows 10.0.0) XML serializer parseXML(string) with undefined FAILED
error.message ("XML Parsing Error: syntax error
Location: http://localhost:9876/context.html
Line Number 1, Column 1:undefined
^") should have contained "Document is empty": expected -1 to not equal -1
AssertionError@test/coreHttp.browser.test.js:2585:13
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/assertion.js/module.exports/Assertion.prototype.assert@test/coreHttp.browser.test.js:4935:13
assertEqual@test/coreHttp.browser.test.js:6101:12
methodWrapper@test/coreHttp.browser.test.js:12592:25
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/interface/assert.js/module.exports/assert.notStrictEqual@test/coreHttp.browser.test.js:9102:65
./test/xmlTests.ts/</</</</<@test/coreHttp.browser.test.js:72271:73
step@test/coreHttp.browser.test.js:54360:23
verb/<@test/coreHttp.browser.test.js:54341:53
fulfilled@test/coreHttp.browser.test.js:54331:58

Firefox 71.0.0 (Windows 10.0.0) XML serializer parseXML(string) with null FAILED
error.message ("XML Parsing Error: syntax error
Location: http://localhost:9876/context.html
Line Number 1, Column 1:null
^") should have contained "Document is empty": expected -1 to not equal -1
AssertionError@test/coreHttp.browser.test.js:2585:13
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/assertion.js/module.exports/Assertion.prototype.assert@test/coreHttp.browser.test.js:4935:13
assertEqual@test/coreHttp.browser.test.js:6101:12
methodWrapper@test/coreHttp.browser.test.js:12592:25
../../../common/temp/node_modules/.pnpm/registry.npmjs.org/chai/4.2.0/node_modules/chai/lib/chai/interface/assert.js/module.exports/assert.notStrictEqual@test/coreHttp.browser.test.js:9102:65
./test/xmlTests.ts/</</</</<@test/coreHttp.browser.test.js:72285:73
step@test/coreHttp.browser.test.js:54360:23
verb/<@test/coreHttp.browser.test.js:54341:53
fulfilled@test/coreHttp.browser.test.js:54331:58

@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. Azure.Core labels Dec 31, 2019
@ramya-rao-a ramya-rao-a added this to the [2020] February milestone Jan 2, 2020
@xirzec xirzec modified the milestones: [2020] March, [2020] April Mar 9, 2020
@xirzec xirzec modified the milestones: [2020] April, Backlog Apr 21, 2020
@jeremymeng
Copy link
Member Author

We could drop legacy Edge now.

@jeremymeng
Copy link
Member Author

on windows,

Chrome FireFox
user agent "core-http/1.1.3 OS/Win32" "core-http/1.1.3 OS/WindowsNT 10.0; Win64; x64"
string for new Date("Mon, 01 Jan 0001 00:00:00 GMT") "Mon, 01 Jan 2001 00:00:00 GMT" "Mon, 01 Jan 0001 00:00:00 GMT"

Error message when parseXml() on undefined/null

  • Chrome:
<h3 xmlns="http://www.w3.org/1999/xhtml">This page contains the following errors:</h3><div xmlns="http://www.w3.org/1999/xhtml" style="font-family:monospace;font-size:12px">error on line 1 at column 1: Document is empty
</div><h3 xmlns="http://www.w3.org/1999/xhtml">Below is a rendering of the page up to the first error.</h3>
  • Firefox:
XML Parsing Error: syntax error\nLocation: http://localhost:9876/debug.html\nLine Number 1, Column 1:<sourcetext xmlns=\"http://www.mozilla.org/newlayout/xml/parsererror.xml\">undefined\n^</sourcetext>

@jeremymeng
Copy link
Member Author

This has been fixed by #9091.

@xirzec xirzec removed this from the Backlog milestone May 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

3 participants