Help
Ask questions about how to do or fix things in Arrowchat
User avatar
zoxtrix
Customer
 
Posts: 74
Joined: 29 Jun 2019, 19:31

 

by zoxtrix 10 Aug 2019, 11:58

I want to ask others about the behavior they encounter when attempting to receive non-image files on mobile devices during private chat sessions. The particular behavior I'm curious about is whether or not tapping on a 'sent file link' (such as one for a .txt file) that has appeared on the chat screen will execute an immediate page load that gives indication the file download has completed.

I ask this because when I tap on such a link, it brings me to a blank white page with siteURL/arrowchat/public/download.php?file=#############.txt shown in the address bar and the download will NOT occur until I manually refresh that blank page. The mobile test devices I'm using are each running Android.

My site utilizes TLS (https) and I am not subscribed to ArrowChat's push service. I'm most interested in whether others whose sites are set up similarly to mine experience the same 'blank white page' needing to be manually refreshed whenever they try to download a non-image file on a mobile device.

Thanks
User avatar
zoxtrix
Customer
 
Posts: 74
Joined: 29 Jun 2019, 19:31

 

by zoxtrix 14 Aug 2019, 15:30

Ok, this is a bug. I've just tested the file transfer to mobile device behavior on ArrowChat's demo installation and it does the same thing. Below are screenshots from that test session.

Here is the ArrowChat.com site desktop chatbox after sending a test non-image file...
Image

And here is the way it looked from my mobile device...
Image

Finally, here is what happened when I tapped the transferred file's link on my mobile device...
Image

As you can see, the ArrowChat server redirects the browser on my mobile device to a blank white page that remains on-screen indefinitely. To get the file, it becomes necessary to refresh the tab. There's no on-screen message or popup advising that refreshing is necessary, just the blank white screen. This behavior is consistently repeatable on my Firefox, Google Chrome, and Samsung mobile browsers, as well as on my desktop computer when the mobile mode is loaded from the arrowchat/public/mobile/ directory. Admittedly, it's quite easy to get the non-image file by simply refreshing the tab, but it's still not right and it really shouldn't happen.

I thought this might have been an isolated problem with my server and ArrowChat installation. I now believe it to be a genuine bug in ArrowChat's mechanism.
User avatar
zoxtrix
Customer
 
Posts: 74
Joined: 29 Jun 2019, 19:31

 

by zoxtrix 14 Aug 2019, 16:01

A further problematic behavior (also seemingly bug-ish) is that the die() function in the download.php file contains the exit message "The file was not found or was deleted." which for some reason gets appended to the text within the .txt file that I use to test the file transfer functionality. This happened on my server and it happens on ArrowChat's server as well. The effect is that each time I send my test file, its contents (shown below)...
Code: Select all
This is a test file!
is rewritten to look like this...
Code: Select all
This is a test file!The file was not found or was deleted.
This is easy to correct by opening the download.php file and changing the following line...
Code: Select all
die("The file was not found or was deleted.");
-TO-
Code: Select all
die();
But I think the behavior qualifies as another bug.