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: ImportOperation.swift #1127

Closed
rastaman111 opened this issue Apr 8, 2024 · 9 comments
Closed

Bug: ImportOperation.swift #1127

rastaman111 opened this issue Apr 8, 2024 · 9 comments
Labels

Comments

@rastaman111
Copy link

Environment

  • OS Version: [e.g. 17.4.1]
  • App Version: [e.g. 5.2.7]

What do I do to get this crash:

  1. I want to import a file from the device directory
  2. Select the desired file and click "Open"
  3. The Import screen opens with my file
  4. Wait a minute and click “Finish”
  5. It turns out to be a crash

On the line fatalError("Fail to move file from (currentFile) to (destinationURL). Error: (error.localizedDescription)")

You may ask why we are waiting exactly a minute?
Since if you immediately click “Finish”, this bug is not reproduced. I think that this is due to waiting and an internal failure occurs

I noticed this bug a long time ago (a year ago), but I didn’t know how to reproduce it

@rastaman111 rastaman111 added the bug label Apr 8, 2024
@rastaman111
Copy link
Author

I think this is due to the fact that the files are stored in tmp during import, and this is a temporary directory

@rastaman111
Copy link
Author

I tested on the simulator and monitored the tmp folder in real time. The file is stored there for literally 40-50 seconds and deleted

@GianniCarlo
Copy link
Collaborator

Hi @rastaman111 ! interesting, for reference, the files used to be put into the app container in the Documents/Inbox folder, and they pretty much stayed in there until cleared by the app.

The URL is now looking like this file:///private/var/mobile/Containers/Data/Application/D0863F00-31DB-43A6-8517-F2FEDD2B3C32/tmp/com.tortugapower.audiobookplayer-Inbox/001.mp3, not sure when this was changed (could be iOS 17?), but I think a quick solution to this, would be to preemptively move the files from the tmp directory to the Inbox folder, and pass the new URL to the import manager

@rastaman111
Copy link
Author

Hello, this happened before when you import through documentPicker, and if when through the simulator and just transfer the file, then immediately to Inbox

@rastaman111
Copy link
Author

There is a cool FlEX library, it shows the entire internals of the application and can be monitored in real time

@GianniCarlo
Copy link
Collaborator

@rastaman111 I've updated the beta with a fix from #1134, from my tests it looks to be fixed, please let me know if it still happens to you (link beta: https://testflight.apple.com/join/xLDneJXN)

@rastaman111
Copy link
Author

@GianniCarlo Hello

I checked the assembly, there is no more bug 👍🏼

@GianniCarlo
Copy link
Collaborator

Nice! Thanks for checking @rastaman111

@GianniCarlo
Copy link
Collaborator

This is now live on the AppStore

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