TestCafe can't establish browser connection when running against Electron app - testing

I am attempting to run a test on our Electron app using TestCafe. I have tried many things but after many hours am still getting the error below:
"ERROR Unable to establish one or more of the specified browser
connections. This can be caused by network issues or remote device
failure."
The cases I have read Googling around do not seem to apply to my case.
I have everything set up as described here: https://github.com/DevExpress/testcafe-browser-provider-electron#testing-an-executable-electron-application
The .testcafe-electron-rc file is correct in that my app does indeed launch but errors as above. I do not think it gets to my script which is very simple for debugging purposes. I have tried changing the mainWindowUrlPath to various locations since it seems like my app is run from C:/Program Files/MyApp/resources/" which contains an app.asar file even though our app is located in "C:/Program Files/MyApp/MyApp.exe"
I have tried setting up the .testcafe-electron-rc in many configurations including the one described in the documentation as well as many others. An example is below which I realize is non-standard:
{
"mainWindowUrl": "C:/Program Files/MyApp/resources/app.asar/index.html",
"electronPath": "C:/Program Files/MyApp/MyApp.exe"
}
Note, I have never seen the index.html anywhere in the app directory but assume that TestCafe must dive into the asar in some manner.
I have disabled the Windows firewall but still, the same issue exists.
I have run my tests with nodejs installed globally and testcafe and the Electron provider installed globally and locally (i.e. run these configurations separately) but the same issue occurs.
Does anyone have any other ideas? Any help appreciated.
This is on Windows 10.
m

Related

HTTP requests stuck in Pending state when using Vite

I have a rather large Vue 3 application (~550 components). It takes two minutes just to run vue-cli-service serve and around 20 seconds to re-build it after each change. Hot reload stopped working a long time ago so it always needs to be refreshed in the browser even after a small style change. Moreover, the app is still not finished and it will probably get 2-3 times this big in the next year so it will probably be even worse.
Because of these problems, I've decided to migrate it from Vue CLI to Vite. I have already resolved a lot of problems and the app seems to work with Vite now with so much better loading times.
However, it sometimes gets stuck when I start a dev server (vite command) and open it in a browser. The page keeps loading and I can see a lot of pending requests in the Network tab of Chrome DevTools. There's nothing special in the output of vite --debug and running vite --force doesn't help either.
When this problem occurs, the browser always loads a lot of modules (~900) and then it gets stuck on 10-20 modules. The status of all these HTTP requests is simply Pending and they never finish. There are no errors in the browser or on the command line.
I don't think any particular file causes this. Maybe the problem is in my deeply nested folder structure with a lot of re-exports using index.ts file on each level. It mostly gets stuck on my own modules but I've also seen cases when it was waiting for a module of some external library.
Has anybody experienced a similar problem? How did you solve it?
EDIT: I have discovered that this issue only occurs in Chromium-based browsers (Google Chrome, Brave, etc.) on Linux. It works without any problems in Chrome on MacOS and Windows as well as in other browsers (Firefox, GNOME Web, etc.) on Linux.
Thanks to this comment, I realized this was a problem with the file descriptors limit.
On Manjaro Linux (Arch-based), I was able to solve it by adding the following line to both /etc/systemd/system.conf and /etc/systemd/user.conf file:
DefaultLimitNOFILE=65536
After this change, Vite works without any problems in all browsers.

Whys is IISExpress giving 404, when server IIS works

I am using Visual Studio 2017 version 15.8.7 on windows 10.
This issue is happening for Asp.net MVC 4 websites and Web Api 2. Not for Aspnet.Core sites (so far)
Lately I have been having issues where I will be debugging a website and it will work fine then all of a sudden the next time you start the project up, it gives a 404 error. The only way to fix the error is to use a different computer, create a new project and copy the info over.
Every time I start the debugger and get 404, this event is recorded.
The directory specified for caching compressed content
C:\inetpub\temp\IIS Temporary Compressed Files\Clr4IntegratedAppPool
is invalid. Static compression is being disabled.
Things I have tried.
Uninstal VS / IISExpress and reinstall, including delete all folders in program files
Create a new project and copy code over. (works, but then happens again later on)
Use different computer. (works, but eventually that computer hits the issue too)
Tried creating the temporary folder and giving "Everyone" full control of it.
Tried changing port number and re-creating virtual directory
Tried deleting entire solution folder and re-cloning repo.
The issue does not happen on the web servers, only locally.
Any idea on what is going on? I can't find any configuration that is telling IIS to compress the files, so not sure why I keep seeing that error.
Edit
I determined that the application_start even in global.asax is never firing (StreamWriter code in it to log to a file in case debugger issue). So I assume the 404 is because the routes never get registered.
I tried updating Microsoft.AspNet.Mvc to the latest 5.2.6.
Edit 2
So I found a workaround. I installed IIS locally and publish to a folder and debug by attaching to the process. If I point IIS directly at the project or use IIS within VS it doesnt work.
I think the issue is related to some dll goofiness, project seems to work once published.
Edit 3
Found the root of the problem. I use Ubuntu/bash on windows. Cloning the git repo through bash seems to be setting the permissions wrong. If I clone through command line, the issue does not happen. Now I need to figure out why bash is screwing up the file permissions.
Same issue with VS2017 on Windows 10, default IIS Express and git for Windows. Suddenly iisexpress returns 404 on /Default.aspx!!??
Solution:
Close VS2017
Delete the git repository in the file system.
Open VS2017
Clone the git repo
this helped on my machine.

Eclipse Indigo Apache HTTP server: problems publishing

I have an Apache 2.2 server that I am trying to use from within Indigo. I have a static web project and if I copy the project to htdocs it runs fine. However, when I try to publish it from within Indigo, I get the error message that the path cannot be found. Also, in the Servers view, the server is listed and shown as running, but when I open the context menu for this server, all the control options (stop, restart, restart in debug) are grayed out.
Additional info:
httpd.conf DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs"
src dir/eclipse workspace: E:\workspace-html5\WebvilleTunes
i.e. is the problem maybe that my localhost and workspace are on different drives?
Also - also platform is Windows7/64-bit - and that's the version of indigo I installed.
Also, when I try to use the internal HTTP preview server, I get the error message:
Could not find required bundle org.mortbay.jetty.server. I see this has recently been registered as a bug, so I'm not very hopeful about getting around that one quite yet.
Can anyone help me get a server up and running for debugging a static web project (i.e. just javascript and html right now).
Thanks.
I solved my problem as follows: de-installed and re-installed Apache 2.2 to E:\Apache2.2. It now works - i.e. can publish my pages from eclipse to Apache and pages work. I don't know if it is that the path is now on the same drive, or that it doesn't have any spaces or that the Apache 2.2 version is a slightly newer one (2.2.22) that maybe resolved some issues with Indigo, or maybe it was just the fact that I (re)installed Apache AFTER installing Indigo.
Anyhow, hope this helps anyone having similar problems.

How important is it to have a clean test suite on CouchDB?

I recently installed CouchDB, but haven't gotten past the test suite yet. It seems that each time I run it, I get different errors than before, even without configuration changes.
The CouchDB Guide says the test suite shouldn't have "an inordinate number of failures", but what is "inordinate"? How many errors should I tolerate before I start developing?
For reference, here are the errors I'm seeing.
When installed from Ubuntu repository (Runs 1 & 2):
oauth
replication
rev_stemming
security_validation
view_conflicts
Then remedied by removing, then installing from source, as suggested here:
Run 3
attachments
jsonp
Runs 4 & 5
attachments
auth_cache
jsonp
list_views
rev_stemming
Run 6, after clearing cache, then restarting couchdb
No errors!
If each test passes individually, you are all set to proceed with development.
The test suite is not as reliable as we'd like due to its dependence on the javascript engine inside the browser and various timing and other issues. It is mostly used to help the developers validate a release.
We are planning to improve this situation in future releases, most likely by moving the test suite out of the browser entirely and running it from a known environment.
If you do want to see all tests pass, then be sure you are using FireFox (the only browser we officially support for running the test suite itself). You might also find it necessary to clear your browser cache too.

bootstrap server. Error in iPhone SDK

Can anyone help for the following ERROR:
Couldn't register com.india.XXX with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
here m using xcode 4.1 and i have same project folders in my local desk.
When ever i open multiple projects with the same name its showing the above error.
Thanks in advance.
Some of the fixes that the links Saif contain may work for some, but not for me.
I have a very simple solution without restarting that will usually get you through the day.
When you get this error, before you do anything else, build for the other device (if you are running a universal application).
When you build for the other device, it kind of "overwrites" the process that creates this error. Once the other device is up and running, immediately build for the device that created the error. This will work most if not all the time, and will save you time digging through the multitude of fixes you will find in the other links.
I tried almost all of the fixes found there and none of them worked in my case. This works, but you should check your appDelegate for any bugs in your willEnter/didEnter (and other related methods).