Skip to content
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

'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found #106

Closed
billyjacoby opened this issue Feb 7, 2024 · 13 comments
Closed

Comments

@billyjacoby
Copy link

Description

When trying to compile and run the example XR app, the process fails with the error 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found

Steps to reproduce

  1. Init a new project as described in the readme
  2. Run the build in XCode

React Native Version

0.73.4

Affected Platforms

Other (please specify)

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 1.01 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.5.0
    path: ~/.nvm/versions/node/v20.5.0/bin/node
  Yarn:
    version: 4.1.0
    path: ~/.nvm/versions/node/v20.5.0/bin/yarn
  npm:
    version: 9.8.0
    path: ~/.nvm/versions/node/v20.5.0/bin/npm
  Watchman:
    version: 2024.01.15.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.4
    wanted: 0.73.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

`/Users/billyjacoby/Programming-Local/rnVisionLATEST/node_modules/@callstack/react-native-visionos/Libraries/XR/RCTXRModule.mm:3:9 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' file not found
`

Reproducer

https://github.com/billyjacoby/callstack-visionos-repro

Screenshots and Videos

No response

@degeloper34
Copy link

Same issue +1

@okwasniewski
Copy link
Member

Hey,

Can you try running git clean -xdf visionos to remove build folders and cache from visionOS folder.

And then rerun pod install. You might also need to remove and install node_modules

Let me know if this fixes the issue

@giovanijfc
Copy link

giovanijfc commented Feb 8, 2024

Same issue in @callstack/react-native-visionos@0.73.4, in version @callstack/react-native-visionos@0.73.3 works normally

@billyjacoby
Copy link
Author

Hey,

Can you try running git clean -xdf visionos to remove build folders and cache from visionOS folder.

And then rerun pod install. You might also need to remove and install node_modules

Let me know if this fixes the issue

This doesn't fix it. I ran git clean -xdf visionos and yarn cache clean and deleted node_modules before trying again too.

@okwasniewski
Copy link
Member

Can you try if it's reproducible in a freshly initialised project?

@billyjacoby
Copy link
Author

Can you try if it's reproducible in a freshly initialised project?

Yeah I actually tried in a brand new project on 2 different machines before posting the issue.

@RobPruzan
Copy link

I'm also reproducing on a new project, can't downgrade and re-init either since I can't find what's being persisted

@MP185496
Copy link

MP185496 commented Feb 8, 2024

Same for me

@JeffreyCastellano
Copy link

Hey folks, was just a code generation issue. Had the same problem... 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' should be 'FBReactNativeSpec/FBReactNativeSpec.h'. The updated header already has the appropriate code updates. Doing that cleared the error for me and I can launch XR immersions.
Screenshot 2024-02-08 at 3 33 46 PM

@billyjacoby
Copy link
Author

Hey folks, was just a code generation issue. Had the same problem... 'FBReactNativeSpec_visionOS/FBReactNativeSpec_visionOS.h' should be 'FBReactNativeSpec/FBReactNativeSpec.h'. The updated header already has the appropriate code updates. Doing that cleared the error for me and I can launch XR immersions. Screenshot 2024-02-08 at 3 33 46 PM

Confirmed, this worked for me too!

@JeffreyCastellano Did you have to create that Alert from SwiftUI? I'm trying to figure out if the current XR implementation only allows for immersive content from Swift. And if so you would mind sharing the code you've got here from the App.swift file?

I'm super new to Swift and trying to dip my toes in for VisionOS dev specifically

@JeffreyCastellano
Copy link

Alert is coming from React Native...its worth noting they may change the way that file is coming in to better support react native since the other devices won't have that XR profile but at least temporarily this solved it for me.

@okwasniewski
Copy link
Member

Hey!

I've released new version 0.73.4-1 with the fix. Let me know if this solves the issue

@billyjacoby
Copy link
Author

Confirmed that this fixes it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants