WebDriver exception: InitSession ERROR unknown error: Chrome failed to start: crashed - selenium-chromedriver

I'm running Selenium locally on my Mac and I keep getting the error:
Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147#{#310}) on port 38869
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /Users/wngo/buzzho/src/main/resources/Chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'C02Z50V8LVDT.grubhub.local', ip: 'fe80:0:0:0:1020:d809:2ed6:d90b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_231'
Driver info: driver.version: ChromeDriver
remote stacktrace: 0 chromedriver_mac 0x000000010aa75c49 chromedriver_mac + 4893769
1 chromedriver_mac 0x000000010aa0f0e3 chromedriver_mac + 4473059
2 chromedriver_mac 0x000000010a6828fd chromedriver_mac + 751869
3 chromedriver_mac 0x000000010a5e0fa4 chromedriver_mac + 90020
4 chromedriver_mac 0x000000010a5dd9b9 chromedriver_mac + 76217
5 chromedriver_mac 0x000000010a610043 chromedriver_mac + 282691
6 chromedriver_mac 0x000000010a60ce43 chromedriver_mac + 269891
7 chromedriver_mac 0x000000010a5e662a chromedriver_mac + 112170
8 chromedriver_mac 0x000000010a5e7635 chromedriver_mac + 116277
9 chromedriver_mac 0x000000010aa375af chromedriver_mac + 4638127
10 chromedriver_mac 0x000000010aa4491b chromedriver_mac + 4692251
11 chromedriver_mac 0x000000010aa446bb chromedriver_mac + 4691643
12 chromedriver_mac 0x000000010aa1b109 chromedriver_mac + 4522249
13 chromedriver_mac 0x000000010aa44ea3 chromedriver_mac + 4693667
14 chromedriver_mac 0x000000010aa2d073 chromedriver_mac + 4595827
15 chromedriver_mac 0x000000010aa5c094 chromedriver_mac + 4788372
16 chromedriver_mac 0x000000010aa7bdb7 chromedriver_mac + 4918711
17 libsystem_pthread.dylib 0x00007fff774e82eb _pthread_body + 126
18 libsystem_pthread.dylib 0x00007fff774eb249 _pthread_start + 66
19 libsystem_pthread.dylib 0x00007fff774e740d thread_start + 13
This is the content of chromedriver.log:
[1594869395.109][INFO]: Launching chrome: /Users/wngo/buzzho/src/main/resources/Chromium --data-path=/tmp/data-path --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disk-cache-dir=/tmp/cache-dir --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --headless --homedir=/tmp --log-level=3 --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --single-process --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/user-data --window-size=1024x768
[1594869395.168][INFO]: [1beaee5b7391d5f4e1cd3129cb447869] RESPONSE InitSession ERROR unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /Users/wngo/buzzho/src/main/resources/Chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[1594869395.168][DEBUG]: Log type 'driver' lost 0 entries on destruction
[1594869395.168][DEBUG]: Log type 'browser' lost 0 entries on destruction
This is my environment:
OS: MacOS Mojave
ChromeDriver: 84.0.4147.30
Chromium: latest
And this is how I initiate the WebDriver:
public static WebDriver getHeadlessDriver() {
System.setProperty("webdriver.chrome.logfile", "../chromedriver.log");
System.setProperty("webdriver.chrome.verboseLogging", "true");
System.setProperty("webdriver.chrome.driver", "../chromedriver_mac");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--disable-gpu");
chromeOptions.addArguments("--window-size=1024x768");
chromeOptions.addArguments("--user-data-dir=/tmp/user-data");
chromeOptions.addArguments("--enable-logging");
chromeOptions.addArguments("--single-process");
chromeOptions.addArguments("--data-path=/tmp/data-path");
chromeOptions.addArguments("--homedir=/tmp");
chromeOptions.addArguments("--disk-cache-dir=/tmp/cache-dir");
chromeOptions.addArguments("--log-level=3");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("--disable-extensions");
chromeOptions.setExperimentalOption("useAutomationExtension", false);
chromeOptions.setBinary("../Chromium");
return new ChromeDriver(chromeOptions);
}
I really appreciate if anybody could give me a help. I have been struggling with this issue for awhile. Thank you.

Related

Chrome failed to start in GitHub Actions

This is the error message I get from GitHub workflows:
/opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py:76: in __init__ 47 RemoteWebDriver.__init__( 48 /opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:157: in __init__ 49 self.start_session(capabilities, browser_profile) 50 /opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:252: in start_session 51 response = self.execute(Command.NEW_SESSION, parameters) 52 /opt/hostedtoolcache/Python/3.9.6/x64/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute 53 self.error_handler.check_response(response)
response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: Chrome failed to start: exited a...wn>\\n#14 0x563a8d1c9e58 \\u003Cunknown>\\n#15 0x563a8d1e3dfd \\u003Cunknown>\\n#16 0x7f9599f6f609 start_thread\\n"}}'}
Note: I am using webdriver manager to install chrome driver.

Nativescript app rejected - binary crashed on launch -

I have NativeScript simple app which is based on Vuejs template. The app is super simple and loading HTML simple game to WebView of only one component Homve.vue.
<template>
<Page class="page">
<WebView
:src="gameURL"
bounces="false"
ref="myWebView"
#loaded="onWeViewLoaded"
/>
</Page>
</template>
<script>
export default {
computed: {
message() {
return "Hello from Opart 2019";
}
},
data() {
return {
gameURL: "~/assets/www/index.html"
}
},
created() {
//console.log('Home - created')
},
mounted() {
//console.log('Home - mounted')
},
methods: {
onWeViewLoaded() {
//console.log('onWeViewLoaded')
//this.$refs.myWebView.setAttribute('scrollView.bounces','false');
//console.dir(this.$refs.myWebView.src)
}
}
};
</script>
<style scoped lang="scss">
.page {
}
</style>
This app is super simple and never crashed on start testing locally on iPhone 7Plus, iPad Mini 2 with the latest iOS 12.4 but has been rejected on App Store Connect.
1.1 Binary Rejected - We were unable to review your app as it crashed on launch. We have attached detailed crash logs to help troubleshoot this issue.
Crash logs:
https://github.com/sylwesterdigital/appstore-nativescript-crashes
Below snippet from one of crashlogs:
{"app_name":"flaynative","timestamp":"2019-08-18 19:39:21.92 -0700","app_version":"1.1.1","slice_uuid":"3405f8e2-670c-3bd9-9c98-012dfbc24c9f","adam_id":1476202200,"build_version":"1.1.1","bundleID":"com.flaboy.oldflay","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 12.4 (16G77)","incident_id":"5C7CF351-D0F6-45E2-878C-C3EB3D620C97","name":"flaynative"}
Incident Identifier: 5C7CF351-D0F6-45E2-878C-C3EB3D620C97
CrashReporter Key: 4966d39ab305f825353b3c62041a83ff7279f465
Hardware Model: xxx
Process: flaynative [726]
Path: /private/var/containers/Bundle/Application/64AB551F-ECAA-4CF4-AF2C-9998EC6D4421/flaynative.app/flaynative
Identifier: com.flaboy.oldflay
Version: 1.1.1 (1.1.1)
AppStoreTools: 10G3
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.flaboy.oldflay [679]
Date/Time: 2019-08-18 19:39:21.8059 -0700
Launch Time: 2019-08-18 19:39:20.0711 -0700
OS Version: iPhone OS 12.4 (16G77)
Baseband Version: 7.80.04
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Last Exception Backtrace:
(0x1828a598c 0x181a7e9f8 0x100b8248c 0x100bc2028 0x100497420 0x1822f58e0)
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001824420dc 0x18241f000 + 143580
1 libsystem_pthread.dylib 0x00000001824bb094 0x1824b9000 + 8340
2 libsystem_c.dylib 0x000000018239aea8 0x182340000 + 372392
3 libc++abi.dylib 0x0000000181a67788 0x181a66000 + 6024
4 libc++abi.dylib 0x0000000181a67934 0x181a66000 + 6452
5 libobjc.A.dylib 0x0000000181a7ee00 0x181a79000 + 24064
6 libc++abi.dylib 0x0000000181a73838 0x181a66000 + 55352
7 libc++abi.dylib 0x0000000181a731a8 0x181a66000 + 53672
8 libc++abi.dylib 0x0000000181a73168 0x181a66000 + 53608
9 libobjc.A.dylib 0x0000000181a7eb3c 0x181a79000 + 23356
10 NativeScript 0x0000000100b8248c 0x100b3c000 + 287884
11 NativeScript 0x0000000100bc2028 0x100b3c000 + 548904
12 flaynative 0x0000000100497420 0x100490000 + 29728
13 libdyld.dylib 0x00000001822f58e0 0x1822f4000 + 6368
Anyone can help?

express fileupload fails on large file size

Please bear with me I'm new to fileUpload express. I have simple form to upload file. It works for file size of around 50MB but it fails for file sizes more than 100MB.
Here is the HTML file:
<form action="/parse"
method="post"
ref="parse"
encType="multipart/form-data">
<input type="file" class="btn btn-secondary input-file" name="inputFile" id="inputFile"/>
<input type="submit" class="btn btn-primary submit-btn" value="Upload"/>
</form>
And here is my initialization:
const fileUpload = require('express-fileupload');
var app = express();
app.use(fileUpload({
limits: {
fileSize: 1024 * 1024 * 1024 * 1024,
abortOnLimit: false
}
}));
It won't even hit my /parse url, it gives the following error on express app console:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli '~\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#5.6.0
3 info using node#v8.6.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle flow-trace-analizer#1.2.2~prestart: flow-trace-analizer#1.2.2
6 info lifecycle flow-trace-analizer#1.2.2~start: flow-trace-analizer#1.2.2
7 verbose lifecycle flow-trace-analizer#1.2.2~start: unsafe-perm in lifecycle true
8 verbose lifecycle flow-trace-analizer#1.2.2~start: PATH: ~\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;~\flow-trace-analizer\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;~\apache-maven-3.3.9\bin;C:\Program Files\nodejs\;C:\Program Files\Git\bin;~\AppData\Roaming\npm;C:\Program Files (x86)\WebEx\PTools020000000;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\R\R-3.5.0\bin\R.exe;~\Gradle\gradle-4.7\bin;~\Groovy\groovy-2.4.12\bin;C:\Program Files\Heroku\bin;~\AppData\Roaming\npm
9 verbose lifecycle flow-trace-analizer#1.2.2~start: CWD: ~\flow-trace-analizer
10 silly lifecycle flow-trace-analizer#1.2.2~start: Args: [ '/d /s /c', 'node ./bin/www' ]
11 silly lifecycle flow-trace-analizer#1.2.2~start: Returned: code: 3 signal: null
12 info lifecycle flow-trace-analizer#1.2.2~start: Failed to exec start script
13 verbose stack Error: flow-trace-analizer#1.2.2 start: `node ./bin/www`
13 verbose stack Exit status 3
13 verbose stack at EventEmitter.<anonymous> (
~\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (
~\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid flow-trace-analizer#1.2.2
15 verbose cwd ~\flow-trace-analizer
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "~\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.6.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 3
22 error flow-trace-analizer#1.2.2 start: `node ./bin/www`
22 error Exit status 3
23 error Failed at the flow-trace-analizer#1.2.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3, true ]
No code change is needed. In your package json for start script, have this command:
"start": "node --max-old-space-size=4096 ./bin/www"
Or if you run your node file from command line, run it like:
node --max-old-space-size=4096 PATH/TO/YOUR/EXECUTABLE/NODE/FILE

No symbolication for crash files with Xcode 7.3.1

I am not getting a symbolicated crash file using Xcode 7.3.1. My current version of the app never has symbols, however an older version of the app seems OK and the crash file is symbolicated.
I have tried to manually re-symbolicate by dragging it onto a device as described in this SO answer.
I tried to manually use the symbolicatecrash utility as described by this SO Answer.
I have confirmed that the dSYM file exists in the archive and am using it in both of the above manual attempts to rebuild the symbols. Any idea what I have missed?
Some of the crash files we received from our customers are corrupt. Using Apple's instructions Getting Crash Logs Directly From a Device Without Xcode, the customer copied the crash log and pasted it into email.
Something along the way corrupted the crash file though, injecting \n characters in somewhat random spots. We manually fixed the corrupted crash file by comparing it to an example from our system and symbolication worked.
Note the incorrect new line characters in the corrupted examples below:
Corrupt:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib
0x0000000185535188 0x185534000 + 4488
1 libsystem_kernel.dylib
0x0000000185534ff8 0x185534000 + 4088
2 CoreFoundation
0x00000001865325d0 0x186455000 + 906704
Should be:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x0000000185535188 0x185534000 + 4488
1 libsystem_kernel.dylib 0x0000000185534ff8 0x185534000 + 4088
2 CoreFoundation 0x00000001865325d0 0x186455000 + 906704
Corrupt:
Thread 12 crashed with ARM Thread State (64-bit):
x0: 0x0000000109020010 x1: 0x0000000109020020 x2: 0x0000000104f5c000 x3:
0xffffffffffff63ff
x4: 0x0000000000000001 x5: 0x0000000000000001 x6: 0x0000000108f84010 x7:
0x0000000000000000
x8: 0x0000200000000000 x9: 0x0000000000000000 x10: 0x0000000000000002 x11:
0x0000000174c4bb28
Should be:
Thread 12 crashed with ARM Thread State (64-bit):
x0: 0x0000000109020010 x1: 0x0000000109020020 x2: 0x0000000104f5c000 x3: 0xffffffffffff63ff
x4: 0x0000000000000001 x5: 0x0000000000000001 x6: 0x0000000108f84010 x7: 0x0000000000000000
x8: 0x0000200000000000 x9: 0x0000000000000000 x10: 0x0000000000000002 x11: 0x0000000174c4bb28
Corrupt:
Binary Images:
0x100910000 - 0x10093ffff dyld arm64 <f54ed85a94253887886a8028e20ed8ba> /usr/lib/dyld
0x188638000 - 0x188639fff libSystem.B.dylib arm64 <1b4d75209f4a37969a9575de48d48668>
/usr/lib/libSystem.B.dylib
0x18863a000 - 0x18868ffff libc++.1.dylib arm64 <b2db8b1d09283b7bafe1b2933adc5dfd>
/usr/lib/libc++.1.dylib
Should be:
Binary Images:
0x100910000 - 0x10093ffff dyld arm64 <f54ed85a94253887886a8028e20ed8ba> /usr/lib/dyld
0x188638000 - 0x188639fff libSystem.B.dylib arm64 <1b4d75209f4a37969a9575de48d48668> /usr/lib/libSystem.B.dylib
0x18863a000 - 0x18868ffff libc++.1.dylib arm64 <b2db8b1d09283b7bafe1b2933adc5dfd> /usr/lib/libc++.1.dylib

Mac node webkit crash

I'm trying to make a NodeWK app and sometimes it works but most of the time it quit by itself throwing this log :
Process: node-webkit Helper [19804]
Path: /Users/USER/*/G4-supervisor.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper
Identifier: com.intel.nw.helper
Version: 32.0.1700.107 (1700.107)
Code Type: X86 (Native)
Parent Process: node-webkit [19761]
Responsible: node-webkit [19761]
User ID: 501
Date/Time: 2014-06-26 11:33:13.563 +0200
OS Version: Mac OS X 10.9.3 (13D65)
Report Version: 11
Anonymous UUID: D2604DB0-20D2-EA4C-8A6E-B510AA4268E8
Sleep/Wake UUID: E182229F-8926-4545-BD57-42369F3452BC
Crashed Thread: 0 CrRendererMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
VM Regions Near 0:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Users/USER/*/G4-supervisor.app/Contents/Frameworks/node-webkit Helper.app/Contents/MacOS/node-webkit Helper
VM_ALLOCATE 0000000000001000-000000000009f000 [ 632K] ---/--- SM=NUL
Thread 0 Crashed:: CrRendererMain Dispatch queue: com.apple.main-thread
0 libsystem_c.dylib 0x91b76710 strlen + 16
1 node-webkit Framework 0x002ee701 v8::String::NewFromOneByte(v8::Isolate*, unsigned char const*, v8::String::NewStringType, int) + 241
2 node-webkit Framework 0x001c45db node::uv::ErrName(v8::FunctionCallbackInfo<v8::Value> const&) + 203
3 node-webkit Framework 0x002ff5e9 0xa3000 + 2475497
4 node-webkit Framework 0x0031aa2b 0xa3000 + 2587179
5 ??? 0x5a60c296 0 + 1516290710
6 ??? 0x3f1fa81a 0 + 1059039258
7 ??? 0x6009b2a6 0 + 1611248294
8 ??? 0x5a63f7d9 0 + 1516500953
9 ??? 0x5a6230ea 0 + 1516384490
10 node-webkit Framework 0x0035c317 0xa3000 + 2855703
11 node-webkit Framework 0x0035bee2 0xa3000 + 2854626
12 node-webkit Framework 0x002ebb6c v8::Function::Call(v8::Handle<v8::Value>, int, v8::Handle<v8::Value>*) + 268
13 node-webkit Framework 0x001da845 node::AsyncWrap::MakeCallback(v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) + 213
14 node-webkit Framework 0x001c3f71 node::UDPWrap::OnSend(uv_udp_send_s*, int) + 209
15 node-webkit Framework 0x00754095 0xa3000 + 7016597
16 node-webkit Framework 0x00756e0c 0xa3000 + 7028236
17 node-webkit Framework 0x0074974c uv_run + 332
18 node-webkit Framework 0x0010682c 0xa3000 + 407596
19 node-webkit Framework 0x00105d2c 0xa3000 + 404780
20 node-webkit Framework 0x0014a132 0xa3000 + 684338
21 node-webkit Framework 0x00164b5e 0xa3000 + 793438
22 node-webkit Framework 0x00149b1a 0xa3000 + 682778
23 node-webkit Framework 0x02557178 0xa3000 + 38486392
24 node-webkit Framework 0x02c7cf92 0xa3000 + 45981586
25 node-webkit Framework 0x02c7dd23 0xa3000 + 45985059
26 node-webkit Framework 0x02c7cce0 0xa3000 + 45980896
27 node-webkit Framework 0x000a49b9 ContentMain + 41
28 com.intel.nw.helper 0x0009ff75 0x9f000 + 3957
I'm using a few things like mysql connections and vue.js. As I don't know from where it comes, I can provide informations if needed.
I am currently playing around with this. It appears that node webkit crashes if you close the last window.
Solution: quit the app with gui.Window.get().close();
menu.items[0].submenu.append(new gui.MenuItem({
label: 'Close',
click: function () {
gui.Window.get().close();
}
}));