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

[Tables] Batch integration test fail when run in playback mode against browser #11603

Closed
joheredi opened this issue Oct 2, 2020 · 3 comments · Fixed by #13955
Closed

[Tables] Batch integration test fail when run in playback mode against browser #11603

joheredi opened this issue Oct 2, 2020 · 3 comments · Fixed by #13955
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Tables test-utils-recorder Label for the issues related to the common recorder
Milestone

Comments

@joheredi
Copy link
Member

joheredi commented Oct 2, 2020

batch operations tests fail when run in playback mode against browse, they work fine when run in live mode. Tests targeting node work with any test mode.

Error: Refused to set unsafe header "accept-charset"
          at FakeXMLHttpRequest.setRequestHeader (dist-test/integration.index.browser.js:25423:27 <- dist-test/integration.index.browser.js:8866:938)
          at XhrHttpClient.sendRequest (dist-test/integration.index.browser.js:3512:21 <- dist-test/integration.index.browser.js:668:531)
          at LogPolicy.sendRequest (dist-test/integration.index.browser.js:4084:41 <- dist-test/integration.index.browser.js:782:485)
          at DeserializationPolicy.<anonymous> (dist-test/integration.index.browser.js:4334:30 <- dist-test/integration.index.browser.js:804:1344)
          at step (dist-test/integration.index.browser.js:118:27 <- dist-test/integration.index.browser.js:15:9800)
          at Object.next (dist-test/integration.index.browser.js:99:57 <- dist-test/integration.index.browser.js:15:6649)
          at dist-test/integration.index.browser.js:92:75 <- dist-test/integration.index.browser.js:15:5887
          at new Promise (<anonymous>)
          at __awaiter (dist-test/integration.index.browser.js:88:16 <- dist-test/integration.index.browser.js:15:5042)
          at DeserializationPolicy.sendRequest (dist-test/integration.index.browser.js:4330:20 <- dist-test/integration.index.browser.js:804:1081)

@sadasant have you ever seen something like this?

@joheredi joheredi added Client This issue points to a problem in the data-plane of the library. Tables test-utils-recorder Label for the issues related to the common recorder labels Oct 2, 2020
@joheredi joheredi added this to the [2020] November milestone Oct 2, 2020
@joheredi joheredi self-assigned this Oct 2, 2020
@joheredi joheredi changed the title [Tables] Batch integration test fail when run in playback mode [Tables] Batch integration test fail when run in playback mode against browser Oct 2, 2020
@sadasant
Copy link
Contributor

sadasant commented Oct 2, 2020

@joheredi We need more information.

  • Turn on the logs and see if you can find the HTTP request that sets that header. Do this your favorite way. We need to see both the request and the response, if possible. If we obtain a response, and we see the error in the response, this changes drastically how we will approach this problem.
  • I can imagine this either being a Karma problem, or a bug in the recorder.
  • I need to confirm, using TEST_MODE=live AND running the browser tests pass without this error? This would mean the issue is most likely in the recorder and not in Karma.
  • We would need to go deeper in the recorder and see if we can spot the problem. Ping me when you can and let's have a call.

@joheredi
Copy link
Member Author

Turns out that some headers seem to be marked as "unsafe". I'm fixing this by only adding those headers if running in node

@jeremymeng
Copy link
Member

Related sinonjs/nise#177

@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
Client This issue points to a problem in the data-plane of the library. Tables test-utils-recorder Label for the issues related to the common recorder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants