Puppeteer Error: Failed to launch the browser process when run in Google Cloud Function - google-cloud-functions

I have function tracking use Cloud Scheduler run every min, every day deploy in Google Cloud Function.
In this function, I have use puppeteer and mostly function tracking run very well but sometimes, my functions have an error
Error: Failed to launch the browser process!
[0220/073301.661396:ERROR:address_tracker_linux.cc(201)] Could not bind NETLINK socket: Permission denied (13)
[0220/073301.661935:ERROR:file_path_watcher_linux.cc(71)] Failed to read /proc/sys/fs/inotify/max_user_watches
Inconsistency detected by ld.so: ../elf/dl-tls.c: 481: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed!
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/srv/node_modules/puppeteer/lib/Launcher.js:750:14)
at ChildProcess.helper.addEventListener (/srv/node_modules/puppeteer/lib/Launcher.js:740:61)
at emitTwo (events.js:131:20)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
This is the frequency of errors
Puppeteer version: v2.0.0 and update newest v2.1.1 yesterday
Platform/ OS version: Google Cloud Function
Node.js version: 8
I searched for all the issues of puppeteer but unsolvable my case. Please help me
Thankyou

You need to downgrade your puppeteer version to 2.0.0, it's looks like if there is something which make failed puppeteer when you deploy your app.
You can check
https://github.com/puppeteer/puppeteer/issues/5379#issuecomment-587185091
For elastic beanstalk worked for me by downgrade puppeteer version.

Related

Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443 throws on uploading files to appcenter

I am working on sample tests for mobile application and to upload and run in AppCenter. I have tried with XamarinUITest and C# combination; test files uploaded and ran successfully. On trying test files with Appium, Java and Junit and tried to upload it in AppCenter throws Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443 in Terminal.
The snippet I am using to upload is:
appcenter test run appium --app "Appium/JunitiOS" --devices "Appium/iphone" --app-path pathToFile.ipa --test-series "test" --locale "en_US" --build-dir target/upload
Note: given corresponding file paths in the snippet.
and get the below in Terminal:
Preparing tests... done.
Validating arguments... done.
Creating new test run... done.
Validating application file... done.
Uploading files... failed.
Error: getaddrinfo ENOTFOUND api.appcenter.ms api.appcenter.ms:443
Environment: darwin
App Upload Id: Appium/JunitiOS
Timestamp: 1554114371409
Operation: RunAppiumTestsCommand
Exit Code: 3
This error usually occurs when there's some sort of network issue (either WiFi dropping out, a corporate firewall or proxy or a DNS issue are likely culprits)
Things to try if the successful upload is running on a different machine or a different network
Check the failing upload over a different network
Make sure you can see the URLs and IPs from the machine you're running on
If that fails - reach out to support using the App Center portal and a support engineer will help you get up and running
Things to try if the successful upload is running on the same machine on the same network
Double check that the UITest tests are still working successfully
Check that you don't have any corporate firewall policies which could be blocking specific files
If that fails - reach out to support using the App Center portal and a support engineer will help you get up and running
I would also recommend running the command again using --debug - you should be able to see the API calls being sent and identify at which point the uploads are failing (and if it's the same point every time).

Selenium - Uncaught WebDriverError: chrome not reachable

Currently I'm using the follow stack:
1. Selenium Webdriver 3.0.1 (NodeJS API)
2. Mocha
3. Chromedriver 2.25.3
Often when I run my tests in Codeship (continuous integration) I get this error:
Uncaught WebDriverError: chrome not reachable
(Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.2.0-42-generic x86_64)
Note: This never happened running locally, only occurs when my tests start in codeship, and it's an intermittent error (sometimes it happens, sometimes not)
Screenshot error:
Any ideia how solve this?
Does codeship have chrome installed on their test server?
I'm guessing not. It might be better to run this against phantomjs (headless browser) instead for CI purposes.

LibGDX - HTML5 Run&Deploy

I'm using Android Studio.
I want to run and deploy my application on HTML5.
I'm entering the command "gradlew.bat html:superDev" on the Terminal, but it gives me that error message:
Execution failed for task ':core:compileJava'. Could not find tools.jar
How can I solve this problem?
Here's the full error message:
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Configuration on demand is an incubating feature.
:core:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':core:compileJava'.
> Could not find tools.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I had the same issue.
You need install jdk Download here
You need configure your variable environment: JAVA_HOME
Or you can copy tools.jar from %JAVA_HOME\lib to Android Studio\lib

How to debug the cartridge scripts in Openshift?

I want to develop a new cartridge for my own use. I use OpenShift Cartridge Development Kit to start my work. My building script is written in .openshift/action_hooks/build and it can be successfully executed.
But when I tried to use the command displayed on the homepage of the CDK project - "rhc create-app mynewcart http://##YOUR-DOMAIN##/manifest/##YOUR-COMMIT-ID##" - to create an app, I got the following error: "Unable to complete the requested operation due to: An invalid exit code (1) was returned from the server ex-std-node161.prod.rhcloud.com. This indicates an unexpected problem during the
execution of your request."
How can I trace the progress of deploying and find out where is the code that caused the problem? Is there any log file available for me to analyse?
Use the --debug option when running the command and you'll get much more detailed output:
rhc create-app mynewcart http://##YOUR-DOMAIN##/manifest/##YOUR-COMMIT-ID## --debug

Error using ChromeDriver when kicked off from teamcity

I was having trouble with firefox for my watir-webdriver tests and decided to move over to CHROME. This runs fine local dev box, however when kicked off from team city on our qa server I get the following error:
This is using the same chromedriver as on dev box.
Windows 2003 Server 32 bit
Chrome 14.0.835.186
chromedriver_win32_14.0.836.0.zip ChromeDriver server for win32
Ruby 1.8.7
watir-webdriver 0.3.4
selenium-webdriver 2.7.0
watir-page-helper 0.3.0
Error
[15:57:06]: Started ChromeDriver
[15:57:06]: port=1203
[15:57:31]: .\test\automation\proxy_launcher.cc(89): error: Value of: app_launched
[15:57:31]: Actual: 1
[15:57:31]: Expected: AUTOMATION_SUCCESS
[15:57:31]: Which is: 0
[15:57:31]: Error while awaiting automation ping from browser process
[15:57:56]: .\test\automation\proxy_launcher.cc(223): error: Value of: automation()->GetBrowserWindowCount(&window_count)
[15:57:56]: Actual: false
[15:57:56]: Expected: true
I believe your problem is you're running the TeamCity agent as a service, try manually running the agent using the instructions on: http://confluence.jetbrains.net/display/TCD5/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-StartingtheBuildAgent
I'm not using TeamCity or Watir, but I had the same error message from webdriver (using selenium server) running under a windows service.
The solution that worked for me was to run the service under another account and not the system account. Might be worth a try?