pa11y failed to Error: Failed to launch chrome - pa11y

Getting below error while running "pa11y www.google.com"
Welcome to Pa11y
Running Pa11y on URL www.google.com
Error: Failed to launch chrome!
[1127/090329.278232:FATAL:zygote_host_impl_linux.cc(116)] No usable
sandbox! Update your kernel or see
chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md
for more information on developing with the SUID sandbox. If you want
to live dangerously and need an immediate workaround, you can try
using --no-sandbox.

Related

Unable to Switch Appium Context

We have different WebView workflows for our App. I'm able to switch context for the Workflows which has contexts NATIVE_APP, WEBVIEW_com.bluebird.mobile and WEBVIEW_Terrace (3 contexts),
And not able to switch context for the workflows which has only two context NATIVE_APP and WEBVIEW_Terrace. While switching the context I get the following error:
Appium error: An unknown server-side error occurred while processing the command.
Original error: An unknown server-side error occurred while processing the command.
Original error: unknown error: Failed to get sockets matching: #weblayer_devtools_remote_.*14722
(make sure the app has its WebView/WebLayer configured for debugging)
(Driver info: chromedriver=105.0.5195.52 (412c95e518836d8a7d97250d62b29c2ae6a26a85-refs/branch-heads/5195#{#853}), platform=Linux 5.16.7-200.fc35.x86_64 x86_64)
When I look on the internet for the error "make sure the app has its WebView/WebLayer configured for debugging", I see solution to set setWebContentsDebuggingEnabled to true and we already set this configuration because some of the workflows are working.
Please let me know what I need to do here? OR what can I ask my DEV team to fix this.

Mocha, Electron: Errors in testing

I was testing my electron app with mocha and got this error several times (and I'm still getting it!). Every time I run the program it returns with the error
> Executing task: npm run test <
> forte#1.0.0 test PATH TO PROJECT
> mocha ./tests/test.js
0 passing (3ms)
Test failed Failed to create session.
unknown error: Chrome failed to start: was killed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location \node_modules\spectron\lib\launcher.bat is no longer running, so ChromeDriver is
assuming that Chrome has crashed.)
Just in case this is important, the part which says (The process started from chrome location \node_modules... actually had the whole path, not just that.
In my test.js file I have the code from the spectron home page, which you can view here. What is wrong with the test files?

React-Native "Could no connect to development server" in createReactContext()

My Android react-native app is crashing with an ExecutionException.
"Could not connect to development server."
The method that is crashing is ReactInstanceManagerImpl.createReactContext().
But this is not the normal error as this screenshot shows:
Logcat shows me this stacktrace:
Exception in native call from JS
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
Could not connect to development server.
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:860)
at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:98)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:194)
...
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
at com.facebook.react.common.futures.SimpleSettableFuture.get(SimpleSettableFuture.java:68)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:831)
... 9 more
Caused by: java.lang.RuntimeException:
at com.facebook.react.bridge.ReactBridge.loadScriptFromFile(Native Method)
at com.facebook.react.bridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:58)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:148)
at com.facebook.react.ReactInstanceManagerImpl$4.call(ReactInstanceManagerImpl.java:851)
...
This suggests that the server has sent the javascript code back to the device and the ReactBridge.loadScriptFromFile() somehow can't handle the bundle.
Points to clarify:
this happens on emulator & device (connected via USB)
this happens on Linux (Mint) & Windows (8.1)
I did run adb reverse tcp:8081 tcp:8081 as per the normal advice
I have run react-native start and the packager/server is running
the device DOES connect to the development server, as this is logged in the packager window
the URL that the device hits does return data, as can be seen if copied into the browser address bar
How is this different from the normal "Could not connect..." message?
Here is a screenshot of what happens when the server is legitimately not running:
The differences include:
no ExecutionException or RuntimeException before the error message
further clarity providing the URL that was called on the server
error comes from DevServerHelper.onFailure()
Logcat shows the stacktrace to be quite different in this normal expected case:
Unable to download JS bundle
com.facebook.react.devsupport.DebugServerException:
Could not connect to development server.
at com.facebook.react.devsupport.DevServerHelper$1.onFailure(DevServerHelper.java:196)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
This seems to have been caused by not having Windows Build Tools correctly installed. This broke the node-gyp commands required by my project.
Following the steps on the node-gyp page got my machine set up correctly.
After a new build I got this error once, and then it disappeared with the project building and running correctly.

Cargo start up error

I am running 'mvn clean install -Dmaven.test.skip=true' command for a web application. but it gives following error. I set the catalina home as an environment variable. i am using maven 3.1.1 version. Please help me
FATAL ERROR in native method: JDWP No transports i
nitialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Addres
s already in use
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:star
t (start-container) on project RCMigrationWebApp: Execution start-container of g
oal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start failed: Failed to start t
he Tomcat 7.x container. Deployable [http://localhost:8080/cargocpc/index.html]
failed to finish deploying within the timeout period [120000]. The Deployable st
ate is thus unknown. -> [Help 1]
Probably you have to kill any process running at 8080, looks like the port is already in use..
ERROR: transport error 202: bind failed: Address already in use
Port in use. Run netstat -bv if you are using Windows. You will get to know which process is holding up the port. With your stackTrace, it looks very obvious.
Let me know if it helps.

Selenium CaptureEntireScreenShot throws error in IE

How to resolve this below issues while capture screen in IE?
I have registered the snapsie.dll in C:\Windows
Error Detail:
"Error: Snapsie failed: Is it installed? Does it have permission to run as an add-on? See http://snapsie.sourceforge.net/"