Skip to content

iOS: Unable to install reanimated #1195

Closed

Description

@rrebase

Description

Adding "react-native-reanimated": "2.10.0" to the example app, installing pods and running the app leads to

TypeError: undefined is not an object (evaluating 'this.InnerNativeModule.installCoreFunctions')

even after adding the reanimated babel plugin and running metro with cache cleared. Looks like the JSI is not linked/installed.

Is this something expected atm? Didn't see it reported among known issues https://github.com/microsoft/react-native-test-app/wiki/Troubleshooting

Activity

  1. changed the title [-]Unable to install reanimated[/-] [+]iOS: Unable to install reanimated[/+] on Nov 7, 2022
  2. tido64 commented on Nov 7, 2022

    @tido64
    Member

    Hi Ragnar Rebase (@rrebase), what version of react-native are you using? Are you building with new arch enabled? Do you have a minimal repro I can have a look at? I don't think I've seen this issue before.

  3. rrebase commented on Nov 7, 2022

    @rrebase
    Author
    options = {
      :hermes_enabled => true,
      :fabric_enabled => false,
      :turbomodule_enabled => false,
    }
    

    RN versions 0.68.2 & 0.70.0. I'll prepare a minimal repro 🙂

  4. rrebase commented on Nov 7, 2022

    @rrebase
    Author
  5. tido64 commented on Nov 7, 2022

    @tido64
    Member

    Ragnar Rebase (@rrebase): I managed to repro it. I also found this issue: software-mansion/react-native-reanimated#3420

    There's a workaround posted here: software-mansion/react-native-reanimated#2791 (comment)

    I tried it and it seems to be working:

    image

    I'm not sure what's going on though. But it doesn't seem like it's an issue with react-native-test-app in particular. It seems like installTurboModule() is making some assumptions that isn't always true.

    Update: I had a closer look at how installTurboModule() works and it's quite… hacky, to say the least. This is not a reliable way to install a custom runtime at all, and it's basically polluting all classes inheriting from UIResponder. Since it is a fairly popular package, I think we will have to support it somehow if upstream can't come up with a better solution. Definitely not like this though.

  6. tido64 commented on Nov 10, 2022

    @tido64
    Member

    I put up a PR with a proposal for a fix. It leverages config plugins to install the Reanimated runtime. I still need to do more testing, but would love to hear your feedback on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions