joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

Error: No such file - IOS not working #840

Open ahmetcangurel opened 1 year ago

ahmetcangurel commented 1 year ago

'm trying to select the file with the react native document picker and convert the pdf file but

[Error: No such file '/var/mobile/Containers/Data/Application/362A6BC9-2BDA-404C-9288-77B50ED76E0D/Documents/Verkstedha%CC%8Andbok-capri-2.8i-1981.pdf']

I am getting such an error. Android side works fine

code

Do i need to change my path for document and how will i do?

usmanhashmi2123 commented 6 months ago

Same issue

on some pdf files have no issue

no some it give this error message. both are present at same location

ahmetcangurel commented 5 months ago

Same issue

on some pdf files have no issue

no some it give this error message. both are present at same location

I don't remember how I solved it, but special characters in the file name may be causing problems.

asutariyadigit commented 5 months ago

Hi Team, I Have same issue: What is exact cause.

Fatal Exception: NSInternalInconsistencyException -[UIDocumentPickerViewController initForExportingURLs:asCopy:] must be called with a URL pointing to an existing file: Error Domain=NSCocoaErrorDomain Code=260 "The file “test.pdf” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///var/mobile/Containers/Data/Application/6B7EEC85-DBE1-44D8-88C4-A2D89DBFEAF4/Library/Caches/D127050460-Comprehensive-Policy.pdf, NSFilePath=/var/mobile/Containers/Data/Application/6B7EEC85-DBE1-44D8-88C4-A2D89DBFEAF4/Library/Caches/test.pdf, NSUnderlyingError=0x283e52730 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

usmanhashmi2123 commented 4 months ago

Same issue on some pdf files have no issue no some it give this error message. both are present at same location

I don't remember how I solved it, but special characters in the file name may be causing problems.

yes i found the problem was in file name. special character in file name was causing the issue i used let decodeUri= decodeUri(uri)

usmanhashmi2123 commented 4 months ago

Hi Team, I Have same issue: What is exact cause.

Fatal Exception: NSInternalInconsistencyException -[UIDocumentPickerViewController initForExportingURLs:asCopy:] must be called with a URL pointing to an existing file: Error Domain=NSCocoaErrorDomain Code=260 "The file “test.pdf” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///var/mobile/Containers/Data/Application/6B7EEC85-DBE1-44D8-88C4-A2D89DBFEAF4/Library/Caches/D127050460-Comprehensive-Policy.pdf, NSFilePath=/var/mobile/Containers/Data/Application/6B7EEC85-DBE1-44D8-88C4-A2D89DBFEAF4/Library/Caches/test.pdf, NSUnderlyingError=0x283e52730 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

special character in file name was causing the issue i used let decodeUri= decodeUri(uri)