Is there any workaround for "session deleted because of page crash" Chrome error on Travis CI? - google-chrome

I'm using container-based infrastructure on Travis CI (so I can't use sudo) and I'm trying to run tests using Selenium (Protractor) on the latest Chrome stable. When I try to run the tests, I'm getting this error: session deleted because of page crash and all tests fail.
I found that one of the possible issues might be too small /dev/shm, which seems to be common when running Chrome on docker (https://code.google.com/p/chromium/issues/detail?id=522853). It looks like there are some workarounds for Travis CI, but they all require sudo.
Are there any workarounds for containers on Travis?

Seems like the only workaround at the moment is to use Trusty image (via sudo: required, dist: trusty in .travis.yml file). The Chromium issue mentioned in my question has already been fixed and should land in Chrome 49 (currently Canary), but I'm not sure if it's going to work in docker container anyway.

Related

Error in initiating astro after choosing a framework

I'm trying to initiate astro. When i don't choose a framework i get this error although i have git installed and fully working. Any help will be highly appreciated.
√ Which frameworks would you like to use? »
> Copying project files...
could not find commit hash for latest
This seems to be an issue with degit. Please check if you have 'git' installed on your system, and install it if you don't have (https://git-scm.com).
If you do have 'git' installed, please file a new issue here: https://github.com/withastro/astro/issues
It depends on your OS and environment.
For instance, withastro/astro issue 2144 reports the exact same error message, but on Windows, using Linux on WSL2 (Ubuntu 20.04.3 LTS).
Double-check your %PATH%/$PATH in your execution environment.
Update Oct. 2022, ten month later: withastro/astro issue 2144 is reported closed with the workaround by Matej Bunček:
As I was researching this seems to be a general issue with NPM for those who uses SSH.
There's an open issue here: npm/cli#2610 which is still far from being resolved and it's a huge thread.
Some folks might be interested in these workarounds to get it working.
git config --global url."https://github.com/".insteadOf git#github.com:
git config --global url."https://".insteadOf git://
Also I've tried yarn, npm and pnpm, all of them seems to have same problem so I believe it's core problem of node.
Also both npm 6 and 7 are not working.
Not a direct solution to your error message, but a general solution for those kinds of errors:
I would recommend doing the development inside docker containers, so called devcontainers.
Since you will develop in separate and isolated environments containing only the project's minimum dependencies and tools, it is a lot less likely to face OS specific issues in general.
Here are some resources to get started:
https://code.visualstudio.com/docs/remote/containers
https://microsoft.github.io/code-with-engineering-playbook/developer-experience/devcontainers/
https://github.com/microsoft/vscode-dev-containers

Chrome headless screenshot on local machine

I have a localhost website created with ember which is just working fine.
I want to use Lighthouse to get some metrics about the performance over time. Of course I want this to be in Chrome and headless. I installed Lighthouse using NPM and run the following command:
lighthouse http://localhost:4200 -chrome-flags='--headless'
When running above, I got the following error resulting in a question mark as a performance metric:
Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. (SPEEDINDEX_OF_ZERO)
I tried running the dist folder of ember with the http-server package, but no differences in the result. The same error occurs.
When I run the test against google.com or against a website in our test environment I get a result back and not the error. When a colleague is running it on his local machine, no error occurs. Only difference we can find is he is running win8.1 and my machine is win10.
When I run Chrome without the headless flagg I also get a result, but I need it to work headless.
I'm using all the latest versions of Lighthouse, Chrome, Windows10, node. Also tried Chromium but no differences.
Hopefully someone got an idea
After a week I tried again, still the same error. Now I tried again and it works. Nothing changed to my codebase and all apps, packs and so on are also the same version which I can see.
I don't know what fixed the issue, but it works now. Case closed.

how to free a localhost port on mac

I have read the posts similar to this but to no avail.
I am in the midst of a comprehensive tutorial for Angular (5). I am on MacOs High Sierra 10.13.3. I am using Chrome Version 64.0.3282.140 (Official Build) (64-bit).
I just completed one project in the tutorial. I am now trying to complete the next project in the tutorial. The project is set to use the default port 4200 on localhost. All of the projects have executed this way.
I have performed my npm install. My npm start script is simple, = "ng serve". I enter npm start and it serves up the project as expected. I then go to my browser and enter the address localhost:4200. The previous project renders. I can't get the current project to render. These are the things I have tried to remedy the situation:
sudo lsof -i tcp:4200
changing the start script to ng serve --port 4300 and then using the address localhost:4300 (tried it with 5000 too)
Actually the first thing I did was look for an active activity on port 4200 in the Activity Monitor
Clear my Chrome browsing history
Restart my computer.
Tried the same process using Firefox as a browser
Tried it using Brave as a browser
In each and every case when I enter localhost:(anything) I get the previous project. Any ideas?
If I could delete this question I would. I discovered the problem.
I only THOUGHT I was pointing to the new project. In reality, I was pointing at the old project. THAT is why the same thing kept coming up and that is why nothing I tried would work.
I am embarrassed. Clearly, I am still a rookie. I hope no one spent any time on this.

deploying YouTrack6 on OpenShift

Some time ago, I've deployed a YouTrack5 instance on OpenShift, using this excellent tutorial. It works fine and smoothly.
Now, I want to install YouTrack6. Unfortunately, the same method can't be used for it, as since version 6 YouTrack .war file is no longer available.
So, I've tried to deploy YouTrack6 jar via a DIY cart, which should be ok, as the jar can be run standalone.
This is the command line that I've provided in the
.openshift/action_hooks/start script:
nohup /usr/lib/jvm/java-1.7.0/bin/java -Xmx1g -XX:MaxPermSize=250m -Djetty.home=$OPENSHIFT_DATA_DIR -Duser.home=$OPENSHIFT_DATA_DIR -Ddatabase.location=${OPENSHIFT_DATA_DIR}teamsysdata -Djava.awt.headless=true -jar ${OPENSHIFT_REPO_DIR}youtrack-6.0.12463.jar ${OPENSHIFT_DIY_IP}:${OPENSHIFT_DIY_PORT} &
Indeed, it works, the application is deployed and started - BUT: it is very unstable, looks like it crashes and caused to restart after just every few actions.
From the logs, I couldn't understand where the problem lies, looks like on YouTrack's side everything's ok.
My question is - what can be the problem that causes this unstable behavior, and is there any way to work around it (maybe by changing the command line flags, etc.)?

How to configure Brackets.io Live Development to use Chromium instead of Chrome on OSX?

I would like to reuse already installed in the system Chromium browser and do not additionally install Chrome (because then I can't use Chromium at the same time - they share one profile folder by default on OSX, also for other reasons)
Here are ideas, the problem is - they are just conceptual, not ready to implement:
edit Brackets configs (didn't find much of them) to call Chromium (how it calls)
edit Chromium configs (to mimic the Chrome?)
use dev tools remote debugger and connect to created web-socket
create link to Chromium via: sudo ln -s ~/Applications/Chromium.app/Contents/MacOS/Chromium /usr/bin/google-chrome // didn't work
connect to the simple static server from the folder (via httpster) // didn't work
How is it possible to use Chromium instead of Google Chrome to use Brackets' Live Development feature?
On Mac, Brackets locates Chrome based on its bundle identifier. So in theory, if you hack Chromium's Info.plist to change its bundle id to com.google.Chrome (and I guess remove or patch any copies of Chrome that might collide with that) -- then Brackets should launch Chromium for you.
In the future, Brackets plans to make this more configurable as an official feature - but it's not there yet.