Cypress on WSL with X-Server opens empty windows - cypress

I've followed this article for running Cypress on WSL (Ubuntu distribution).
When I run cypress open in WSL it does open Cypress app on Windows but Cypress doesn't display anything and WSL throws errors:
[4186:1214/162139.560525:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4186:1214/162139.560902:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[4186:1214/162139.564644:ERROR:udev_watcher.cc(63)] Failed to enable receiving udev events.
[4186:1214/162139.579120:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[4339:1214/162139.734198:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[4339:1214/162139.739939:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
When I run cypress run (headless) tests end with timeout:
Running: layout/footer.spec.ts (1 of 19)
Timed out waiting for the browser to connect. Retrying...
When I run cypress run --headed it opens VcXsrv window but it's all empty:
After a while it opens another VcXsrv window, also empty. While tests are failing with timeouts (The browser never connected. Something is wrong.) it continues to open more and more empty VcXsrv windows.
My Node version is 16.1.8. Cypress version 9.7.0. Ubuntu version 22.04.1 LTS.

Related

Unable to set windbg for windows VM

I want to debug the kernel of windows server 2019. My physical host is windows 10. My
VM is windows server 2019(VirtualBox). I followed this video on youtube to complete my
setup<https://www.youtube.com/watch?v=V7DJ_ptkOpM>.
I got this on my VM which I think it's not the reason I failed
c:\KDNET>.\kdnet.exe 172.26.48.1 51111
Enabling network debugging on Intel(R) PRO/1000 MT Desktop Adapter.
Manage-bde.exe not present. Bitlocker presumed disabled.
To debug this machine, run the following command on your debugger host machine.
windbg -k net:port=51111,key=1gofrzddjdu9q.2stxhh3p9pieh.114a4fe4c4vr4.16nbo0k9ghw3v
Then reboot this machine by running shutdown -r -t 0 from this command prompt.
I run the command
windbg -k net:port=51111,key=1gofrzddjdu9q.2stxhh3p9pieh.114a4fe4c4vr4.16nbo0k9ghw3v
The result is this
Using NET for debugging
Open WinSOCKET 2.0
Failed to initialize IPv6 socket. Error On-2147467259
Will attempt to connect to IPv4 only
Failed to initialize IPv4 socket. Error On-2147467259
Kernel debugger failed initialization. HRESULT 0x80004005
unspecified error

Composer-Rest-Server not connecting

I am testing a a business network I created, I ran the Composer-rest-server and all worked fine, then shut the server as suggested in the developers guide , then I proceeded use the yo hyperledger composer to create the skeleton of the angular app, however, now the angular app is showing in the local browser, however, the composer-rest- server is not.
Expected Behavior:
I should start the composer-rest- server in localhost:3000 and the angular app as well
Actual Behavior:
I get this message;
scovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
at _checkRuntimeVersions.then.catch (/home/node/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:696:34)
Your Environment
composer-cli#0.11.3
generator-hyperledger-composer#0.11.3
composer-rest-server#0.11.3
Docker version 17.06.0-ce, build 02c1d87
docker-compose version 1.13.0, build 1719ceb
The Problem
If you kill your fabric instance using ./stopFabric that you started using the ./startFabric command then all the containers that were apart of the business network were killed as well and therefore you need to reinstall the .bna and start the network again. (the development flow provided is purposely volatile for rapid development)
The Solution
1.) Type docker ps to see all of your running containers. You should see none if you are getting that error because your peer is not responding to pings
2.) Open a separate terminal and navigate to where you have fabric-dev-servers in the terminal and run ./fabricStart. This will start all the containers like your network Certificate Authority, the peer, the orderer, etc.
3.) Return to your project in another terminal. Do Step 1 & 2 found at the developer tutorial (you likely won't need to do step 3 since you likely already imported the network administrator identity going through the tutorial)
4.) Run composer network ping --card admin#tutorial-network. The ping should go through.
5.) Run docker ps. You should see 4 containers running
6.) Run composer-rest-server and follow the steps from the tutorial.
7.) Run cd tutorial-network-app to switch to where your angular application is (or wherever you generated it with the yo command)
8.) Navigate to http://localhost:3000 and everything should work.
Any other questions or problems just reply here and I can help.
The expected behaviour is that the REST server is already running (the the generator uses Loopback to spin up a REST server already (that's why you shut down the previous REST server)). Its described here https://hyperledger.github.io/composer/unstable/tutorials/developer-guide.html under 'Generate your Skeleton Web Application'.
After you created the application - following completion of the yo hyperledger-composer questions (and after providing the answers) you run your application using npm start from within the generated application directory. Your app is accessible at http://localhost:4200.

server.bash is not a valid win32 application

I'm trying to host a simple (demo) websocketd server. Basically, it listens to incoming websocket connections and routes them towards my server. However, when I run the websocketd --port=8069 server.bash (In the correct directory, websocketd running as admin) I get the following error when trying to connect to ws://localhost:8069:
Could not launch process .\server.bash (fork/exec .\server.bash: %1 is not a valid Win32 application.)
I've looked into netstat and the 8069 IS listening for incoming connections.
I've also tried running a python server (I have it installed) but I get the same error
//System Info:
I'm running x64 windows 10.
Description of websocketd from the url you provided
It takes care of handling the WebSocket connections,
launching your programs to handle the WebSockets, ....
So basically websocketd is trying to execute server.bash which doesn't work because windows doesn't recognize this file as executable.
This script was probably meant to be run on linux in the first place however if you have installed bash already on windows u can try running it by replacing
websocketd --port=8069 server.bash
with
websocketd --port=8069 bash server.bash

Mongodb on Terminal keeps getting stuck

I have a Macbook Pro with El Capitan. I installed mongodb on my terminal with macports, which is similar to homebrew. I've followed all of the instructions and I've made sure to change the user permissions to /data/db. Does anyone have any idea of what's wrong with my mongodb installation?
Whenever I try to run "mongod", it keeps pausing at "waiting for connections on port 27017". This is shown in Screenshot 1. Then I hit CTRL-C to exit, and I get more error messages shown in Screenshot 2. Also the "mongo" command does not work either.
Here is the error report shown when entering "mongo".
MongoDB shell version: 3.0.8
connecting to: test
2016-01-11T19:08:41.888-0600 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
2016-01-11T19:08:41.890-0600 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Here is a link to my google drive with a photos of the error report for "mongod".
Screenshot 1 - https://drive.google.com/file/d/0Bwl_BDx-HIfcYnBJRUJfbzFvSm8/view?usp=sharing
Screenshot 2 - https://drive.google.com/file/d/0Bwl_BDx-HIfcdkVkUWJzeENuelU/view?usp=sharing
Whenever I try to run "mongod", it keeps pausing at "waiting for connections on port 27017".
This is exactly what it is supposed to do. Unless you indicate otherwise via a command switch (such as "--fork"), running "mongod" starts up the mongo server process within the current shell and blocks that shell until the process is terminated (via CTRL+C).
If you want to connect to the running mongo server process via the mongo shell, you'll need to open a second terminal to do so. From there, run "mongo" and it should connect to the server running in the first terminal shell.
Re-cap:
In terminal #1, run "mongod". When it says "waiting for connections...", it's ready to accept client connections. Do not stop the process via CTRL+C; do not close that terminal.
In terminal #2, run "mongo". It should connect to the server successfully.
This "connection refused" message is significant:
2016-01-11T19:08:41.888-0600 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
You need to work with the packet filter to flush all the rules. See this article near the bottom in order to open port 27017 which is what mongod uses:
http://www.macworld.co.uk/how-to/mac-software/how-open-specific-ports-in-os-x-1010-firewall-3616405/
This is quite direct:
https://gauravsohoni.wordpress.com/2015/04/14/mac-osx-open-port/
This may be less helpful but still worth glancing through:
https://support.apple.com/en-us/HT201642

Jenkins Windows slave gives Unexpected Error with JNLP start

I have a Jenkins server running happily on a Windows server. I need to connect 2 other windows servers as slaves.
One connects in fine (start using JNLP, then installed as a Windows service).
The other fails to connect using JNLP. Whether I use the Launch button or the javaws command line it fails with 'Unexpected Error - Unable to launch Slave Agent for {node}'. If I start the slave using the headless command line it works, so I suspect it's not networking/firewall related.
I'd like to get the JNLP launch working so I can install it as a Windows service.
Other notes:
the Jenkins URL is set OK
we're using Matrix security, but anonymous has Slave/Connect
Any help gratefully received.

Resources