saucelabs / saucectl-puppeteer-example

A showcase of saucectl running puppeteer + jest.
Other
10 stars 17 forks source link

video is empty and get `WRN failed to attach configuration` warning #4

Open sky172839465 opened 3 years ago

sky172839465 commented 3 years ago

Hi, I'm trying to run jest puppeteer in saucectl docker, but I saw video in the link is empty, and I don't know what this warn failed to attach configuration mean... Does this mean I lost or wrong some config?

config ref

full repo: https://github.com/sky172839465/integration-example/tree/ci

.sauce/config.yml

apiVersion: v1alpha
kind: puppeteer
sauce:
  region: us-west-1
  concurrency: 2
  metadata:
    name: Testing Puppeteer Support
    tags:
      - e2e
      - release team
      - other tag
    build: Release $CI_COMMIT_SHORT_SHA
docker:
  fileTransfer: copy
rootDir: ./__e2e__
puppeteer:
  version: 8.0.0
image:
  base: saucelabs/stt-puppeteer-jest-node
  version: latest
suites:
  - name: "chrome"
    testMatch: ["**/*.test.js"]
    browser: "chrome"
  - name: "firefox"
    testMatch: ["**/*.test.js"]
    browser: "firefox"

$ saucectl run

Running version 0.38.1
00:04:16 INF Reading config file config=.sauce/config.yml
00:04:16 INF Running puppeteer in Docker

                                    ##        .
                              ## ## ##       ==
                           ## ## ## ##      ===
                       /""""""""""""""""\___/ ===
                  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
                       \______ o          __/
                         \    \        __/
                          \____\______/

  _____   ____   _____ _  ________ _____    __  __  ____  _____  ______ 
 |  __ \ / __ \ / ____| |/ /  ____|  __ \  |  \/  |/ __ \|  __ \|  ____|
 | |  | | |  | | |    | ' /| |__  | |__) | | \  / | |  | | |  | | |__   
 | |  | | |  | | |    |  < |  __| |  _  /  | |\/| | |  | | |  | |  __|  
 | |__| | |__| | |____| . \| |____| | \ \  | |  | | |__| | |__| | |____ 
 |_____/ \____/ \_____|_|\_\______|_|  \_\ |_|  |_|\____/|_____/|______|
00:04:16 INF Launching workers. concurrency=2
00:04:16 INF Setting up test environment suite=firefox
00:04:16 INF Setting up test environment suite=chrome
00:04:17 INF Starting container id=db0e054bd76d img=saucelabs/stt-puppeteer-jest-node:v1.0.0 suite=firefox
00:04:17 INF Starting container id=4d940f2f568a img=saucelabs/stt-puppeteer-jest-node:v1.0.0 suite=chrome
00:04:18 INF File copied from=./__e2e__ suite=chrome to=/home/seluser/__project__/
00:04:19 INF File copied from=./__e2e__ suite=firefox to=/home/seluser/__project__/
00:04:26 INF Suites in progress: 2
00:04:32 WRN failed to attach configuration: Put "/v1/testrunner/jobs/a8df7e775af14b0dab3ffeca190b1de8/assets": unsupported protocol scheme ""
00:04:32 INF Tearing down environment suite=chrome
00:04:35 INF Suite finished. passed=true suite=chrome url=https://app.saucelabs.com/tests/a8df7e775af14b0dab3ffeca190b1de8
00:04:36 INF Suites in progress: 1
00:04:38 WRN failed to attach configuration: Put "/v1/testrunner/jobs/e59cdb1ba5e04c318f8a6971865d7d17/assets": unsupported protocol scheme ""
00:04:38 INF Tearing down environment suite=firefox
00:04:41 INF Suite finished. passed=true suite=firefox url=https://app.saucelabs.com/tests/e59cdb1ba5e04c318f8a6971865d7d17
00:04:41 INF ┌───────────────────────┐
00:04:41 INF  All suites have passed! 
00:04:41 INF └───────────────────────┘

update 2021.04.19

In this video we can see puppeteer's test in video: https://www.youtube.com/watch?v=jGfSOejlKD0&t=600s, maybe test too fast can't record to a video? So I add some wait for the test, however still can't see any test on video 😿

it('should have q input', async () => {
  await page.waitForTimeout(3000)
  console.log('Waited a second!')
  const input = await page.$('input[name="q"]')
  expect(await page.evaluate(input => input.type, input)).toEqual('text')
})
alexplischke commented 3 years ago
  1. Thank you for pointing failed to attach configuration out. It's not a failure in regards to your tests, so you can safely ignore it. We capture your job configuration as part of the job assets and it seems like it hit a bug! We'll follow up on that one internally to fix :)
  2. The current video implementation with the underlying xvfb is rather unreliable. I'll put this under investigation as well, to see whether we can patch it or whether we have to switch to a more reliable solution.
alexplischke commented 3 years ago

PS: I'd like to note that we don't recommend specifying the docker image directly like this (btw. that image spec is outdated, see https://docs.saucelabs.com/testrunner-toolkit/configuration/common-syntax#image):

image:
  base: saucelabs/stt-puppeteer-jest-node
  version: latest

as we automatically determine the correct image based on the puppeteer version specified via

puppeteer:
  version: 8.0.0

as long as it's a version we support.

sky172839465 commented 3 years ago

@alexplischke

  1. Thanks for fixing the warning.
  2. Looking forward to the feature!
  3. I'll remove unused image config, thanks!