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

Bug: Cloud upload not correct? #1081

Closed
fs1209 opened this issue Jan 24, 2024 · 9 comments
Closed

Bug: Cloud upload not correct? #1081

fs1209 opened this issue Jan 24, 2024 · 9 comments
Labels

Comments

@fs1209
Copy link

fs1209 commented Jan 24, 2024

Environment

  • OS Version: iPadOS / iOS 17.3
  • App Version: 5.1.1-28

Description

The cloud upload for some of the files are (most probably) not correct.

One example (see screenshots attached) the file "04 Goblet of Fire" has 719.4 MB and was according to the app uploaded to the cloud. On any other device (I've tried it with another iPhone, an iPad and a Mac) the file has 327 Bytes.
These files show no cover on the new device.

Steps to reproduce the behavior

  1. Install BookPlayer on a device
  2. Log into the account via Apple ID
  3. Download the file

iPhone folder BookPlayer/Processed:
image

iPad:
image

@fs1209 fs1209 added the bug label Jan 24, 2024
@GianniCarlo
Copy link
Collaborator

Hi @fs1209 ! Can you share to my email [email protected] the debug information from your phone? I'll be able to verify more quickly what we have on our servers. I think I know what the bytes on the other devices are (probably an encoded AWS S3 error).

For additional context, I found an error (really a wrong assumption on my part) regarding how a third party library that we use to handle the sync tasks order worked. In short, between app launches, the sync tasks are not maintaining the original order, which can mess up replicating the actions taken in the app and the final hierarchy representation we have on the server. I already have our own implementation to remove the third party library, I just need to test it a little bit more before creating the PR and updating the Beta on TestFlight before release

Sorry about the issue, and thanks for your support to the app 🙌, I'll be waiting on the debug file for this ticket, to help solve anything that comes up

@fs1209
Copy link
Author

fs1209 commented Jan 24, 2024 via email

@GianniCarlo
Copy link
Collaborator

@fs1209 following up on this, I can confirm that most books are already uploaded, and they were just already moved in S3 under the Audiobooks folder, this could be related to an open issue with the third party library (lucas34/SwiftQueue#375) that we'll be replacing with our own implementation, where the task may have already ran successfully, but on the next app launch, it may be queued up again, and that's why it's stuck on moving the file Die Siedler von Catan.m4a to the Audibooks folder.

I went through the entire library, and the hierarchy of folder matches what we have, we're just missing the following files:

  • Mordshunger.m4a
  • 05 Rosenrot (5).m4a
  • 02 Das gefrorene Licht.m4a
  • 04 Goblet of Fire.m4a
  • 01 Das Lächeln der Fortuna.m4a

If you sign out, and the sign back in on your phone, these should be queued up, and after that it should sync without problems (another improvement that I'll be working on is background tasks, but after finishing the queue fix, not sure how that got past me 🤦)

Once those are uploaded, on your other devices, you can offload the error file that got associated with your book (on Options → Remove from device), and then redownload and it should work. Heads-up that streaming should work, there's a cache improvement that I have to work on, but got pushed after the queue fix, as that's critical right now

Please let me know how it goes @fs1209

@fs1209
Copy link
Author

fs1209 commented Jan 24, 2024 via email

@fs1209
Copy link
Author

fs1209 commented Feb 2, 2024 via email

@GianniCarlo
Copy link
Collaborator

Hi @fs1209 !

Yeah regarding the iPhone locked, the next thing I'm working on is adding background tasks, I thought that it would suffice with just the background time we have while the user is doing playback with the phone locked, but it's definitely not the case.

I've submitted v5.2.0 that should address the two items I mentioned before in this ticket (preserve order of queued tasks between app launches, and avoid duplicated queued tasks per the ticket open on the third party library). Two other things pending from this ticket is to avoid storing the S3 error response, and give some feedback to the user when an item is being uploaded, so we can show an alert if the user tries to offload the item's backing file

Regarding chapter marks, yeah let's keep track of it in a separate issue. Basically after loading the file's metadata prior to streaming, we reload the chapter info we have on the local database, so we can show the proper chapter marks, so something should be going wrong in that process

@GianniCarlo
Copy link
Collaborator

An update on this ticket, we should be now giving feedback if the user attempts to delete an item that is being uploaded. The next thing to be worked on is the S3 error response being stored, I'll include the fix in the beta (v5.2.6) later this week

@GianniCarlo
Copy link
Collaborator

The S3 error response fix is live now on the AppStore, @fs1209 let me know if there's any pending items please

@fs1209
Copy link
Author

fs1209 commented Mar 31, 2024

Everything works fine, many thanks for your great support!

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

No branches or pull requests

2 participants