我正在使用0.11.14节点(通过'n'节点版本管理器安装)。当我开始使用'n'时就是这些问题开始的时候。
我正在运行Java 1.7
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
启动selenium webdriver我收到以下错误
webdriver-manager start --standalone
seleniumProcess.pid: 3632
12:57:21.793 INFO - Launching a standalone server
java: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Selenium Standalone has exited with code null
更新:使用没有版本管理器的节点
我刚卸载'n'并从github安装了节点(标准./configure& make; make install)。现在我安装了verion 0.13.0-pre并遇到同样的问题。我确定我摆脱了/ usr / local / lib / node_modules中的node_modules(以及主目录中存在的任何内容)并重新安装了量角器
npm install -g protractor
这会安装selenium-webdriver@2.44.0,它有同样的问题。
更新:从独立标志开始
使用以下
启动webdriver-managerwebdriver-manager start --standalone
seleniumProcess.pid: 32701
14:04:16.070 INFO - Launching a standalone server
*** glibc detected *** java: free(): invalid next size (fast): 0x00007f061c116e20 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x76aa6)[0x7f062e766aa6]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7f062e76b84c]
/opt/jdk1.7.0/jre/lib/amd64/libnet.so(+0x5a1d)[0x7f06234f7a1d]
/opt/jdk1.7.0/jre/lib/amd64/libnet.so(Java_java_net_NetworkInterface_getAll+0x9e)[0x7f06234f84fe]
[0x7f0629746bd1]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 1062136 /opt/jdk1.7.0/bin/java
00600000-00601000 rw-p 00000000 fd:00 1062136 /opt/jdk1.7.0/bin/java
01a13000-01cb9000 rw-p 00000000 00:00 0 [heap]
40a600000-40bac0000 rw-p 00000000 00:00 0
40bac0000-40f800000 rw-p 00000000 00:00 0
40f800000-439850000 rw-p 00000000 00:00 0
439850000-6afd60000 rw-p 00000000 00:00 0
6afd60000-6c4d80000 rw-p 00000000 00:00 0
6c4d80000-800000000 rw-p 00000000 00:00 0
7f061c000000-7f061c117000 rw-p 00000000 00:00 0
7f061c117000-7f0620000000 ---p 00000000 00:00 0
7f06232b5000-7f06232ca000 r-xp 00000000 fd:00 523478 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f06232ca000-7f06234ca000 ---p 00015000 fd:00 523478 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f06234ca000-7f06234cb000 rw-p 00015000 fd:00 523478 /lib/x86_64-linux-gnu/libgcc_s.so.1
更新:尝试使用java列出网络设备
如果我使用一个简单的java程序来列出网络设备,那么它将失败并出现同样的错误;
import java.io.*;
import java.net.*;
import java.util.*;
import static java.lang.System.out;
public class ListNets {
public static void main(String args[]) throws SocketException {
Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
for (NetworkInterface netint : Collections.list(nets))
displayInterfaceInformation(netint);
}
static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
out.printf("Display name: %s\n", netint.getDisplayName());
out.printf("Name: %s\n", netint.getName());
Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
for (InetAddress inetAddress : Collections.list(inetAddresses)) {
out.printf("InetAddress: %s\n", inetAddress);
}
out.printf("\n");
}
}
编译&amp;运行
javac ListNets.java
java ListNets
显示此错误
java: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *)
&((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd))))
&& old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)
((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t)))
- 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned
long)old_end & pagemask) == 0)' failed.
[1] 1338 abort java ListNets
答案 0 :(得分:0)
如果我将所有内容还原为使用OpenJDK,那么这可以解决webdriver-manager的原始问题
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-openjdk-amd64/bin/java 1066
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 1066
sudo update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
现在以下工作
webdriver-manager start
seleniumProcess.pid: 28522
16:27:21.246 INFO - Launching a standalone server
Setting system property webdriver.chrome.driver to /usr/local/lib/node_modules/protractor/selenium/chromedriver
16:27:21.283 INFO - Java: Oracle Corporation 24.65-b04
16:27:21.283 INFO - OS: Linux 3.2.0-4-amd64 amd64
16:27:21.293 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
16:27:21.363 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
16:27:21.400 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
16:27:21.401 INFO - Version Jetty/5.1.x
16:27:21.402 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
16:27:21.402 INFO - Started HttpContext[/selenium-server,/selenium-server]
16:27:21.403 INFO - Started HttpContext[/,/]
16:27:21.441 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@5cd2b43f
16:27:21.441 INFO - Started HttpContext[/wd,/wd]
16:27:21.445 INFO - Started SocketListener on 0.0.0.0:4444
16:27:21.445 INFO - Started org.openqa.jetty.jetty.Server@7b17cda3