currents-dev/cypress-cloud

Upload screenshots to Azure Blob Storage KO

Closed this issue · 0 comments

Before opening, please confirm:

  • I have searched for duplicate or closed issues and discussions.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I acknowledge that I will attach a full debug log, otherwise the issue will be closed with no response.

Environment information

System:
OS: Windows 10 10.0.22621
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-1370P
Memory: 8.03 GB / 31.69 GB
Binaries:
Node: 14.21.3 - C:\Program Files\nodejs\node.EXE
npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.1555.0), Chromium (114.0.1823.41)
Internet Explorer: 11.0.22621.1
npmPackages:
@badeball/cypress-cucumber-preprocessor: ^16.0.0 => 16.0.0
@bahmutov/cypress-esbuild-preprocessor: ^2.2.0 => 2.2.0
@cypress/angular: 0.0.0-development
@cypress/code-coverage: ^3.10.0 => 3.10.0
@cypress/mount-utils: 0.0.0-development
@cypress/react: 0.0.0-development
@cypress/react18: 0.0.0-development
@cypress/svelte: 0.0.0-development
@cypress/vue: ^5.0.0 => 0.0.0-development (5.0.0)
@cypress/vue2: 0.0.0-development
@cypress/webpack-dev-server: ^3.3.0 => 3.3.0
@intlify/vue-i18n-loader: ^3.2.0 => 3.3.0
@lokalise/node-api: ^6.3.0 => 6.3.0
@openid/appauth: ^1.3.1 => 1.3.1
@types/jest: ^24.0.19 => 24.9.1
@typescript-eslint/eslint-plugin: ^4.18.0 => 4.33.0
@typescript-eslint/parser: ^4.18.0 => 4.33.0
@vue/cli-plugin-babel: ~4.5.0 => 4.5.19
@vue/cli-plugin-eslint: ~4.5.0 => 4.5.19
@vue/cli-plugin-pwa: ~4.5.0 => 4.5.19
@vue/cli-plugin-router: ~4.5.0 => 4.5.19
@vue/cli-plugin-typescript: ~4.5.0 => 4.5.19
@vue/cli-plugin-unit-jest: ~4.5.0 => 4.5.19
@vue/cli-service: ~4.5.0 => 4.5.19
@vue/compiler-sfc: 2.7.10
@vue/eslint-config-prettier: ^6.0.0 => 6.0.0
@vue/eslint-config-typescript: ^7.0.0 => 7.0.0
@vue/test-utils: ^1.0.3 => 1.3.0
axios: ^0.24.0 => 0.24.0 (1.3.4, 0.21.4)
babel-plugin-istanbul: ^6.1.1 => 6.1.1 (5.2.0)
babel-plugin-transform-require-context: ^0.1.1 => 0.1.1
client-addon: 0.2.0
core-js: ^3.6.5 => 3.25.5 (2.6.12)
cypress: ^12.7.0 => 12.7.0
cypress-cloud: ^1.7.0 => 1.7.0
es6-promise: ^4.2.8 => 4.2.8
eslint: ^6.7.2 => 6.8.0
eslint-plugin-prettier: ^3.3.1 => 3.4.1
eslint-plugin-vue: ^6.2.2 => 6.2.2
flush-promises: ^1.0.2 => 1.0.2
luxon: ^2.4.0 => 2.5.0 (3.2.1)
node-sass: ^4.14.1 => 4.14.1
oidc-client: ^1.11.5 => 1.11.5
prettier: 2.7.1 => 2.7.1
register-service-worker: ^1.7.1 => 1.7.2
sass-loader: ^8.0.2 => 8.0.2
start-server-and-test: ^1.14.0 => 1.14.0
superagent: ^6.1.0 => 6.1.0
typescript: ~4.1.5 => 4.1.6
unzipper: ^0.10.11 => 0.10.11
vee-validate: ^3.4.14 => 3.4.14
vue: ^2.6.11 => 2.7.10
vue-burger-menu: ^2.0.5 => 2.0.5
vue-cli-plugin-i18n: ~2.3.1 => 2.3.1
vue-i18n: ^8.26.3 => 8.27.2
vue-i18n-bridge: ^9.2.0-beta.10 => 9.2.2
vue-multiselect: ^2.1.6 => 2.1.6
vue-router: ^3.2.0 => 3.6.5
vue-template-compiler: ^2.6.11 => 2.7.10
vue-toastification: ^1.7.14 => 1.7.14
vuex: ^3.6.2 => 3.6.2
vuex-persist: ^3.1.3 => 3.1.3

Describe the bug

My screenshots or videos are not uploaded in Azure Blob Storage.

Actually in the upload.ts file, the request return a BadRequest (400) =>

<?xml version="1.0" encoding="utf-8"?>
<Error>
   <Code>MissingRequiredHeader</Code>
   <Message>An HTTP header that&apos;s mandatory for this request is not specified.
RequestId:b80419b3-d01e-0009-27df-9a731c000000
Time:2023-06-09T14:34:57.7230675Z</Message>
   <HeaderName>x-ms-blob-type</HeaderName>
</Error>

Solution :
We need to send the x-ms-blob-type header (Azure Put blob doc)

await makeRequest({
   url,
   method: "PUT",
   data: f,
   headers: {
     "Content-Type": type,
     "x-ms-blob-type": "BlockBlob"
   },
 });

Thanks

Expected behavior

My screenshots or videos must be uploaded in Azure Blob Storage.

Command and Setup

npx cypress-cloud run --project ./tests/e2e/cypress --record --parallel --env configFile=local --ci-build-id "build-17" --group "Azure CI"

Full log and debug output

// Put your logs below this line