# Problem with erizoTest.js (Cannot call method 'match' of undefined)

**URL:** <https://discourse.lynckia.com/t/problem-with-erizotest-js-cannot-call-method-match-of-undefined/138>\
**Category:** Uncategorized\
**Created:** [December 5, 2013, 11:49pm UTC](https://discourse.lynckia.com/t/problem-with-erizotest-js-cannot-call-method-match-of-undefined/138 "2013-12-05T23:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jozef\_Pochyba](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@Jozef\_Pochyba](https://discourse.lynckia.com/u/Jozef_Pochyba)\
**Post date:** [December 5, 2013, 11:49pm UTC](https://discourse.lynckia.com/t/problem-with-erizotest-js-cannot-call-method-match-of-undefined/138/1 "2013-12-05T23:49:59Z")

</div>

I would be very grateful when you help me with my problem, I began to test  
Erizo controller, but I have problem with it, especially in this part, when  
start server and publisher creat room is everything ok, but when publisher  
is connecting to the room, on server appear this errors:

2013-12-05T21:44:15.448Z - info: Initialized logger  
info: [socket.io](http://socket.io) started  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:01 GMT] “GET /publisher.html  
HTTP/1.1” 304 - “-” "Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36  
(KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:01 GMT] “GET  
/css/bootstrap.min.css HTTP/1.1” 304 -  
“[http://192.168.100.59:3004/publisher.html](http://192.168.100.59:3004/publisher.html)” "Mozilla/5.0 (Windows NT 6.3)  
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:01 GMT] “GET /css/style.css  
HTTP/1.1” 304 - “[http://192.168.100.59:3004/publisher.html](http://192.168.100.59:3004/publisher.html)” "Mozilla/5.0  
(Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:01 GMT] "GET /erizo.js HTTP/1.1"  
304 - “[http://192.168.100.59:3004/publisher.html](http://192.168.100.59:3004/publisher.html)” “Mozilla/5.0 (Windows NT  
6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36”

Socket connect GjyK\_B8E5a31mIPMt-Xi  
2013-12-05T21:45:06.443Z - info: Adding publisher peer\_id  
GjyK\_B8E5a31mIPMt-Xi  
log4cxx: No appender could be found for logger (SdpInfo).  
log4cxx: Please initialize the log4cxx system properly.  
Sending message to GjyK\_B8E5a31mIPMt-Xi  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:12 GMT] “GET /subscriber.html  
HTTP/1.1” 304 - “-” "Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36  
(KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:12 GMT] “GET  
/css/bootstrap.min.css HTTP/1.1” 304 -  
“[http://192.168.100.59:3004/subscriber.html](http://192.168.100.59:3004/subscriber.html)” "Mozilla/5.0 (Windows NT 6.3)  
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:12 GMT] "GET /erizo.js HTTP/1.1"  
304 - “[http://192.168.100.59:3004/subscriber.html](http://192.168.100.59:3004/subscriber.html)” "Mozilla/5.0 (Windows NT  
6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36"  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:12 GMT] “GET /css/style.css  
HTTP/1.1” 304 - “[http://192.168.100.59:3004/subscriber.html](http://192.168.100.59:3004/subscriber.html)” “Mozilla/5.0  
(Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36”

log of publisher:  
Socket connect gJIpW7FiuSIAwsOIt-Xj  
2013-12-05T21:45:13.433Z - error: uncaughtException: Cannot call method  
’match’ of undefined date=Thu Dec 05 2013 22:45:13 GMT+0100 (CET),  
pid=8064, uid=1000, gid=1000, cwd=/home/jojo/licode/erizo\_controller/test,  
execPath=/usr/bin/nodejs, version=v0.10.22, argv=[node,  
/home/jojo/licode/erizo\_controller/test/erizoTest.js], rss=41115648,  
heapTotal=29911936, heapUsed=12237200, loadavg=[0.09423828125, 0.05078125,  
0.05078125], uptime=18796.471718426, trace=[column=89,  
file=/home/jojo/licode/erizo\_controller/erizoController/webRtcController.js,  
function=Object.that.addSubscriber, line=209, method=that.addSubscriber,  
native=false, column=38,  
file=/home/jojo/licode/erizo\_controller/test/erizoTest.js, function=,  
line=80, method=null, native=false, column=17, file=[as $emit] (events.js,  
function=Socket.EventEmitter.emit, line=106, method=EventEmitter.emit,  
native=false, column=22,  
file=/home/jojo/licode/node\_modules/socket.io/lib/namespace.js,  
function=SocketNamespace.handlePacket, line=335, method=handlePacket,  
native=false, column=38,  
file=/home/jojo/licode/node\_modules/socket.io/lib/manager.js,  
function=Manager.onClientMessage, line=488, method=onClientMessage,  
native=false, column=20,  
file=/home/jojo/licode/node\_modules/socket.io/lib/transport.js,  
function=WebSocket.Transport.onMessage, line=387,  
method=Transport.onMessage, native=false, column=10,  
file=/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js,  
function=, line=39, method=null, native=false, column=17, file=events.js,  
function=Parser.EventEmitter.emit, line=95, method=EventEmitter.emit,  
native=false, column=16,  
file=/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js,  
function=finish, line=288, method=null, native=false, column=15,  
file=/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js,  
function=Parser.expectHandler, line=299, method=expectHandler,  
native=false], stack=[TypeError: Cannot call method ‘match’ of undefined,  
at Object.that.addSubscriber  
(/home/jojo/licode/erizo\_controller/erizoController/webRtcController.js:209:89), at Socket.  
(/home/jojo/licode/erizo\_controller/test/erizoTest.js:80:38), at  
Socket.EventEmitter.emit [as $emit] (events.js:106:17), at  
SocketNamespace.handlePacket  
(/home/jojo/licode/node\_modules/socket.io/lib/namespace.js:335:22), at  
Manager.onClientMessage  
(/home/jojo/licode/node\_modules/socket.io/lib/manager.js:488:38), at  
WebSocket.Transport.onMessage  
(/home/jojo/licode/node\_modules/socket.io/lib/transport.js:387:20), at  
Parser.  
(/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js:39:10),  
at Parser.EventEmitter.emit (events.js:95:17), at finish  
(/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js:288:16),  
at Parser.expectHandler  
(/home/jojo/licode/node\_modules/socket.io/lib/transports/websocket/hybi-16.js:299:15)]

Socket disconnect gJIpW7FiuSIAwsOIt-Xj  
2013-12-05T21:45:35.588Z - info: Removing client gJIpW7FiuSIAwsOIt-Xj  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:35 GMT] "GET /dummy HTTP/1.1"  
404 - “[http://192.168.100.59:3004/subscriber.html](http://192.168.100.59:3004/subscriber.html)” "Mozilla/5.0 (Windows NT  
6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36"  
Socket disconnect GjyK\_B8E5a31mIPMt-Xi  
Sending message to GjyK\_B8E5a31mIPMt-Xi  
2013-12-05T21:45:36.317Z - info: Removing client GjyK\_B8E5a31mIPMt-Xi  
192.168.100.11 - - [Thu, 05 Dec 2013 21:45:36 GMT] "GET /dummy HTTP/1.1"  
404 - “[http://192.168.100.59:3004/publisher.html](http://192.168.100.59:3004/publisher.html)” “Mozilla/5.0 (Windows NT  
6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57  
Safari/537.36”
