Skip to content
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

Testing issues: Download failures #2

Open
crspybits opened this issue Feb 3, 2021 · 5 comments
Open

Testing issues: Download failures #2

crspybits opened this issue Feb 3, 2021 · 5 comments

Comments

@crspybits
Copy link
Member

crspybits commented Feb 3, 2021

I'm getting issues like: https://docs.google.com/document/d/190FBElJHbzCqvI9-pZGuHOg4jC2gbMh3lB6INCaiQcs/edit#bookmark=id.6xpze2glg563

  1. I have seen "gone" results from the server:
    "syncserver-message-params" =     (
        "{\"gone\":\"fileRemovedOrRenamed\",\"cloudStorageType\":\"Google\"}"
    );

Each of us using this are using Google Drive I believe. So this reflects a 404 coming back from Google. I don't think I've seen this before. None of the server files have actually been deleted.

  1. And also it seems that the server is not responding at all in certain cases. I.e., the file is still downloading in iOSBasics for a very long period of time.

This seems to be an issue due to my use of ngrok, which I believe doesn't respond in certain cases when overloaded.

@crspybits
Copy link
Member Author

I think that this is happening because of my use of the reverse proxy: ngrok to serve requests.

@crspybits
Copy link
Member Author

crspybits commented Feb 3, 2021

Test cases:

  1. When file is gone (in the DirectoryFileEntry), make sure it's indicated as needing download.
    [DONE]

  2. downloadsWith(status:
    [DONE]

@crspybits
Copy link
Member Author

crspybits commented Feb 4, 2021

To resolve the second issue I'm going to try changing https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408153-timeoutintervalforresource
which has a default of 7 days. That seems too long. I think waiting up to a few hours is enough.
Though there is advice from an Apple Tech person to use at least a day. See https://developer.apple.com/forums/thread/101993

See also https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408259-timeoutintervalforrequest

@crspybits
Copy link
Member Author

For timeout issue, I am planning two more changes:

  1. In:
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {

on an error, I'm going to indicate that the download has to be restarted by the app.

  1. I'm going to change the UI so that

a) Images that are not (yet) downloaded cannot be tapped "through" to see the details.

b) Instead, going to prompt the user to see if they want to re-try the download.

@crspybits
Copy link
Member Author

I'm going to hold off on the UI change for now. Downloading is improved and adding complexity to the UI doesn't seem quite merited yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant