Help
Ask questions about how to do or fix things in Arrowchat
User avatar
Martok
Customer
 
Posts: 71
Joined: 26 Jun 2012, 05:04

 

by Martok 03 Jan 2017, 10:16

I've upgraded to Arrowchat 2.0 and mobile chat isn't updating with new messages from other people. I've tested this and when others are chatting, their messages aren't appearing in the chatroom. Having spoken to another user, they say that it was the same prior to the 2.0 upgrade.

I've tested the 1-to-1 chat on mobile and that's fine, there's no issue with this. There only seems to be the problem with the chat not updating in a chatroom.

Any idea what the issue might be?
User avatar
MDAbruzzo
Customer
 
Posts: 1
Joined: 02 Jan 2017, 17:44

 

by MDAbruzzo 03 Jan 2017, 12:58

I just purchased yesterday and was having the same problem where new messages were not coming through unless I refreshed the screen.

I do not know why but through desperate troubleshooting I enabled both the push service setting "on" and the "ssl chat" on and almost immediately everything was coming in very quick and perfect.

I was having problems with only having regular push service active.

I do have a full https ssl site so I do not know if this is why i was having the problem and if that was the needed solution.

Any feedback from anyone that would know would be appreciated.
User avatar
Shank
Free
 
Posts: 7
Joined: 13 Apr 2016, 19:27

 

by Shank 03 Jan 2017, 20:53

I've been tracing this error down, and it seems to have something to do with the ArrowChat main script for popouts, and the "scrollHeight" value. When a new message comes in, there's no value, so it returns an undefined, and the script promptly crashes.
User avatar
Shank
Free
 
Posts: 7
Joined: 13 Apr 2016, 19:27

 

by Shank 03 Jan 2017, 21:28

Yeah, I have verified that in the popout window, if you get a new incoming private message, the core JS for the popout tries to get the value of the scrollHeight propery for a tab that hasn't been created yet, and then promptly crashes. I believe this has to do with the new "is X typing" function. It starts sending the "users is typing" message to the pop-out window BEFORE that user's tab has been created, so it's sending the message to an undefined part of the pop-out. I was hoping this was something I could find a quick fix for, but it looks to be deep into the custom code.

I am baffled as to why switching to SSL fixed this for the other user, though he maybe had a different issue.
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 04 Jan 2017, 00:46

MDAbruzzo's issue is different. SSL sites must have the SSL service turned on.

I've marked this down and we'll take a look for the minor bug update coming shortly.
User avatar
Martok
Customer
 
Posts: 71
Joined: 26 Jun 2012, 05:04

 

by Martok 04 Jan 2017, 03:52

Thanks, Jason.

I note that mobile chat for chatrooms seems to be updating here. However, I'm guessing that you'll be using the Push Server whereas I'm not using it.
User avatar
JGroot
Customer
 
Posts: 4
Joined: 30 May 2015, 02:16

 

by JGroot 04 Jan 2017, 08:43

We're having the same problem and getting a lot of complaints from our visitors. I hope the bug fix update comes really soon. Can you tell us something about that? Days, weeks?

We're not using a push server (and still no SSL).

Aside from this issue, compliments for the Arrowchat 2.0 update. Its a big plus! Thnx from the Netherlands.
User avatar
Shank
Free
 
Posts: 7
Joined: 13 Apr 2016, 19:27

 

by Shank 04 Jan 2017, 09:44

This is a MAJOR issue that needs to be addressed ASAP for me, or I am going to have to consider reverting to the old version for a while. I don't know about anyone else, but if there was a patch I could apply manually, I would do so right now. This is crippling my user's ability to communicate, and needs to be expedited.
User avatar
Shank
Free
 
Posts: 7
Joined: 13 Apr 2016, 19:27

 

by Shank 05 Jan 2017, 10:42

Well, I made my own fix, and it seems to be working!

In: /arrowchat/public/popout/js/popout_core.dev.js you will find the uncompressed version of the, obviously, core popout JavaScript. The problem is that it's sending a typing notification to a user BEFORE the window from the sender has been created. This throws an "undefined" error when the code attempts to get the scrollHeight of a non-existent container, which in turn crashes the chat. Here's wher ethe bug is...

Line 2232:

function receiveTyping(id) {
var container = a("#arrowchat_popout_text_" + id)[0].scrollHeight - a("#arrowchat_popout_text_" + id).scrollTop() - 10;
var container2 = a("#arrowchat_popout_text_" + id).outerHeight();
if (a("#arrowchat_popout_text_" + id).length) {

The issue is that the two container vars are being declared before checking to see if the message window exists. The fix is simple, move the if statement BEFORE that declaration:

function receiveTyping(id) {
if (a("#arrowchat_popout_text_" + id).length) {
var container = a("#arrowchat_popout_text_" + id)[0].scrollHeight - a("#arrowchat_popout_text_" + id).scrollTop() - 10;
var container2 = a("#arrowchat_popout_text_" + id).outerHeight();

Save a the change in a new file. Rename /arrowchat/public/popout/js/popout_core.js to /arrowchat/public/popout/js/popout_core.old.js. Rename your saved copy of the .dev version to /arrowchat/public/popout/js/popout_core.js, reload, and test. If it works for you, as it did for me, then run a JavaScript packer ( http://dean.edwards.name/packer/ ) to compress your changed code. It won't be nearly as compressed as the original, but better than nothing. This should tide you over until the team releases a real fix.
User avatar
JGroot
Customer
 
Posts: 4
Joined: 30 May 2015, 02:16

 

by JGroot 06 Jan 2017, 05:24

Doesn't work for us, unfortunately.

@Arrowchat team: How fast can we expect a quick fix/solution for this? We're getting a lot of complaints right now.
User avatar
Shank
Free
 
Posts: 7
Joined: 13 Apr 2016, 19:27

 

by Shank 06 Jan 2017, 06:02

JGroot wrote:Doesn't work for us, unfortunately.

@Arrowchat team: How fast can we expect a quick fix/solution for this? We're getting a lot of complaints right now.


If you want, I can take a look at your site, and see if I can't dig out the issue. Don't need any more access than any other standard user. Drop me a URL and I'll take a look for you, see if anything pops out at me?
User avatar
JGroot
Customer
 
Posts: 4
Joined: 30 May 2015, 02:16

 

by JGroot 06 Jan 2017, 06:23

Thanks a lot Shank, but we just found it! Everything is working fine again.

We made a change in /includes/functions/functions_receive.php.

Because mobile doesn't support multiple chats (/tabs), it gives only one chatroom ID, now the foreach isn't working properly. So we added some code on line 271, before the foreach loop, to handle this:

/**
* Tabs are unsupported, thus giving a single (string) ID, not an array
* Check if is array, if not force it.
*/

if(!is_array($chatroomid)) {
$intRoomID = $chatroomid;
$chatroomid = array();

$chatroomid[] = $intRoomID;

}

/* End fix */
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 06 Jan 2017, 12:59

JGroot wrote:Thanks a lot Shank, but we just found it! Everything is working fine again.

We made a change in /includes/functions/functions_receive.php.

Because mobile doesn't support multiple chats (/tabs), it gives only one chatroom ID, now the foreach isn't working properly. So we added some code on line 271, before the foreach loop, to handle this:

/**
* Tabs are unsupported, thus giving a single (string) ID, not an array
* Check if is array, if not force it.
*/

if(!is_array($chatroomid)) {
$intRoomID = $chatroomid;
$chatroomid = array();

$chatroomid[] = $intRoomID;

}

/* End fix */

Awesome, thanks for the fix! We're looking to get the patch out within the next week or so. I think these two issues are major enough for us to start compiling it now. We usually like to wait a couple weeks for bug reports to come in.
User avatar
chaos4eva
Customer
 
Posts: 5
Joined: 06 Jan 2015, 05:24

 

by chaos4eva 08 Jan 2017, 11:31

Jason wrote:
JGroot wrote:Thanks a lot Shank, but we just found it! Everything is working fine again.

We made a change in /includes/functions/functions_receive.php.

Because mobile doesn't support multiple chats (/tabs), it gives only one chatroom ID, now the foreach isn't working properly. So we added some code on line 271, before the foreach loop, to handle this:

/**
* Tabs are unsupported, thus giving a single (string) ID, not an array
* Check if is array, if not force it.
*/

if(!is_array($chatroomid)) {
$intRoomID = $chatroomid;
$chatroomid = array();

$chatroomid[] = $intRoomID;

}

/* End fix */

Awesome, thanks for the fix! We're looking to get the patch out within the next week or so. I think these two issues are major enough for us to start compiling it now. We usually like to wait a couple weeks for bug reports to come in.


I can confirm this fixed my updating issue so thanks for the fix.
Keep everything ticking over until its fixed by the arrow chat team.
User avatar
toptickers
Customer
 
Posts: 5
Joined: 11 Apr 2016, 16:39

 

by toptickers 16 Jan 2017, 18:42

I want to mention that I am also experiencing this issue and while I see ya'll provided a solution that seems to fix the problem I am still noticing that not all messages are going through to the mobile application.
For example, if I send messages in an order such as '1' then '2' then '3' then '4' etc, from my desktop the only message that will appear in the mobile app will be the one '4'. I can continue sending messages but it seems random which ones actually get through. While if i do this between two different browsers like Chrome and Edge each message appears to go through just fine.

* I also have SSL on my site and don't have a push server, Am I suppose to enable some function in the admin settings or leave it alone?
User avatar
THeringa
Customer
 
Posts: 15
Joined: 24 May 2012, 01:46

 

by THeringa 07 Feb 2017, 01:05

Thanks JGroot, your solution works!

Hartelijk dank vanuit Nederland :)
User avatar
elynx
Customer
 
Posts: 15
Joined: 28 Apr 2016, 23:28

 

by elynx 07 Feb 2017, 14:23

Thank you for the fix ! Superstars !
By the way, once i notice the chat was behaving in a mobile exactly the same as the desktop version.
And it was actually working fine !!
So just a wonder ... would it be easy to override the mobile detection and use arrowchat the desktop way on any type of device ?

Would be great to test extensively. When it happened (for some reason) on my galaxy S7, it was super cool.

Cheers
User avatar
elynx
Customer
 
Posts: 15
Joined: 28 Apr 2016, 23:28

 

by elynx 14 Mar 2017, 11:18

After few weeks testing the workaround.

It doesn't really work.

We still receive notifications of new messages on mobile tab.
Opening the mobile chat section doesn't show any new message.
User avatar
elynx
Customer
 
Posts: 15
Joined: 28 Apr 2016, 23:28

 

by elynx 14 Mar 2017, 11:19

Question is: When the correction will be available?
Without it, mobile version is just not usable for incoming messages. As simple as that.
User avatar
elynx
Customer
 
Posts: 15
Joined: 28 Apr 2016, 23:28

 

by elynx 14 Mar 2017, 23:37

Jason wrote:
JGroot wrote:Thanks a lot Shank, but we just found it! Everything is working fine again.

We made a change in /includes/functions/functions_receive.php.

Because mobile doesn't support multiple chats (/tabs), it gives only one chatroom ID, now the foreach isn't working properly. So we added some code on line 271, before the foreach loop, to handle this:

/**
* Tabs are unsupported, thus giving a single (string) ID, not an array
* Check if is array, if not force it.
*/

if(!is_array($chatroomid)) {
$intRoomID = $chatroomid;
$chatroomid = array();

$chatroomid[] = $intRoomID;

}

/* End fix */

Awesome, thanks for the fix! We're looking to get the patch out within the next week or so. I think these two issues are major enough for us to start compiling it now. We usually like to wait a couple weeks for bug reports to come in.



Hi everyone, please don't think this is the final workaround. It is not ;).