Closed aleripe closed 3 years ago
I've done some more investigations. It's not necessarily the second time, it could be also the first or the tenth. But it doesn't always work. I've seen the problem happens more frequently after an upload.
Hi @aleripe, could you please describe what exactly is the problem? You've mentioned 'download hangs', what does that mean? The file is not downloading or the progress doesn't show up in the stream?
Hi, both! File is not downloading and there's no progress on the stream either. If I put a breakpoint on that line (let dwonloadStreamHandler = StreamHandler()) it stops and then doesn't go on. That leads me to suppose the problem is on the StreamHandler, but I'm sort of a newbie in Flutter so I don't want to swear on it.
Thanks for this great package!
I was wrong with my previous message... it hangs on line 277:
try FileManager.default.copyItem(at: cloudFileURL, to: localFileURL)
and doesn't get into the catch block either.
Not sure if this can help you, but I'm able to download a file only if I do it right after iCloudStorage.startDownload
without using the onProgress
callback that is never called and doesn't fire any update.
I couldn't gather enough information from your comments to fully understand the issue you are experiencing. But I just pushed an update to fix two known issues (https://pub.dev/packages/icloud_storage/changelog). The fix may be related to your issues.
Thanks! Can't wait to try the fix... iCloud sync is the last thing missing from my app. I'll let you know if this solves my problem, too. Again, thank you!
You're my hero. The problem is solved with the latest update, so it seems I was into one of the two issues! Thank you sooooo much!!
Download hangs at line 227, where
StreamHandler
is created, but only the second time the same file is downloaded:Any idea?