cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1264
Views
0
Helpful
4
Replies
Jarvis IT
Beginner

no user found for current session id

 

Hi

 

 

I have utilised the customer-chat-sample provided from the Tools and Samples section in Cisco DevNet page https://developer.cisco.com/site/socialminer/documentation/index.gsp.

 

 

However I have re-written this sample in PHP because our website is coded in PHP.

 

 

I was able to create a Chat Request , however when polling the events I getting the API errors as:  no user found for current session id. Please see the screen shot below. Bear in mind that I did use the same JSESSIONID cookie when sending a GET request over to social Miner.

 

 

 

 

 

 

 

And this is debug info for the GET request to social miner.

 

 

This is adebug info?

 

 

About to connect() to socialminer.xxxxxxxx.com.au port 443 (#0)

 

*   Trying xxx.xxx.xxx.xxx... * connected

 

* Connected to socialminer.xxxxxx.com.au (xxx.xxx.xxx.xxx) port 443 (#0)

 

* successfully set certificate verify locations:

 

*   CAfile: /etc/ssl/certs/ca-certificates.crt

 

  CApath: none

 

* SSL connection using AES256-SHA

 

* Server certificate:

 

*              subject: /OU=Domain Control Validated/CN=socialminer.XXXXXX.com.au

 

*              start date: 2016-05-26 03:35:38 GMT

 

*              expire date: 2019-05-26 03:15:38 GMT

 

*              subjectAltName: socialminer.XXXXX.com.au matched

 

*              issuer: /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2

 

* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.

 

> GET /ccp/chat/?eventid=0 HTTP/1.1

 

Host: socialminer.XXXXX.com.au

 

Accept: */*

 

Cookie: JSESSIONID:C3BED2EAF36B3BB4AB221740D07CE874

 

Content-Type: application/xml

 

referer: http://www.XXXX.com.au/ccp/chat/chat.php

 

 

< HTTP/1.1 404 Not Found

 

< Set-Cookie: JSESSIONID=C4531F338F2DD6E11CBAA619876E6320; Path=/ccp/; Secure

 

< Content-Type: application/xml

 

< Transfer-Encoding: chunked

 

< Date: Wed, 24 Aug 2016 05:17:12 GMT

 

< Server: 

 

<

 

* Connection #0 to host socialminer.xxxxxxx.com.au left intact

 

* Closing connection #0

Any help would be helpful.....

Thanks

 

4 REPLIES 4
namahesh
Cisco Employee

Hi Craig

First of all, sorry for the delay in response.

From the HTTP traces you have posted, I can see that the SM server is returning you a different (new) JSESSIONID in response to your GET request each time.

Just wanted to clarify one thing - is this a cross-origin request to SM? (An XHR request directly from a webpage served from another server?)

Or, is this request made from some server/back-end to SM?

Can you share the snippet of code from the client that is actually making the GET request to SM?

Thanks,

Nagendra U M

Hi @namahesh,

 

I had this problem too. I'm using an iframe to integrate the chat to an existing web page, in this way:

 

 

<iframe src="http://181.x.x.x/web-chat.html"></iframe>

 

Everything works fine when I use Google Chrome, Firefox, Safari (on Mac), but when I try to use the chat on an iOS mobile device I get this error:

{“readyState":4,"responseText":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><apiErrors><apiError><errorMessage>no user found for the current session id: 8ECBE2356B53A44635A0D089B4A5F0BC</errorMessage><errorType>notFound</errorType></apiError></apiErrors>","status":404,"statusText":"Not Found"}

 

Captura de pantalla 2018-09-21 a la(s) 17.44.36.pngCaptura de pantalla 2018-09-21 a la(s) 17.45.00.png

Other important detail: when I use the chat directly from http://181.x.x.x/web-chat.html, it works fine on iOS mobile devices.

 

I'm using the sample code of https://github.com/CiscoDevNet/socialminer-sample-code/tree/master/customer-chat

 

Answering your question: 
- Just wanted to clarify one thing - is this a cross-origin request to SM? (An XHR request directly from a webpage served from another server?) Or, is this request made from some server/back-end to SM?

My request is made from a server to SM.

 

Is there a way to fix this problem? Is there some reason of why is it happening ?
I would be so grateful with any solution.

 

Kind regards,

Génesis Salazar

Hi @gsalazar1,


Essentially, the HTTP 404 response (no user found for the current session id) from SocialMiner indicates that the session ID cookie (JSESSIONID) is not being sent in the response at all, or an invalid value is being sent.

 

I hadn't heard of this problem before specifically affecting iOS devices, so when I googled for it, I could see that this seems to be a known limitation with Safari (the default browser) on iOS devices. Basically, Safari does not any type of cookie to be set inside an iframe unless the user previously visited that site.

 

There is a discussion on apple forums about this, and some potential workarounds.
https://discussions.apple.com/thread/4156939

https://gist.github.com/iansltx/18caf551baaa60b79206

I'm afraid I don't have anything more to offer in this regard.

Hope these resources provide you some clue.

 

Thanks,

Nagendra U M

Hi @namahesh,

 

Thanks for your response.

 

Yes, the interest thing is that I tried it out on Google Chrome from an iPad and got the same problem.

 

I going to take a look on the links, and hope find something useful. :)

 

Thank you so much for trying to help me out.

Regards,

Génesis Salazar

Create
Recognize Your Peers
Content for Community-Ad