RxDownload download a large file with slow internet connection (for example GPRS) returns TimeoutException - kotlin

i have to download a large file (about 50mb ) using RxDownload (https://github.com/ssseasonnn/RxDownload) .
when i run app in Emulator with internet connection sets to full or 5g (or real device) everything works well.
but when i change internet connection in emulator to GPRS or on real device I use GPRS then connection returns TimeoutException .
how should i do fix it?
It seems that With GPRS, the download does not start at all.
please guide me to fix this problem.

Related

Colab: How to disconnect from session without closing the tab?

Some background
My computer fan goes crazy when I am using Google Colab, it definitely uses local resources somehow. I am running very long processes (over 4 hours). Yesterday, it occurred to me that I was disconnected, I thought my session had crashed since I stoped receiving the status updates of my task's progress bar. But then after clicking on Connect to a hosted runtime I was able to reconnect to that session and just interact with it fine. Given that Google Colab uses some of my local resource, I looking for a way to put the client application on halt for a little bit.
Question
How to manually disconnect from my remote session without crashing/terminating it? Is that even possible?
Note:
There is an answer for Does Google Colab stay connected when I close my browser? that says
The current cell will continue executing once you close your browser, but the outputs will not end up in the notebook in Drive.
I would be fine if I am able to leave the session running remotely but not being able to access the outputs on the notebook, given that I save the result on google drive when the process is done. So, not been able to see the output on the notebook would not be an issue for me.

Colab keeps disconnecting very frequently

I keep trying to connect to the hosted runtime on Google Colab, but it disconnects me after a few seconds (up to 10 secs).
The JavaScript Console of Firefox (the latest version) shows this:
Error: "SocketIO error: xhr poll error: 0 - TransportError"
I experience similar disconnect with Kaggle. How can I fix that? Thanks.
Edit: This may not be the final answer, but turning off VPN seems to fix the issue with Colab. Turning VPN back on does not cause the issue, but Kaggle still does not work, it might now just be a Kaggle issue.
Edit 2: With VPN back on the issue comes up again.

What typically causes "uwsgi-body-read:...Client closed connection" error?

One of our clients is triggering this error when trying to use our site's file upload functionality:
[uwsgi-body-read] Error reading 65536 bytes.
Content-Length: 543426 consumed: 233 left: 543193
message: Client closed connection
Every other user that has tested uploading the same file has not been able to reproduce this issue even with same OS (Windows) and browser (Chrome). I searched but was unable to find an explanation of the "Client closed connection" error, so I am not clear what the usual causes are. Is there a particular category of issue that typically causes these errors in uWSGI?
I found this github issue which seems to suggest that the problem is related to Safari or IE, but the client is using Chrome on Windows, and we have been unable to reproduce with that same setup. We are using version 2.0.18 of uWSGI.
I was able to get on a call with the client and figured out what the issue was: he was trying to upload a file out of a shared drive. The file when chosen from a shared drive on a windows machine would fail, triggering the uwsgi-body-read error on the backend. When the file was dragged to the desktop and chosen from there, the upload succeeded without issue. The issue is potentially related to windows, because I was able to upload from a shared NAS from a Mac. My team has not yet investigated the issue further.

OpenTok WebRTC - The video stream failed to connect error

Condition:
1. Two users use Chrome (latest version) on Mac
2. One-to-one video conference
Problem - sometimes (~ ones in 5-6 calls) video window shows the error - The video stream failed to connect. Please notify the site owner. It can be on the beggining, or after several minutes spent on call.
Where can be the issue?
If any addition info needed i will provide in the post.
Thanks
If I understand correctly, one in 5-6 calls results in "Video stream failed to connect error". This is most likely a firewall or router configuration issue.
If you are video chatting with different people and you are sometimes getting a "video stream failed to connect error", the person you are chatting with probably has a firewall or configuration issue.
If you are testing with yourself and sometimes getting that error, you might have firewall or configuration issues.
To verify that you firewall is configured correctly, try running this diagnostic tool.
If you would like to see when your users are experiencing this error and would like to educate them on the diagnostic tool or what the possible causes are, you can listen to exception events (#1013 in your case)
Disclaimer: I work at TokBox.
Good Luck!

How to test a cocoa touch app for the case when the network fails while downloading a file?

My iOS application, among its features, download files from a specific server. This downloading occurs entirely in the background, while the user is working on the app. When a download is complete, the resource associated with the file appears on the app screen.
My users report some misbehavior about missing resources that I could not reproduce. Some side information leads me to suspect that the problem is caused by the download of the resource's file to be aborted mid-way. Then the app has a partially downloaded file that never gets completed.
To confirm the hypothesis, to make sure any fix works, and to test for such random network vanishing under my feet, I would like to simulate the loss of the network on my test environment: the test server is web sharing on my development Mac, the test device is the iOS simulator running on the same Mac.
Is there a more convenient way to do that, than manually turning web sharing off on a breakpoint?
Depending on how you're downloading your file, one possible option would be to set the callback delegate to null halfway through the download. It would still download the data, but your application would simply stop receiving callbacks. Although, I don't know if that's how the application would function if it truly dropped the connection.
Another option would be to temporarily point the download request at some random file on an external web server, then halfway though just disconnect your computer from the internet. I've done that to test network connectivity issues and it usually works. The interesting problem in your case is that you're downloading from your own computer, so disconnecting won't help. This would just be so you can determine the order of callbacks within the application when this happens, (does it make any callbacks at all? In what order?) so that you can simulate that behavior when actually pointed to your test server.
Combine both options together, I guess, to get the best solution.