-
Notifications
You must be signed in to change notification settings - Fork 9
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] Audiobook Meta File Access Error - PathNotFoundException #82
Comments
Thank you for reporting this issue! It sounds like you've set a custom download directory on an SD card. This may be causing either a parsing error when writing data to disk or a permissions issue. The actual error likely occurs during the media download process. Could you please provide the logs from when you download the item? |
Edited by Vito0912: Stripped code to make it more readable |
I did not see anything suspicious. |
I’m currently unable to reproduce the bug. I’ve just realized that /storage/emulated doesn’t necessarily indicate an SD card. Could you clarify if you’ve set a custom save location and/or installing the app on an SD card, to help me understand the issue better? Ideally, the app shouldn’t populate this path if it lacks the required permissions (What it does in my case). This situation suggests it might have write access but not read access. But I am very unsure |
Save location is within Internal storage, not SD card. /storage/emulated/0/ is how path is shown in android. |
So no meta.json is created at all? |
Meta.json is not created but the media file is downloaded. |
Are you sure the above log includes the item download event? It seems unlikely that the media item could download without the meta.json file, and without any error message. Additionally, the log statement |
i redownloaded again after deleting previous download. there is this line though. yes, I do get fully downloaded file in the path mentioned below and I can play it with external players like smart audiobook player 2024-11-09T07:20:59.010780 Unnamed DownloadInfo(index: 29886432, type: MediaTypeDownload.book, userId: e4f9cc1d-7d48-4e86-92b7-7b596349b801, displayName: Master of Puppets (Unabridged), filename: Master of Puppets_128_44100_Stereo.m4b, format: .m4b, libraryId: aae65e1f-ec22-46a5-86e9-9392a69ca5b6, libraryName: audiobooks, itemId: 3bf79808-ad8f-4242-910f-def1e17fd1c1, status: TaskStatus.complete, size: 694925372, episodeId: null, filePath: /storage/emulated/0/Audiobooks/3bf79808-ad8f-4242-910f-def1e17fd1c1/Master of Puppets_128_44100_Stereo.m4b, duration: null, bitrate: null, codec: null, mimeType: null, embeddedCoverArt: null) |
I noticed that the statement log('Downloading to: $savePath ($baseDirectory)'); wasn’t functioning correctly in the released application. This will be fixed in the next release, which will also delete the download if it fails. As for the other file not being created, I’m unable to diagnose the cause, as there’s no error handling in place to prevent a crash. It should crash if not createable. If the file isn’t being created, it may be related to your device’s file system. Could you try setting a custom folder in the settings of this app to see if that resolves the issue? |
same issue with custom folder. App streams well, i will just use that. downloading is a "good to have" but not a necessity. |
Could you please share the new logs with the updated logging? You can paste the logs like this for better formatting: |
Why does it not log the error xD. |
I have the same error. Strangely it works right after the download. When I closed the app it wasn't working anymore. |
It caches the response, so it doesn't need to reload all the data, allowing it to display content immediately. This approach conserves data usage :)). That's why it does work right after. I'll run some additional tests on my device. |
@LarryBetz and all, The upcoming version, which should be available on the Play Store in about an hour, will address the crash issue but may not fully resolve the underlying error. I’m still uncertain if the media is available for playback then. This update includes significantly more logging around the creation of meta.json. If you install the update, could you please share the updated logs? Thanks! |
The new version seems to be working, it's even playing my previously downloaded files. |
It just does not crash anymore and streams the file now, if there is no meta.json. Could you please look into the logs if there is an error. I made a really small change to file creation. Maybe this fixed it, but I don't think so. Thank you very much! |
I'm not at home right now but I just disabled mobile data and was able to play the file. Although I have created an empty file called meta.json in the folder previously to test it. After deleting it the audiobook isn't working anymore, even with a new empty meta.json |
2024-11-15T13:22:13.788462 DownloadProvider Writing meta.json to: /storage/emulated/0/Audiobooks/f47db04f-6fe2-4d4c-8e3f-7285d035c3a7/meta.json |
Here is the log from a new download. Playing the book offline is not working. |
I also get the error, when trying to save to an external SD card. Same errors as ExXxtr3me posted. The newest version of Buchable did not fix it. |
Will look into it on Friday |
It's not yet in the newest release as I need to test a bit more |
Then I apologize. I was too quick. Sorry, just wanted to let you know. I deleted the post and will update if the problem persists after you updated it :) |
@Paraxes If you're interested, you can test the build for that version. It would be incredibly helpful in diagnosing whether this issue is finally resolved, as I can't replicate the problem myself, though it seems to affect many others. To try it out, simply download the android-apk artifact and install it. Note that you'll need to uninstall the Play Store version before installing the APK. If everything works smoothly and you don't encounter any issues, I'll go ahead and close the PR, and the fix will be included in the next release. |
Could I connect with you on Discord/Mail or another platform you prefer? That way, I can send you two additional versions of the build for testing if you would test them quickly? |
Sure thing. I just sent you an email. |
I’ve identified the issue, but I’m currently unsure if it can be resolved in the next release. |
Bug Report
Description of the Issue
The application is encountering a critical error when attempting to access an audiobook's metadata file. The error occurs when trying to open a meta.json file for an audiobook in the emulated storage directory. I am on android.
Steps to Reproduce
Outline the steps needed to reproduce this issue:
Expected Behavior
Open audiobook page.
Observed Behavior
Error Type: PathNotFoundException
File Path: /storage/emulated/0/Audiobooks/3bf79808-ad8f-4242-910f-def1e17fd1c1/meta.json
System Error: No such file or directory (errno = 2)
Device Status: Android device
Device and Platform Details
Additional Context or Screenshots
Additional Logs
The text was updated successfully, but these errors were encountered: