react-native-hole-view icon indicating copy to clipboard operation
react-native-hole-view copied to clipboard

'react/utils/fnv1a.h' file not found

Open ustuncem opened this issue 1 year ago • 12 comments

Hello,

When I try to build my app with Xcode, I get the following error: 'react/utils/fnv1a.h' file not found in the PropsMacros.h file. Screenshot 2024-04-30 at 21 37 34

I installed the pods with the following command: RCT_NEW_ARCH_ENABLED=1 bundle exec pod install. the issue seems to be only related to the iOS.

Here are my specs:

System:
  OS: macOS 14.2.1
  CPU: (8) arm64 Apple M2
  Memory: 405.19 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.0
    path: ~/.nvm/versions/node/v20.11.0/bin/node
  Yarn:
    version: 4.1.1
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.0/bin/npm
  Watchman:
    version: 2024.04.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.1
    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.74.0
    wanted: 0.74.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps the Reproduce

  1. open up a command line and run: npx react-native@latest init hole-view-test
  2. then cd into that project and run bundle install
  3. then run yarn add react-native-hole-view
  4. then cd ios
  5. then run RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
  6. finally cd .. and run yarn ios

This steps will produce an error. Is there any way that I can solve this?

ustuncem avatar Apr 30 '24 18:04 ustuncem

@ustuncem did you solve this?

arys avatar May 27 '24 10:05 arys

@arys No, I ended up downgrading to 0.73.7, I also use react-native-vision-camera and its also not ready for v0.74 so we have to wait or try to solve it. I tried to solve it in Xcode but I dont have a lot of time on my hand

ustuncem avatar May 27 '24 10:05 ustuncem

@ustuncem got it, thanks for reply

arys avatar May 27 '24 12:05 arys

@ustuncem, I am getting this issue in my RN 0.76.3 version. Is there any solution for it?

nil-kombee avatar Dec 24 '24 13:12 nil-kombee

I haven't tested it in the New Arch sadly :( that project is now in control of another team and I am really busy currently to try and fix it. @nil-kombee you can try the alpha releases, possibly the version 4 may fix your problem for the new arch

ustuncem avatar Dec 24 '24 13:12 ustuncem

Any updates about this? @ustuncem

Tamimjabr avatar Apr 14 '25 12:04 Tamimjabr

I am facing the same issue, any solution of this?

aurangblackbuck avatar Apr 20 '25 08:04 aurangblackbuck

+1

chavanRk avatar Apr 21 '25 07:04 chavanRk

I fixed this by bumping the package version

Ruben-Krueger avatar Apr 28 '25 23:04 Ruben-Krueger

this is what I did. remove the lib and wrote this:

import React from 'react';
import {View, StyleSheet, Dimensions} from 'react-native';
import Svg, {Defs, Mask, Rect} from 'react-native-svg';
import { scanningHoleY } from '../config';

interface HoleViewProps {
  holeWidth: number;
  holeHeight: number;
  backgroundColor?: string;
  borderRadius?: number;
}

const HoleView: React.FC<HoleViewProps> = ({
  holeWidth,
  holeHeight,
  backgroundColor = 'rgba(0, 0, 0, 0.5)',
  borderRadius = 16,
}) => {
  const {width: screenWidth, height: screenHeight} = Dimensions.get('window');
  const holeX = (screenWidth - holeWidth) / 2;
  const topSpace = scanningHoleY;

  return (
    <View style={styles.holeView} >
      <Svg height={screenHeight} width={screenWidth} style={StyleSheet.absoluteFill}>
        <Defs>
          <Mask id="mask" x="0" y="0" height={screenHeight} width={screenWidth}>
            <Rect
              x="0"
              y="0"
              width={screenWidth}
              height={screenHeight}
              fill="white"
            />
            <Rect
              x={holeX}
              y={topSpace}
              width={holeWidth}
              height={holeHeight}
              rx={borderRadius}
              ry={borderRadius}
              fill="black"
            />
          </Mask>
        </Defs>
        <Rect
          x="0"
          y="0"
          width={screenWidth}
          height={screenHeight}
          fill={backgroundColor}
          mask="url(#mask)"
        />
      </Svg>
    </View>
  );
};

const styles = StyleSheet.create({
  holeView: {
    position: 'absolute',
    width: '100%',
    height: '100%',
    zIndex: 0,
  },
});

export default HoleView;

Tamimjabr avatar Apr 29 '25 07:04 Tamimjabr