=== Test case: websockets_SUITE:escape_chat_msg/1 (click for source code)

=== Config value:

    [{user,geralt},
     {watchdog,<0.1183.2>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/websockets_SUITE_data"},
     {preset,"riak_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@838f153dfbc9.2022-06-22_08.43.58/big_tests.tests.websockets_SUITE.logs/run.2022-06-22_09.01.06/websockets_suite.escape_chat_msg.html"},
     {tc_group_properties,[{name,ws_chat},{repeat_until_all_ok,3},sequence]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/websockets_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@838f153dfbc9.2022-06-22_08.43.58/big_tests.tests.websockets_SUITE.logs/run.2022-06-22_09.01.06/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {geralt,[{username,<<"geralt">>},
                              {server,<<"localhost">>},
                              {password,<<"witcher">>},
                              {transport,escalus_ws},
                              {port,5280},
                              {wspath,<<"/ws-xmpp">>}]},
                     {geralt_s,[{username,<<"geralt_s">>},
                                {server,<<"localhost">>},
                                {password,<<"witcher_s">>},
                                {transport,escalus_ws},
                                {ssl,true},
                                {port,5285},
                                {wspath,<<"/ws-xmpp">>}]},
                     {carol,[{username,<<"carol">>},
                             {server,<<"localhost">>},
                             {password,<<"jinglebells">>},
                             {transport,escalus_bosh},
                             {path,<<"/http-bind">>},
                             {port,5280}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@838f153dfbc9.2022-06-22_08.43.58"

=== Started at 2022-06-22 09:01:07


*** CT 2022-06-22 09:01:07.248 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_5155.html
*** CT 2022-06-22 09:01:07.248 *** View log from node ejabberd2@localhost when started🔗 ejabberd2@localhost_2021.html

*** User 2022-06-22 09:01:07.250 ***🔗
alicE@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.250 ***🔗
alicE@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b44b465d8db4034e' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-06-22 09:01:07.251 ***🔗
alicE@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-06-22 09:01:07.251 ***🔗
alicE@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFAG1hdHlncnlzYQ==</auth>



*** User 2022-06-22 09:01:07.252 ***🔗
alicE@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-06-22 09:01:07.253 ***🔗
alicE@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.253 ***🔗
alicE@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='dcddc99c6d52a6da' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-06-22 09:01:07.253 ***🔗
alicE@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-06-22 09:01:07.253 ***🔗
alicE@localhost/res1 out
<iq type='set' id='f9a200a5616a0fbb3c8178238f438595'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.253 ***🔗
alicE@localhost/res1 in
<iq id='f9a200a5616a0fbb3c8178238f438595' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.253 ***🔗
alice@localhost/res1 out
<iq type='set' id='5378826c86d3ceffe3a9718a82191ec0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.254 ***🔗
alice@localhost/res1 in
<iq type='result' id='5378826c86d3ceffe3a9718a82191ec0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.254 ***🔗
alice@localhost/res1 out
<presence/>



*** User 2022-06-22 09:01:07.255 ***🔗
alice@localhost/res1 in
<presence from='alice@localhost/res1' to='alice@localhost/res1' xml:lang='en'/>



*** User 2022-06-22 09:01:07.256 ***🔗
geralt@localhost/res1 out
<open xmlns='urn:ietf:params:xml:ns:xmpp-framing' to='localhost' version='1.0'/>



*** User 2022-06-22 09:01:07.256 ***🔗
geralt@localhost/res1 in
<open version='1.0' xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-framing' id='8486232495884386' from='localhost'/>



*** User 2022-06-22 09:01:07.256 ***🔗
geralt@localhost/res1 in
<features xmlns='http://etherx.jabber.org/streams'>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</features>



*** User 2022-06-22 09:01:07.257 ***🔗
geralt@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGdlcmFsdAB3aXRjaGVy</auth>



*** User 2022-06-22 09:01:07.258 ***🔗
geralt@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-06-22 09:01:07.258 ***🔗
geralt@localhost/res1 out
<open xmlns='urn:ietf:params:xml:ns:xmpp-framing' to='localhost' version='1.0'/>



*** User 2022-06-22 09:01:07.258 ***🔗
geralt@localhost/res1 in
<open version='1.0' xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-framing' id='32b8e52fa4a068e5' from='localhost'/>



*** User 2022-06-22 09:01:07.258 ***🔗
geralt@localhost/res1 in
<features xmlns='http://etherx.jabber.org/streams'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</features>



*** User 2022-06-22 09:01:07.258 ***🔗
geralt@localhost/res1 out
<iq type='set' id='d2b3307a83d280e41a944c17e88d0097'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.259 ***🔗
geralt@localhost/res1 in
<iq id='d2b3307a83d280e41a944c17e88d0097' type='result' xmlns='jabber:client'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>geralt@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.259 ***🔗
geralt@localhost/res1 out
<iq type='set' id='5b430dd2f603c787fe96b8a278e96242'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.259 ***🔗
geralt@localhost/res1 in
<iq type='result' id='5b430dd2f603c787fe96b8a278e96242' xmlns='jabber:client'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.259 ***🔗
geralt@localhost/res1 out
<presence/>



*** User 2022-06-22 09:01:07.260 ***🔗
geralt@localhost/res1 in
<presence from='geralt@localhost/res1' to='geralt@localhost/res1' xmlns='jabber:client'/>



*** User 2022-06-22 09:01:07.261 ***🔗
carol@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.273 ***🔗
carol@localhost/res1 in
<stream:stream from='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.273 ***🔗
carol@localhost/res1 in
<stream:features>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-06-22 09:01:07.273 ***🔗
carol@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGNhcm9sAGppbmdsZWJlbGxz</auth>



*** User 2022-06-22 09:01:07.275 ***🔗
carol@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-06-22 09:01:07.275 ***🔗
carol@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.287 ***🔗
carol@localhost/res1 in
<stream:stream from='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-06-22 09:01:07.287 ***🔗
carol@localhost/res1 in
<stream:features>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-06-22 09:01:07.287 ***🔗
carol@localhost/res1 out
<iq type='set' id='561ebde8a7c0d1bdd901ebb04f0f2fac'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.287 ***🔗
carol@localhost/res1 in
<iq xmlns='jabber:client' id='561ebde8a7c0d1bdd901ebb04f0f2fac' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>carol@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-06-22 09:01:07.288 ***🔗
carol@localhost/res1 out
<iq type='set' id='2f1bdf366279d2a2675d79aefc5f217f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.288 ***🔗
carol@localhost/res1 in
<iq xmlns='jabber:client' type='result' id='2f1bdf366279d2a2675d79aefc5f217f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-06-22 09:01:07.288 ***🔗
carol@localhost/res1 out
<presence/>



*** User 2022-06-22 09:01:07.290 ***🔗
carol@localhost/res1 in
<presence xmlns='jabber:client' from='carol@localhost/res1' to='carol@localhost/res1' xml:lang='en'/>



*** User 2022-06-22 09:01:07.290 ***🔗
alice@localhost/res1 out
<message to='geralt@localhost/res1' type='chat'>
	<body>Hi! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.290 ***🔗
geralt@localhost/res1 in
<message from='alice@localhost/res1' to='geralt@localhost/res1' xml:lang='en' type='chat' xmlns='jabber:client'>
	<body>Hi! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.290 ***🔗
geralt@localhost/res1 out
<message to='alice@localhost/res1' type='chat'>
	<body>Hello! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.291 ***🔗
alice@localhost/res1 in
<message from='geralt@localhost/res1' to='alice@localhost/res1' type='chat' xmlns='jabber:client'>
	<body>Hello! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.291 ***🔗
geralt@localhost/res1 out
<message to='carol@localhost/res1' type='chat'>
	<body>Hey! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.291 ***🔗
carol@localhost/res1 in
<message from='geralt@localhost/res1' to='carol@localhost/res1' type='chat' xmlns='jabber:client'>
	<body>Hey! &amp; &lt; &gt;</body>
</message>



*** User 2022-06-22 09:01:07.291 ***🔗
carol@localhost/res1 out
</stream:stream>

*** User 2022-06-22 09:01:07.292 ***🔗
carol@localhost/res1 in
</stream:stream>

*** User 2022-06-22 09:01:07.292 ***🔗
geralt@localhost/res1 out
<close xmlns='urn:ietf:params:xml:ns:xmpp-framing'/>



*** User 2022-06-22 09:01:07.292 ***🔗
geralt@localhost/res1 in
<close xmlns='urn:ietf:params:xml:ns:xmpp-framing'/>



*** User 2022-06-22 09:01:07.292 ***🔗
alice@localhost/res1 out
</stream:stream>

*** User 2022-06-22 09:01:07.293 ***🔗
alice@localhost/res1 in
</stream:stream>

*** System report during websockets_SUITE:escape_chat_msg/1 in ws_chat 2022-06-22 09:01:07.293 ***🔗
=ERROR REPORT==== 22-Jun-2022::09:01:07.293289 ===
** State machine <0.1233.2> terminating
** Last event = {cast,{ws_send,<0.1232.2>,#Ref<0.3855595908.713555969.38158>,
                               close}}
** When server state  = {connected,
                            {state,<0.1232.2>,
                                {up,#Ref<0.3855595908.713555969.38154>},
                                "localhost",5280,<<"http">>,"localhost",5280,
                                [],
                                #{protocols => [http],transport => tcp},
                                undefined,#Port<0.6339>,gun_tcp,true,
                                {tcp,tcp_closed,tcp_error},
                                gun_http,
                                {http_state,#Port<0.6339>,gun_tcp,#{},
                                    'HTTP/1.1',keepalive,<<>>,undefined,[],
                                    head,
                                    {0,0},
                                    head},
                                undefined,gun_default_event_h,undefined}}
** Reason for termination = error:{'function not exported',
                                      {gun_http,ws_send,6}}
** Callback modules = [gun]
** Callback mode = state_functions
** Stacktrace =
**  [{gun,connected,3,
          [{file,"/home/circleci/project/big_tests/_build/default/lib/gun/src/gun.erl"},
           {line,1301}]},
     {gen_statem,loop_state_callback,11,[{file,"gen_statem.erl"},{line,1203}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]



*** System report during websockets_SUITE:escape_chat_msg/1 in ws_chat 2022-06-22 09:01:07.294 ***🔗
=CRASH REPORT==== 22-Jun-2022::09:01:07.293843 ===
  crasher:
    initial call: gun:init/1
    pid: <0.1233.2>
    registered_name: []
    exception error: undefined function gun_http:ws_send/6
      in function  gun:connected/3 (/home/circleci/project/big_tests/_build/default/lib/gun/src/gun.erl, line 1301)
      in call from gen_statem:loop_state_callback/11 (gen_statem.erl, line 1203)
    ancestors: [gun_conns_sup,gun_sup,<0.1390.0>]
    message_queue_len: 1
    messages: [{'DOWN',#Ref<0.3855595908.713555969.38154>,process,
                          <0.1232.2>,normal}]
    links: [<0.1392.0>,#Port<0.6339>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 6772
    stack_size: 29
    reductions: 16904
  neighbours:



*** System report during websockets_SUITE:escape_chat_msg/1 in ws_chat 2022-06-22 09:01:07.294 ***🔗
=SUPERVISOR REPORT==== 22-Jun-2022::09:01:07.294162 ===
    supervisor: {local,gun_conns_sup}
    errorContext: child_terminated
    reason: {undef,
                [{gun_http,ws_send,
                     [close,
                      {http_state,#Port<0.6339>,gun_tcp,#{},'HTTP/1.1',
                          keepalive,<<>>,undefined,[],head,
                          {0,0},
                          head},
                      #Ref<0.3855595908.713555969.38158>,<0.1232.2>,
                      gun_default_event_h,undefined],
                     []},
                 {gun,connected,3,
                     [{file,
                          "/home/circleci/project/big_tests/_build/default/lib/gun/src/gun.erl"},
                      {line,1301}]},
                 {gen_statem,loop_state_callback,11,
                     [{file,"gen_statem.erl"},{line,1203}]},
                 {proc_lib,init_p_do_apply,3,
                     [{file,"proc_lib.erl"},{line,226}]}]}
    offender: [{pid,<0.1233.2>},
               {id,gun},
               {mfargs,{gun,start_link,undefined}},
               {restart_type,temporary},
               {significant,false},
               {shutdown,5000},
               {child_type,worker}]


*** CT 2022-06-22 09:01:07.294 *** View log from node ejabberd2@localhost when finished🔗 ejabberd2@localhost_2021.html
*** CT 2022-06-22 09:01:07.295 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_5155.html



=== Ended at 2022-06-22 09:01:07
=== successfully completed test case
=== === Returned value: ok


Test run history | Top level test index | Latest test result