mirror of
https://github.com/LiveContainer/LiveContainer.git
synced 2026-04-26 01:25:52 +03:00
[GH-ISSUE #118] [BUG] Guest Apps Cannot Access tmp folder created by .itemReplacementDirectory #106
Labels
No labels
bug
compatibility
enhancement
multitasking
pull-request
safe area
status: broken
status: usable
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LiveContainer#106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hugeBlack on GitHub (Aug 12, 2024).
Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/118
Describe the bug
When I was trying to address with issue #82 , where the Aidoku app can't add manga sources. It turns out that the app attempted to create a temporary folder to store decompressed files. However, it used the following code to create it:
Here's the original code
It appears that this code created the folder in
file:///private/var/mobile/Containers/Data/Application/D4F742C8-E9AE-4D06-B00E-3CB37D11E767/tmp//C0BB21DC-4BB6-450A-B8C6-43CEE0CFA491/tmp/NSIRD_Aidoku_LfvIwr/, which is the tmp folder of liveContainer itself,where
D4F742C8-E9AE-4D06-B00E-3CB37D11E767is the uuid of LiveContainer, and the app can't write to it, thus failing to add source. Changing the.itemReplacementDirectoryinto.documentDirectoryaddressed this issueInstructions to reproduce
Write a program that tries to create a temporary folder with the said method and try to write to that temp folder.
What version of LiveContainer are you using?
2.2.1-release
Other info
I believe that there are many apps use this method to create temporary folders since Apple includes this method in their document. Addressing this issue will surly contribute to LiveContainer's compatibility.
@khanhduytran0 commented on GitHub (Aug 13, 2024):
Hmm, it’s weird, considering I have already stated this (also applies to tmp):
I made the decision to redirect all tmp files to LiveContainer’s tmp since it would be properly cleaned up by iOS. I’ll try other ways and let you know
@khanhduytran0 commented on GitHub (Aug 13, 2024):
Well, the issue boils down to the extraneous slash in tmp path
@boa-z commented on GitHub (Aug 13, 2024):
The problem mentioned in #82 still exist. Unfortunately, the fix version also crashed in this build. Following are part of the error log:
@hugeBlack commented on GitHub (Aug 13, 2024):
Thank for your quick response!
I think this issue is resolved with new issues introduced. If I set the app's data folder to some that exist before LiveContainer updated (to
99b0c31), the app worked flawlessly. However, if I change it to some folder created before the update, it seems that LiveContainer can't find the Documents folder when trying to create a tmp folder and keeps trying to create new "Documents.sb-xxxxx" file inside the app's folder.In this case, it kept creating folders like
file:///var/mobile/Containers/Data/Application/B58FA70F-7448-48C1-99BA-4E4C8B33B2CA/Documents/Data/Application/D8CB47F3-653F-474B-9910-2FB954870CE7/Documents.sb-493f7faa-fgYcOs/, and this created folder is actually a 0kb file and apps cannot write to it.However, if I switch the app's folder to
C0BB21DC-4BB6-450A-B8C6-43CEE0CFA491that existed before update, it can correctly create and write tofile:///private/var/mobile/Containers/Data/Application/B58FA70F-7448-48C1-99BA-4E4C8B33B2CA/tmp/C0BB21DC-4BB6-450A-B8C6-43CEE0CFA491/tmp/NSIRD_Aidoku_UIiig8/I tried to copy the content from the older folder to the new one, but this issue kept happening.
@khanhduytran0 commented on GitHub (Aug 13, 2024):
Does this (
7f3868c) work?@boa-z commented on GitHub (Aug 13, 2024):
Same problem.
@hugeBlack commented on GitHub (Aug 13, 2024):
This doesn't work either.
@khanhduytran0 commented on GitHub (Aug 14, 2024):
In case you aren’t notified, I’ve made changes in debug branch, let me know if anything changes.
@hugeBlack commented on GitHub (Aug 14, 2024):
Thank you! 0b42688 do solve this issue! I think both issues can be closed now.