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

new architecture not working #45

Closed
SolankiYogesh opened this issue Nov 26, 2024 · 21 comments
Closed

new architecture not working #45

SolankiYogesh opened this issue Nov 26, 2024 · 21 comments

Comments

@SolankiYogesh
Copy link

SolankiYogesh commented Nov 26, 2024

AddInstanceForFactory: No factory registered for id <CFUUID 0x600000347080> F8BB1C28-BAE8-11D6-9C31-00039315CD46
  HALC_ProxyObjectMap.cpp:153    HALC_ProxyObjectMap::_CopyObjectByObjectID: failed to create the local object
     HALC_ShellDevice.cpp:2641   HALC_ShellDevice::RebuildControlList: couldn't find the control object

image

@hrastnik
Copy link

I've created a PR that enables compatibility with the new architecture - #44

It's just a couple of lines so you can use patch-package if you don't want to wait for it to be merged.

@SolankiYogesh
Copy link
Author

@hrastnik thanks ok let me try

@SolankiYogesh
Copy link
Author

@hrastnik i just tested #44 but its not working for me same issue after even reinstalling everything

@hrastnik
Copy link

Are you sure it's a problem with react-native-volume-manager?

@SolankiYogesh
Copy link
Author

yes 100% sure bro i think there is some issue related to new arch

@hirbod
Copy link
Owner

hirbod commented Nov 26, 2024

I dont think that #44 is enough to fix for new arch. We're also using views, so more changes are involved.

@SolankiYogesh
Copy link
Author

Ok so i want this feature urgent so i will raise the new arch support patch

@hirbod
Copy link
Owner

hirbod commented Nov 26, 2024

Maybe we can sponsor @WoLewicki and he might be able to help

@SolankiYogesh
Copy link
Author

@hirbod i also migrated react native sound , voice and splash screen so let me first try my self

@WoLewicki
Copy link

Let me know if you need any help 😄

@hrastnik
Copy link

I've just built 2 completely new RN apps. One with React Native 0.75 where the default is the legacy architecture, and one with React Native 0.76 where the default is the new architecture with TurboModules.

I've added react-native-volume-manager to both versions and I've applied my patch to the version with React Native 0.76.

Here's the video of both apps running and behaving the same. Both apps were build in production mode.

I'm not sure if I'm missing something, but my patch seems to work at least for me.

react-native-volume-manager.1.mp4

@SolankiYogesh
Copy link
Author

Did you install pods with cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install ?

@hrastnik
Copy link

Yes, I did! It works without issue.

@SolankiYogesh
Copy link
Author

Let me test again with fresh project

@hirbod
Copy link
Owner

hirbod commented Nov 26, 2024

What about Android?

@hrastnik
Copy link

Android works as well!

@SolankiYogesh
Copy link
Author

SolankiYogesh commented Nov 27, 2024

@hirbod Here is proof its not working with new arch

also i publish this repro example in my git if you have time then check
https://github.com/SolankiYogesh/react-native-volume-manager-issue

Steps

  1. yarn && yarn pod
  2. yarn ios

Package JSON


{
  "name": "volumeManagerExample",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest",
    "pod": "cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install"
  },
  "dependencies": {
    "@react-native-community/slider": "^4.5.5",
    "react": "18.3.1",
    "react-native": "0.76.3",
    "react-native-safe-area-context": "^4.14.0",
    "react-native-volume-manager": "^1.10.0"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@babel/preset-env": "^7.25.3",
    "@babel/runtime": "^7.25.0",
    "@react-native-community/cli": "15.0.1",
    "@react-native-community/cli-platform-android": "15.0.1",
    "@react-native-community/cli-platform-ios": "15.0.1",
    "@react-native/babel-preset": "0.76.3",
    "@react-native/eslint-config": "0.76.3",
    "@react-native/metro-config": "0.76.3",
    "@react-native/typescript-config": "0.76.3",
    "@types/react": "^18.2.6",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "jest": "^29.6.3",
    "prettier": "2.8.8",
    "react-test-renderer": "18.3.1",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}
volumeManager.mp4

@SolankiYogesh SolankiYogesh changed the title new architecture not working in ios new architecture not working Nov 27, 2024
@SolankiYogesh
Copy link
Author

Please let me know if it's working for you. If not, I would be happy to raise a patch.

@SolankiYogesh
Copy link
Author

working fine in android

@hrastnik
Copy link

@SolankiYogesh Did you apply the patch from my PR?

Note that my PR is not merged yet so you'll have to manually open node modules and apply the changes. The change is only 3 lines of code so it's simple to apply

@SolankiYogesh
Copy link
Author

finally its working thanks bruh @hirbod

closing ...

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

4 participants