You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a bulk download function which is saving many files to DocumentDirectoryPath. After migrating from a different version of the library, I began getting an exception when I encounter the same file more than once (each file may appear more than once in the backend).
It seems to occur when CreateFileAsync is called on an existing file despite ReplaceExisting being specified.
Here is the terminal output: Exception thrown at 0x00007FFDC192FA4C (KernelBase.dll) in app.exe: WinRT originate error - 0x80070020 : 'The file is in use. Please close the file before continuing.'.
> ReactNativeFs.dll!winrt::throw_hresult(const winrt::hresult result) Line 5089 C++
ReactNativeFs.dll!winrt::check_hresult(const winrt::hresult result) Line 5159 C++
ReactNativeFs.dll!winrt::impl::consume_Windows_Foundation_IAsyncOperation<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFile>,winrt::Windows::Storage::StorageFile>::GetResults() Line 116 C++
ReactNativeFs.dll!winrt::impl::await_adapter<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFile>>::await_resume() Line 3405 C++
ReactNativeFs.dll!winrt::ReactNativeFs::ReactNativeModule::ProcessDownloadRequestAsync$_ResumeCoro$1() Line 940 C++
ReactNativeFs.dll!std::experimental::coroutine_handle<void>::resume() Line 104 C++
ReactNativeFs.dll!winrt::impl::disconnect_aware_handler<winrt::impl::await_adapter<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFolder>>>::Complete() Line 3364 C++
ReactNativeFs.dll!winrt::impl::disconnect_aware_handler<winrt::impl::await_adapter<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFolder>>>::operator()<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFolder> const &>(const winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFolder> & __formal, winrt::Windows::Foundation::AsyncStatus status) Line 3345 C++
ReactNativeFs.dll!winrt::impl::delegate<winrt::Windows::Foundation::AsyncOperationCompletedHandler<winrt::Windows::Storage::StorageFolder>,winrt::impl::disconnect_aware_handler<winrt::impl::await_adapter<winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFolder>>>>::Invoke(void * asyncInfo, int asyncStatus) Line 839 C++
windows.storage.dll!00007ffdbf85dc91() Unknown
windows.storage.dll!00007ffdbf85d94b() Unknown
windows.storage.dll!00007ffdbf85d836() Unknown
windows.storage.dll!00007ffdbf85d7a3() Unknown
SHCore.dll!00007ffdc4228abc() Unknown
SHCore.dll!00007ffdc42279b6() Unknown
SHCore.dll!00007ffdc42277c1() Unknown
kernel32.dll!00007ffdc412259d() Unknown
ntdll.dll!00007ffdc44caf38() Unknown
Specs
@dr.pogodin/react-native-fs: 2.28.1
react-native: 0.75.3
react-native-windows: 0.75.9
react-native-blob-util: 0.19.11
The text was updated successfully, but these errors were encountered:
cjhines
changed the title
xception thrown on Windows if a file alrady exists
Exception thrown on Windows if file already exists
Nov 25, 2024
Description of the issue
I have a bulk download function which is saving many files to
DocumentDirectoryPath
. After migrating from a different version of the library, I began getting an exception when I encounter the same file more than once (each file may appear more than once in the backend).It seems to occur when
CreateFileAsync
is called on an existing file despiteReplaceExisting
being specified.This is the line which seemingly triggers the crash: https://github.com/birdofpreyru/react-native-fs/blob/master/windows/ReactNativeFs/ReactNativeModule.cpp#L939
Here is the terminal output:
Exception thrown at 0x00007FFDC192FA4C (KernelBase.dll) in app.exe: WinRT originate error - 0x80070020 : 'The file is in use. Please close the file before continuing.'.
Here's my code:
Stack trace:
Specs
The text was updated successfully, but these errors were encountered: