Percy visual testing snapshot getting faild
Asked by Santosh Kori:

Having bitbucket pipeline code

```
image: atlassian/default-image:3

pipelines: # This is an example Starter pipeline configuration
  branches:
    master:
      - step:
          name: 'Percy for Static Sites'
          script:
            - npm install -D @percy/cli
            - npx percy snapshot ./
```

Getting this build failed with below error logs

```
+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...
+ git reset --hard b76da9688750472362fd6aebedd2795453f8c966
HEAD is now at b76da96 Percy with build22
+ git config user.name bitbucket-pipelines
+ git config user.email commits-noreply@bitbucket.org
+ git config push.default current
+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
+ git reflog expire --expire=all --all
+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude
+ chmod 777 $BUILD_DIR

Images used:
build : docker.io/atlassian/default-image@sha256:edf4bd880adf9e7f7677094f7a1d944524c7f98e939550bc152523c5cf6080ff
+ npm install -D @percy/cli

> @percy/core@1.0.0-beta.74 postinstall /opt/atlassian/pipelines/agent/build/node_modules/@percy/core
> node ./post-install

npm WARN saveError ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'
npm WARN build No description
npm WARN build No repository field.
npm WARN build No README data
npm WARN build No license field.

+ @percy/cli@1.0.0-beta.74
added 110 packages from 116 contributors and audited 110 packages in 6.204s

10 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities

+ npx percy snapshot ./
[[95mpercy[39m] Downloading Chromium 885264...
[[95mpercy[39m] Successfully downloaded Chromium 885264
[[95mpercy[39m] [91mError: Failed to launch browser. [39m
[91m/opt/atlassian/pipelines/agent/build/node_modules/@percy/core/.local-chromium/885264/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory[39m
[91m'[39m
[91m[39m
[91m[39m
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.
```

Error: Failed to launch browser.  
/opt/atlassian/pipelines/agent/build/node_modules/@percy/core/.local-chromium/885264/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory  
'  
More detail of Percy CLI  
<https://docs.percy.io/docs/cli-snapshot>

```
?
```


Answers:
author: Caroline R
body: Hi, [@Santosh Kori](/t5/user/viewprofilepage/user-id/545), thank you for reaching out to Atlassian Community.

Could you please test your Pipelines build locally in a Docker container and see if it's happening there as well? You can follow the steps described here:

* <https://support.atlassian.com/bitbucket-cloud/docs/debug-pipelines-locally-with-docker/>

Looking forward to hearing from you.

Kind regards,   
Caroline


Tags: bitbucket-cloud

cloud

regression

test