microsoft / microsoft/react-native-windows

avmoroz/react-native-fs crashing on downloadFile

Open
#10,501 8 comments 0 reactions 1 assignee View on GitHub

@vmoroz is already working on this.

Since Sep 15, 2022.

bug Extensions External Workstream: Module Support
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Problem Description

I'm getting the following error while calling downloadFile with avmoroz/react-native-fs. Anyone encountered it or can offer some advice? I also tried wwimmo/react-native-fs with no luck.

RNFS.dll!winrt::impl::consume_Windows_Foundation_IPropertyValue<winrt::Windows::Foundation::IReference<unsigned __int64>>::Type() Line 190	C++
RNFS.dll!RNFSManager::ProcessDownloadRequestAsync$_ResumeCoro$1() Line 954	C++
[External Code]	
RNFS.dll!winrt::impl::resume_apartment(const winrt::impl::resume_apartment_context & context, std::experimental::coroutine_handle<void> handle) Line 8289	C++
RNFS.dll!winrt::impl::disconnect_aware_handler::Complete() Line 3148	C++
RNFS.dll!winrt::impl::disconnect_aware_handler::operator()() Line 3139	C++
RNFS.dll!<lambda_7b3a35664967a00a906a66b76e011559>::operator()<winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Windows::Web::Http::HttpResponseMessage,winrt::Windows::Web::Http::HttpProgress> const &,enum winrt::Windows::Foundation::AsyncStatus>(const winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Windows::Web::Http::HttpResponseMessage,winrt::Windows::Web::Http::HttpProgress> & __formal, winrt::Windows::Foundation::AsyncStatus operation_status) Line 3168	C++
RNFS.dll!winrt::impl::delegate<winrt::Windows::Foundation::AsyncOperationWithProgressCompletedHandler<winrt::Windows::Web::Http::HttpResponseMessage,winrt::Windows::Web::Http::HttpProgress>,<lambda_7b3a35664967a00a906a66b76e011559>>::Invoke(void * asyncInfo, int asyncStatus) Line 860	C++
[External Code]
Screenshot 2022-09-05 at 17 53 50
Steps To Reproduce
const download = await FileSystem.downloadFile({
  fromUrl,
  toFile: destinationPath,
  headers: {
    Authorization: `Bearer ${Config.API_KEY}`,
  },
});
Expected Results

No response

CLI version

8.0.6

Environment
System:
    OS: Windows 10 10.0.22000
    CPU: (4) x64 Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
    Memory: 9.58 GB / 15.99 GB
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 16.11.32602.291 (Visual Studio Community 2019)
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0
    react-native: 0.69.5 => 0.69.5
    react-native-windows: 0.69.6 => 0.69.6
  npmGlobalPackages:
    *react-native*: Not Found
Target Platform Version

No response

Target Device(s)

No response

Visual Studio Version

Visual Studio 2019

Build Configuration

No response

Snack, code example, screenshot, or link to a repository

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.