Skip to content

Async Storage not working for Windows New Arch #14347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
joshholmeszonal opened this issue Feb 12, 2025 · 7 comments
Closed

Async Storage not working for Windows New Arch #14347

joshholmeszonal opened this issue Feb 12, 2025 · 7 comments
Assignees
Labels
Area: CLI Area: Native Modules bug Extensions Tracks issues against community modules and extensions External Issue tracked in this repo but change will need to happen in another repo New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Workstream: Module Support Module developers have the requisite tooling and clear path for adding windows support to modules.
Milestone

Comments

@joshholmeszonal
Copy link

Problem Description

Hi,

When using the new arch on Windows, async storage crashes the build once installed

 × Building Solution: asyncTest.vcxproj -> C:\Users\JoshH2\asyncTest\windows\x64\Debug\asyncTest.exe...
 × Build failed with message 2:7>C:\Users\JoshH2\.nuget\packages\microsoft.windows.cppwinrt\2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets(228,13): error MSB4006: There is a circular dependency in the target dependency graph involving target "CppWinRTComputeGetResolvedWinMD". [C:\Users\JoshH2\asyncTest\windows\asyncTest\asyncTest.vcxproj]. Check your build configuration.
Command failed. Re-run the command with --logging for more information.

It looks like there's also an open bug here which hasn't had any activity: react-native-async-storage/async-storage#1174

Raising this here as it looks like it's maintained by Microsoft due to this PR react-native-async-storage/async-storage#1147 from @Yajur-Grover

Should this be working with RN v0.77?

Steps To Reproduce

  1. Create a new repo with cpp-app windows
  2. Install async storage
  3. Build crashes

Expected Results

Async storage is useable with Windows New Arch

CLI version

15.0.1

Environment

System:
  OS: Windows 11 10.0.22631
  CPU: (4) x64 Intel(R) Xeon(R) E-2124 CPU @ 3.30GHz
  Memory: 19.56 GB / 31.87 GB
Binaries:
  Node:
    version: 22.12.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\Program Files\nodejs\yarn.CMD
  npm:
    version: 10.9.0
    path: 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
      - 10.0.22621.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.12.35514.174 (Visual Studio Professional 2022)
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.0
    wanted: 0.77.0
  react-native-windows:
    installed: 0.77.2
    wanted: ^0.77.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

None - just started a blank app and only installed Async Storage

Target Platform Version

None

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

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

No response

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Feb 12, 2025
@Yajur-Grover Yajur-Grover self-assigned this Feb 12, 2025
@Yajur-Grover
Copy link
Contributor

Hey thanks for raising this issue. This is not expected, will investigate this locally. Couple of questions:

  • Were you able to launch the app through Visual Studio? (run yarn start in the root directory and then launch the App through the sln file in VS 2022)?
  • Were you able to run the example app in the async-storage repo with the same issue?

@chrisglein chrisglein added this to the Next milestone Feb 12, 2025
@chrisglein chrisglein added Extensions Tracks issues against community modules and extensions External Issue tracked in this repo but change will need to happen in another repo Workstream: Module Support Module developers have the requisite tooling and clear path for adding windows support to modules. labels Feb 12, 2025
@Yajur-Grover
Copy link
Contributor

Another follow up - what is the version of VS 2022 you are using?

@joshholmeszonal
Copy link
Author

I couldn't get the example app working - but it does run through VS so I'll close this out. Does that mean that we can't use the command line again for the new arch? There's always errors when running npx react-native run-windows with this package on new arch

@Yajur-Grover
Copy link
Contributor

Just to clarify, was the example able to launch through VS? Or were you just able to build the solution? The error message you're getting is also present in other New Architecture apps, which we are looking into. Can you let me know what your version of Visual Studio is?

@chiaramooney chiaramooney added Area: Native Modules and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Feb 13, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper label Feb 13, 2025
@chiaramooney
Copy link
Contributor

@jonthysell Might be a CLI issue. Yajur will do some initial testing and we will circle back.

@chiaramooney chiaramooney added New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric and removed Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper labels Feb 13, 2025
@Yajur-Grover
Copy link
Contributor

Yajur-Grover commented Feb 14, 2025

Update: This is a known issue with the New Architecture tracked here: #13599. It looks like only the first time you run from the CLI the error message will come up - can you try running run-windows twich consecutively and see if it launches then?

@joshholmeszonal
Copy link
Author

@Yajur-Grover - yes that's exactly the issue. I'll close this out. Thanks for your help on this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CLI Area: Native Modules bug Extensions Tracks issues against community modules and extensions External Issue tracked in this repo but change will need to happen in another repo New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric Workstream: Module Support Module developers have the requisite tooling and clear path for adding windows support to modules.
Projects
Status: Done
Development

No branches or pull requests

4 participants