-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better offline check instead of navigator.onLine
(as it is fairly unreliable)
#1658
Comments
Agreed, we could probably do better with detecting network issues. Tus actually has @Acconut @goto-bus-stop what do you think, should we add a timeout and/or UI notifications about |
That's an interesting approach. Does it work reliably or does it have issues with normally low uploads (e.g. in rural areas)? I am asking because I am considering adapting this directly into tus-js-client.
Currently, there is no such functionality in tus-js-client. So you either have to add your own retries or try to detect network problems based on tus-js-client's progress events. |
Adding timeouts to I implemented timeouts in @Acconut, what do you think? Update: We're considering adding timeouts to Core |
Is that decision final yet? From my perspective it would be nice to also offer timeouts over progress for tus-js-client directly :) |
@Acconut, we could benefit from timeouts in |
If you think that this is the best option for Uppy, please go ahead :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
To make this actionable:
|
Potentially yes, although I think it's unlikely. If a retry kicks in (e.g. because a PATCH request failed), a HEAD request must be sent first (with potential retries as well) before uploading resumes. During this time no progress event will be emitted. Also, a few cents from my experience with progress events: Some implementations emit a progress event every X bytes (e.g. every 64KiB). So, if you have a 1KiB/s connection, it is normal to only have one progress event per minute :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
If you test offline mode by turning off your wifi or unplug your computer cable, it's probably be fine, the plugin tell you that "There is no internet connection".
However, I think that's not reflecting the real situation users might get. Sometimes it's because of provider issue, or just simply unplug the cable from the modem (wifi is still connected), Uppy failed to notify me that there is no internet. (mainly because
navigator.onLine
event is not firing), and the upload is stalled after that, the pending PATCH request never get completed (yes, I'm using Tus plugin)There must be a better way, for example, if we're not receiving
upload-progress
event for certain amount of time (eg. 30 seconds), we could inform to the user: Experiencing network interuption... and then retry the upload, rather than let it hanging forever.The text was updated successfully, but these errors were encountered: