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

error: cannot find symbol return new ReanimatedJSIModulePackage() #3615

Closed
only1chi opened this issue Sep 27, 2022 · 6 comments
Closed

error: cannot find symbol return new ReanimatedJSIModulePackage() #3615

only1chi opened this issue Sep 27, 2022 · 6 comments
Labels
Build or config issue This issue is likely related to the reporter's specific project config Platform: Android This issue is specific to Android

Comments

@only1chi
Copy link

only1chi commented Sep 27, 2022

Description

I'm in the process of updating my react-native project from 0.68.2 to 0.70.1 with the new architecture enabled.
I followed the recommended steps on the update script detailed here.

I am using [email protected], and it does not successfully build.

I can successfully build my project with[email protected] which does not have support for RN 0.70.1.

Steps to reproduce

  1. Follow the steps to upgrade react native project to RN 0.70.1
  2. Use [email protected]
  3. Clean and reset build cache. Then build for android.

Snack or a link to a repository

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
546 actionable tasks: 25 executed, 521 up-to-date
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


/Users/chizurokechikwendu/Desktop/Git_Repo/cma/android/app/src/main/java/com/ststorquefit/MainApplication.java:13: error: cannot find symbol
import com.swmansion.reanimated.ReanimatedJSIModulePackage; // <- add
                               ^
  symbol:   class ReanimatedJSIModulePackage
  location: package com.swmansion.reanimated
/Users/chizurokechikwendu/Desktop/Git_Repo/cma/android/app/src/main/java/com/ststorquefit/MainApplication.java:46: error: cannot find symbol
          return new ReanimatedJSIModulePackage(); // <- add
                     ^
  symbol: class ReanimatedJSIModulePackage
2 errors

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 35s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


/Users/chizurokechikwendu/Desktop/Git_Repo/cma/android/app/src/main/java/com/ststorquefit/MainApplication.java:13: error: cannot find symbol
import com.swmansion.reanimated.ReanimatedJSIModulePackage; // <- add
                               ^
  symbol:   class ReanimatedJSIModulePackage
  location: package com.swmansion.reanimated
/Users/chizurokechikwendu/Desktop/Git_Repo/cma/android/app/src/main/java/com/ststorquefit/MainApplication.java:46: error: cannot find symbol
          return new ReanimatedJSIModulePackage(); // <- add
                     ^
  symbol: class ReanimatedJSIModulePackage
2 errors

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 35s

    at makeError (/Users/chizurokechikwendu/Desktop/Git_Repo/cma/node_modules/execa/index.js:174:9)
    at /Users/chizurokechikwendu/Desktop/Git_Repo/cma/node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (/Users/chizurokechikwendu/Desktop/Git_Repo/cma/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
    at async Command.handleAction (/Users/chizurokechikwendu/Desktop/Git_Repo/cma/node_modules/@react-native-community/cli/build/index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reanimated version

3.0.0-rc.3

React Native version

0.70.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

No response

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Android emulator

Device model

None

Acknowledgements

Yes

@only1chi only1chi added the Needs review Issue is ready to be reviewed by a maintainer label Sep 27, 2022
@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Sep 27, 2022
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Platform: Android This issue is specific to Android label Sep 27, 2022
@tomekzaw
Copy link
Member

tomekzaw commented Sep 28, 2022

Hey, ReanimatedJSIModulePackage is no longer necessary so we deprecated it in 2.5.0 as well as removed it from 3.0.0-rc.3.

For details, see PR #3481.

You need to edit your MainApplication.java and:

  1. Remove import com.swmansion.reanimated.ReanimatedJSIModulePackage;
  2. Remove getJSIModulePackage() method

@tomekzaw tomekzaw added Close when stale This issue is going to be closed when there is no activity for a while Build or config issue This issue is likely related to the reporter's specific project config and removed Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer labels Sep 28, 2022
@only1chi
Copy link
Author

only1chi commented Sep 28, 2022

Hey, ReanimatedJSIModulePackage is no longer necessary so we deprecated it in 2.5.0 as well as removed it from 3.0.0-rc.3.

For details, see PR #3481.

You need to edit your MainApplication.java and:

  1. Remove import com.swmansion.reanimated.ReanimatedJSIModulePackage;
  2. Remove getJSIModulePackage() method

Thanks @tomekzaw. I looked at the reanimated fabric example and noticed that they don't use the JSI module. I noticed that I could successfully build my app without the including the JSI module. However, the react-native upgrade helper tool did not recommend that it be removed, so I stuck with it.

Thanks for validating this.

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Sep 28, 2022
@KrisLau
Copy link

KrisLau commented Apr 28, 2023

@tomekzaw Might be helpful to add this to the migration guide for v2 to v3 because when I was upgrading I looked there and there were no changes

@rampazzo1989
Copy link

I did this and now I'm getting the error:

ReferenceError: Can't find variable: queueMicrotask
Android Running app on Android SDK built for x86
Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
    › Stopped server

I'm using expo.

@Mohamed-Raid
Copy link

Hey, ReanimatedJSIModulePackage is no longer necessary so we deprecated it in 2.5.0 as well as removed it from 3.0.0-rc.3.

For details, see PR #3481.

You need to edit your MainApplication.java and:

  1. Remove import com.swmansion.reanimated.ReanimatedJSIModulePackage;
  2. Remove getJSIModulePackage() method

saved the day thx !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build or config issue This issue is likely related to the reporter's specific project config Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

5 participants