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: File import to BookPlayer not always working #625

Closed
carbonel17 opened this issue Sep 6, 2021 · 20 comments
Closed

Bug: File import to BookPlayer not always working #625

carbonel17 opened this issue Sep 6, 2021 · 20 comments
Labels

Comments

@carbonel17
Copy link

Environment

  • OS Version: iOS 14.7.1
  • App Version: BookPlayer 4.1.0-2

Description

I have been using BookPlayer for several months as my exclusive audiobook reader. I found it after becoming annoyed with VLC because it kept losing my place.

Normally I import books using the File Import feature in iTunes. If the book is just one file, I'll use the Dropbox feature that lets you export to an app -- but that's tedious if it's more than one file, because (best I can tell) you can only do it one file at a time.

Recently, I've been having more and more problems with importing files. The file load iTunes File Sharing or Export from Dropbox...and nothing happens. BookPlayer doesn't seem to recognize that a file (or set of files) is being sent to it.

Those same files import (and play) just fine into VLC or the iTunes music player, so it's not a problem of corrupted files.

I first had this problem with .m4b files (though I've had no problems with other .m4b files and BookPlayer), but today the problem is showing up with a bunch of different .mp3 files that I tried.

I haven't seen any other posts about this, just a related one from February about file sharing turned off, but that appeared to be a temporary thing. This appears to be intermittent, as if there's only some files that BookPlayer will accept.

Any idea what the problem might be? Any help appreciated. (I can attach one of the problematical .mp3 files if that would be helpful, but it's 28 Mb, so I wasn't sure if that was appropriate.)

Steps to reproduce the behavior

  1. Start up iTunes on desktop computer with iPhone connected via USB.
  2. Go to File Sharing. Click on BookPlayer.
  3. Drag book files into the import area (or use Add Files).
  4. Look at BookPlayer. What should happen is that an import dialog box opens. What's been happing is...nothing.
@carbonel17 carbonel17 added the bug label Sep 6, 2021
@GianniCarlo
Copy link
Collaborator

@carbonel17 can you test on the version that was released today (v4.1.1)? that contains a fix where folders were being ignored by the DirectoryWatcher (which also was affecting some zip files imports)

@carbonel17
Copy link
Author

It worked! I was able to import a file using the Dropbox export function.

Thanks for the quick response!

@carbonel17
Copy link
Author

Update: A book that I tried to import as a zipfile from Dropbox is still being ignored by BookPlayer.

@carbonel17
Copy link
Author

Further update: Importing from iTunes File Sharing, either as a zipfile or .mp3 files isn't working with the same files I had problems with yesterday.

So either things aren't completely fixed or I have problematical files (though they work just fine in iTunes and VLC).

@carbonel17
Copy link
Author

And yet a further update: Nothing was working, even something that had worked before, so I tried shutting down my iPhone and restarting it. After that, I was able to import a zipfile via Dropbox. (I haven't tried iTunes again after that.)

Any idea why restarting would fix things? (It didn't before the update.)

@GianniCarlo
Copy link
Collaborator

Hmmmm not really sure regarding the restarting, I've had airdrop stop receiving files in general before, where I had to restart the phone to get it working again. Please let me know when you get the chance to test iTunes again 🤔

@PasChris
Copy link

PasChris commented Sep 7, 2021

I just updated to the most recent version on iOS on my 12 pro max. I have tried importing m4b files through airdrop and the files didn't show up in book player. I tried again and got a message saying ”importing takes time” and a description of the audio file I was importing with ”-1” added to the file, which makes me believe that the original file is somewhere in the phone.

I've restarted my phone twice and I still don't see the files. I went into the settings and clicked on the manage your files link. My other files showed up there (not the new import) and they all had yellow triangles next to them. When I clicked the yellow triangle, it said they were missing and asked if I wanted to fix. When I click fix, nothing happens. I can still play the book I'm listening to currently.

What's going on?

@PasChris
Copy link

PasChris commented Sep 7, 2021

I just checked and the storage amount listed in the app and the storage amount listed as used in the settings app are different. They are off by almost 2gigs. That is about the size of the two books I tried importing but never showed up in the app.

Help!

@GianniCarlo
Copy link
Collaborator

When I click fix, nothing happens. I can still play the book I'm listening to currently.

If you can play the book, then it looks like the file is there multiple times, so you should be able to delete that one

I just checked and the storage amount listed in the app and the storage amount listed as used in the settings app are different. They are off by almost 2gigs

The folder structure is as follows:

  • Documents
    • Processed → This is where all the successfully imported files are
    • Inbox → This is created automatically by the OS, and it's where Airdropped files are originally placed before being imported
  • Application Support → This is where the database file is

Before, Processed was a black hole, in the sense that orphaned files with no associated book could be there, and have no way of either restoring them, or deleting them without deleting the whole Processed folder, the new storage management option is a way to shed light on that, and it only reads the Processed folder, since that is actually the source of the library.

Regarding the Inbox folder, that is certainly a place where we can do an improvement and periodically erase in case there are some failed imports. The app does clean that up when imports are cancelled or finished, but we have yet to handle if it fails for some reason though 🤔. If you have your phone connected to your laptop, you can erase the Inbox folder from the app via the Files section, and it won't have any repercussions

Screen Shot 2021-09-07 at 18 27 37

ps. There are two more things that may add up space to the app and is not considered by the storage management settings we have, and those are the size of the database file, and the size of temporary directories created by the OS when importing via the Files integration (these are periodically erased by the OS, so you don't have to worry about this)

@PasChris
Copy link

PasChris commented Sep 8, 2021

I’m just a basic user, not a programmer or anything. So I don't have the phone connected to any other computer.

I get that if the file plays then I shouldn't have to worry. I'm not really concerned about them.

The real problem is that there are 2 books that I've imported through airdrop that aren't showing up at all. When I try to re-import them, I get that error message saying I'm importing a duplicate.

@jstaubr
Copy link

jstaubr commented Sep 14, 2021

I'm noticing the same behaviour. I use airdrop only and the first attemp fails, second attempt gets noticed by the app, but the zip file has "-1.zip". The first file is stuck in inbox.
This happens since the version that brought the UI redesign (I think).

@GianniCarlo
Copy link
Collaborator

@jstaubr does the first time open the app but fails to bring up the import screen? I'm in the middle of optimizing/refactoring that screen with some tools available from iOS 13+

@jstaubr
Copy link

jstaubr commented Sep 14, 2021

@jstaubr Yes exactly, airdrop shows new file screen where I can choose BookPlayer and the app opens and nothing happens. Second time the import screen shows up and proceeds with the new file.

@carbonel17
Copy link
Author

Has there been a new update to the app? Today, for the first time since the problems started, I was able to import two books in a row (as zipfiles, using Dropbox) without having to restart my iPhone for the second one. (I did restart before the first one, because I didn't think to experiment.)

@GianniCarlo
Copy link
Collaborator

not yet @carbonel17 , we still have to work on the loading stage of the app where all the database migration will execute before loading up the library. But a fix will be included for this ticket though

@0xConnorRhodes
Copy link

I am also experiencing this issue. Some of the m4a and mp3 files I try to import don't work. They silently fail when imported through airdrop or the files app.

Version: 4.1.1-4 - iOS 15.0

@carbonel17
Copy link
Author

@0xConnorRhodes, try shutting down your device (not just turning it off) and restarting it. That has been a reliable workaround for me. Sometimes I'll get two imports after that, sometimes just one. But it's always worked at least once after a shutdown and restart.

@GianniCarlo
Copy link
Collaborator

@0xConnorRhodes @carbonel17 @jstaubr @PasChris while debugging this, I found some issues with the import logic that would make the import screen not show up. The fixes were included in v4.3.0 that was released earlier today, please update and let us know if this issue persists

@carbonel17
Copy link
Author

Thanks for the update! I tried importing two audiobooks, and both imported properly. I'll let you know if I encounter any problems going forward.

@GianniCarlo
Copy link
Collaborator

I'll close this issue, but feel free anyone to continue the conversation in case something comes up

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

5 participants