Running Cypress in Bitbucket pipelines fails looking for chrome - continuous-integration

I have no idea why it tries to run Chrome instead of Electron based browser. Could be a Percy culprit here?
+ yarn cy:ci --parallel --ci-build-id $BITBUCKET_BUILD_NUMBER
yarn run v1.13.0
$ cd cypress && yarn ci --parallel --ci-build-id 119
$ percy exec -- cypress run --record --parallel --ci-build-id 119
[percy] created build #5: https://percy.io/DeepVision/doveze-cz/builds/1794467
Error: Failed to launch chrome!
/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/.local-chromium/linux-650583/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/lib/Launcher.js:342:14)
at Interface.helper.addEventListener (/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/lib/Launcher.js:331:50)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
More info and configs at gist: https://gist.github.com/FredyC/d5b82b485e65245102dd24f6df787f5f

With the help from Percy support, this issue is overcome by using the image cypress/browsers:chrome67-ff57.

Related

Cypress Error after running open command...'error loading V8 startup snapshot file'. I'm not able to run cypress then

The exact error is:
[0328/091115.205:FATAL:v8_initializer.cc(447)] Error loading V8 startup snapshot file
Could you please help to fix and be able to use Cypress?
I tried (steps):
First: C:/inetpub/wwwroot/cypress-example>npm install
Second: C:/inetpub/wwwroot/cypress-example>npx cypress run
(both command using cmd.exe as administrator permission and I was running it in the file of the website example that I criated...C:/inetpub/wwwroot/cyrpress-teste)
exact error bellow:
Cypress failed to start.
This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
Please refer to the error below for more details.
[0328/091115.205:FATAL:v8_initializer.cc(447)] Error loading V8 startup snapshot file
Platform: win32-x64 (10.0.19044)
Cypress Version: 9.5.2
I got the same error in cypress v9.5.4
Solved this by installing older version.
Just uninstall the current version, write "cypress": "^8.4.1" and run npm i

Issues running "yarn build" while creating Solana NFTs

I've been having issues running "yarn build" for a few days now. I tried the suggestions I could find online without much luck. This is for an NFT project on Solana so hoping another dev on here may have ran into and has the fix.
Things I've tried:
Downgrading to earlier versions of node js, ts-node, yarn, and solana.
Deleting package-lock.json.
Any other suggestions out there would be much appreciated. Thanks in advance!
Command line output below:
C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js>yarn build
yarn run v1.22.10
$ lerna run build
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 5 packages: "yarn run build"
lerna ERR! yarn run build exited 1 in 'candy-machine-mint'
lerna ERR! yarn run build stdout:
$ react-scripts build
Creating an optimized production build...
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\packages\fair-launch\node_modules\react-scripts\scripts\build.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:417:16)
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:452:10
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\webpack\lib\NormalModule.js:323:13
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\Users\corma\Desktop\Solana_Project1\metaplex-master\js\node_modules\babel-loader\lib\index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.2.0
error Command failed with exit code 1.
lerna ERR! yarn run build exited 1 in 'candy-machine-mint'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
It is the node.js version used with old code that is causing the error. Uninstall the current version of node and install the lts version (16.13.1) and the error will be gone.

'ENOTDIR' error while running relay-compiler with yarn

I am trying to make an application with react-relay following the step-by-step guide on the relay documentation. After running yarn install and adding the yarn relay script which runs "relay-compiler --src ./src --schema ./schema.graphql --language typescript". And I was getting an ENOTDIR error as below:
$ relay-compiler --src ./src --schema ./schema.graphql --language typescript
Error: spawn ENOTDIR
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:698:9)
at /home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1841:31
at new Promise (<anonymous>)
at Function.isAvailable (/home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1835:12)
at /home/Documents/workspace/relay-test/node_modules/relay-compiler/bin/relay-compiler:8221:61
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:25:9)
at /home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:32:7
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have then updated my versions of node, npm, yarn. And tried cloning some relay example projects from github, and I was getting the same error message with all repos that uses relay.
Turned out it was because I don't have the required watchman package, this was resolved by installing Watchman on my machine.

Cypress failed to start Windows

I have installed Cypress on my Windows 10 machine.
From my project folder in VSCode Terminal window I first ran npm init -y
I then run the following command npm install cypress --force
I then run the command npx cypress open I get the following error
PS C:\Projects\Cypress Projects\QACypressDemo> npm install cypress --force
npm WARN using --force Recommended protections disabled.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
added 219 packages, and audited 220 packages in 37s
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS C:\Projects\Cypress Projects\QACypressDemo> npx cypress open
It looks like this is your first time using Cypress: 7.3.0
× Verifying Cypress can run C:\Users\Usera\AppData\Local\Cypress\Cache\7.3.0\Cypress
→ Cypress Version: 7.3.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
#
# Fatal error in , line 0
# Failed to deserialize the V8 snapshot blob. This can mean that the snapshot blob file is corrupted or missing.
#
#
#
#FailureMessage Object: 000000BA300FEE30
1: 00007FF6C6C8BCCF node::OnFatalError+69935
2: 00007FF6C1AFE6CA Ordinal0+59082
3: 00007FF6C20ACEC8 v8::Isolate::Initialize+744
4: 00007FF6C2B6D48F v8::Isolate::AddMessageListenerWithErrorLevel+1039
5: 00007FF6C56D7583 std::__1::vector<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::max_size+857811
6: 00007FF6C56CF89B std::__1::vector<v8::CpuProfileDeoptInfo,std::__1::allocator<v8::CpuProfileDeoptInfo> >::max_size+825835
7: 00007FF6C60DA382 v8_inspector::protocol::Binary::operator=+2434098
8: 00007FF6C60DDC29 v8_inspector::protocol::Binary::operator=+2448601
9: 00007FF6C60D9E12 v8_inspector::protocol::Binary::operator=+2432706
10: 00007FF6C5DFB2D0 v8::ExtensionConfiguration::ExtensionConfiguration+2964624
11: 00007FF6C5DFAEEA v8::ExtensionConfiguration::ExtensionConfiguration+2963626
12: 00007FF6C5DF9E57 v8::ExtensionConfiguration::ExtensionConfiguration+2959383
13: 00007FF6C5DFA17D v8::ExtensionConfiguration::ExtensionConfiguration+2960189
14: 00007FF6C5603167 uv_sleep+2434663
15: 00007FF6C803FF02 uv_random+10012786
16: 00007FFFCF1937E4 BaseThreadInitThunk+20
17: 00007FFFD10ECB81 RtlUserThreadStart+33
----------
Platform: win32 (10.0.16299)
Cypress Version: 7.3.0
I tried deleting the Cypress folder from and run the install command again. Cypress still fails to run
C:\Users\Usera\AppData\Local\cypress
Not sure why Cypress won't run, the test runner won't open. Any ideas. Thanks.
I`ve had such problems when an installation was interrupted mid-way. You can clear the cache and install it again. I used the following sequence:
cypress cache clear
npm install cypress --save-dev
npm install and npx cypress run the binaries in two different locations. If you want to use the binary you installed into the directory, you need to run the binary found in the node module folder. On Windows, if you run ./node_modules/.bin/cypress that should start up the version in your node modules folder.

React Native FAILURE: Build failed with an exception

I made the necessary setups for react native on windows. Then I created my project with the command "npx react-native init projectname". Then I ran my project with "npx react-native run-android" command but I get the following errors.
C:\Users\user\OneDrive\Masaüstü\mobile\project>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
:ReactNative:Unexpected empty result of running '[node, C:\Users\user\OneDrive\Masaüstü\mobile\project\node_modules\react-native\node_modules\#react-native-community\cli\build\bin.js, config]' command.
:ReactNative:Running '[node, C:\Users\user\OneDrive\Masaüstü\mobile\project\node_modules\react-native\node_modules\#react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\user\OneDrive\Masaustu\mobile\project\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 195
* What went wrong:
A problem occurred evaluating script.
> internal/modules/cjs/loader.js:969 throw err; ^Error: Cannot find module 'C:\Users\user\OneDrive\Masaüstü\mobile\project\node_modules\react-native\node_modules\#react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15) at Function.Module._load (internal/modules/cjs/loader.js:842:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Unexpected empty result of running '[node, C:\Users\user\OneDrive\Masaüstü\mobile\project\node_modules\react-native\node_modules\#react-native-community\cli\build\bin.js, config]' command.
C:\Users\user\OneDrive\Masaüstü\mobile\project>
First, you have to install the latest version of #react-native-community/cli-platform-android
npm i #react-native-community/cli-platform-android
then go to the android directory and clean gradlew by the following command
cd android && gradlew clean
go back to your main directory and run app
cd.. && react-native run-android

Resources