react-native-blob-courier
react-native-blob-courier copied to clipboard
IOS Fix - NSCocoaErrorDomain error 256
Fixed a IOS Bug, throwing NSCocoaErrorDomain code 256 whein trying to read absolutePath's of files ready to be uploaded.
Thank you @EduFrazao ! I'll try to take a look and merge this weekend
Thank you @EduFrazao ! I'll try to take a look and merge this weekend Thank you @edeckers !!!
TypeScript Test Report
1 files ±0 1 suites ±0 1s :stopwatch: ±0s 35 tests ±0 35 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Unit Test Report
1 files ±0 1 suites ±0 9s :stopwatch: ±0s 19 tests ±0 19 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Instrumented Test Report
0 files - 1 0 suites - 1 0s :stopwatch: - 1h 20m 45s 0 tests - 8 0 :heavy_check_mark: - 8 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
iOS Test Report
0 files - 1 0 suites - 1 0s :stopwatch: -8s 0 tests - 15 0 :heavy_check_mark: - 15 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
TypeScript Test Report
1 files ±0 1 suites ±0 1s :stopwatch: ±0s 35 tests ±0 35 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Unit Test Report
1 files ±0 1 suites ±0 9s :stopwatch: ±0s 19 tests ±0 19 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Instrumented Test Report
0 files - 1 0 suites - 1 0s :stopwatch: - 1h 20m 45s 0 tests - 8 0 :heavy_check_mark: - 8 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
iOS Test Report
1 files ±0 1 suites ±0 4s :stopwatch: -4s 15 tests ±0 12 :heavy_check_mark: - 3 0 :zzz: ±0 3 :x: +3 16 runs +1 12 :heavy_check_mark: - 3 0 :zzz: ±0 4 :x: +4
For more details on these failures, see this check.
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
TypeScript Test Report
1 files ±0 1 suites ±0 1s :stopwatch: ±0s 35 tests ±0 35 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Unit Test Report
1 files ±0 1 suites ±0 9s :stopwatch: ±0s 19 tests ±0 19 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
Android Instrumented Test Report
1 files ±0 1 suites ±0 1h 21m 26s :stopwatch: +41s 8 tests ±0 8 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
iOS Test Report
1 files ±0 1 suites ±0 4s :stopwatch: -4s 15 tests ±0 12 :heavy_check_mark: - 3 0 :zzz: ±0 3 :x: +3 16 runs +1 12 :heavy_check_mark: - 3 0 :zzz: ±0 4 :x: +4
For more details on these failures, see this check.
Results for commit 93778d74. ± Comparison against base commit 7be63df0.
This is taking longer than expected, as I've had some issues with the builder machine not being able to kill the test runs correctly. Also, some iOS-tests are failing and I didn't have time to investigate yet. I hope to find some time for this soon
This is taking longer than expected, as I've had some issues with the builder machine not being able to kill the test runs correctly. Also, some iOS-tests are failing and I didn't have time to investigate yet. I hope to find some time for this soon
Hi @edeckers ! Thanks for your answer! No problem, I'm running a patched version on my application waiting for your review. Thank you very mutch.
tl; dr: found the problem that causes the tests to fail, did not have time to fix yet
--
I had some time at my disposal, so I was able to track down the issue with regards to the broken tests.
The buildRequestDataForFileUpload
receives a parts
parameter, which contains - among other things - the textual representation of the path to the local file to be uploaded.
When this path is prefixed with file://
schema in the input, e.g. file:///path/to/your/file.ext
this causes problems, because URL(fileURLWithPath: ...
replaces the file://
schema with file:/
, e.g. file:/path/to/your/file.ext
which results in a 'file not found' exception.
There are some instant gratification hacks to circumvent this problem, like stripping file://
from the provided url, but that's just that: a hack, which will probably open a whole other can of worms and is not something that I'd like to introduce to the codebase.
So, I will need to find some time again to fix it properly, but the available time is sparse these days so it might be a while. If you're up to it, I'd happily accept a PR that addresses the situation!