react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

"No signature of method: java.util.ArrayList.get()" after upgrading react-native-code-push from 7.0.5 to 8.0.1

Open emclab opened this issue 1 year ago • 16 comments

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

1.upgrade react-native-code-push from 7.0.5 to 8.0.1 2. 3.

Expected Behavior

What you expected to happen? npx react-native run-android launches without error after upgrade

Actual Behavior

What actually happens?

  1: Task failed with an exception.
-----------
* Where:
Script '/Users/macair/Documents/code/js/xyz_app6/node_modules/react-native-code-push/android/codepush.gradle' line: 6

* What went wrong:
A problem occurred evaluating script.
> No signature of method: java.util.ArrayList.get() is applicable for argument types: () values: []
  Possible solutions: get(int), get(int), set(int, java.lang.Object), set(int, java.lang.Object), grep(), grep()


Reproducible Demo

  • Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From Examples folder run node create-app.js appName [email protected] [email protected] command to generate plain CodePushified React Native app. Please see description on top of create-app.js file content if needed
  • If you can't reproduce the bug on it, provide us as much info as possible about your project

Environment

  • react-native-code-push version: 8.0.1
  • react-native version: 0.70
  • iOS/Android/Windows version: MacOS Monterey
  • Does this reproduce on a debug build or release build? NO
  • Does this reproduce on a simulator, or only on a physical device? simulator

(The more info the faster we will be able to address it!)

emclab avatar Apr 28 '23 18:04 emclab

Up, I'm facing the same issue even though I already follow the exact setup from this documentation https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-get-started

tommycp96 avatar May 03 '23 08:05 tommycp96

I had the same issue. Your versions of react-native and the library seem to be incompatible. Try react-native-code-push v7.0+ for react native v0.65-v0.70 https://github.com/microsoft/react-native-code-push#supported-react-native-platforms

gremech avatar May 04 '23 10:05 gremech

Might be related to https://github.com/microsoft/react-native-code-push/issues/2521.

@emclab , @tommycp96 , would it be possible for you to upgrade RN to 0.71?

DmitriyKirakosyan avatar May 24 '23 06:05 DmitriyKirakosyan

Hi @DmitriyKirakosyan thanks for coming back, we will try to upgrade and let you know if we still facing this issue.

tommycp96 avatar May 28 '23 02:05 tommycp96

@tommycp96 , have you tried to upgrade yet? Just a gentle ping.

DmitriyKirakosyan avatar Jun 20 '23 08:06 DmitriyKirakosyan

I'm facing the same issue ! Screenshot 1444-12-02 at 1 59 51 PM

Eyad911 avatar Jun 20 '23 11:06 Eyad911

@tommycp96 , have you tried to upgrade yet? Just a gentle ping.

Hi @DmitriyKirakosyan we still in progress and found an issue for our android app, will keep you posted if we find any issue related to CodePush library. Thanks for checking btw, appreciate it.

tommycp96 avatar Jun 20 '23 11:06 tommycp96

I'm facing the same issue ! Screenshot 1444-12-02 at 1 59 51 PM

i just downgrade codePush to 7.0.4 and its work fine

Eyad911 avatar Jun 21 '23 10:06 Eyad911

I am still having a same issue...Any solution?

markosrx avatar Oct 09 '23 14:10 markosrx

Facing the same issue

itsabk avatar Nov 09 '23 13:11 itsabk

same issue, any solution yet?

rodrigodiasf1984 avatar Jan 10 '24 10:01 rodrigodiasf1984

Hi all 👋

I solved this issue by making the following change in the node_modules/react-native-code-push/android/codepush.gradle file:

// Broken 💥 
def debuggableVariants = config.debuggableVariants.get() ?: ['debug']

// Fixed ✅ 
def debuggableVariants = config.debuggableVariants ?: ['debug']

For managing alterations to npm dependencies that I make locally, I rely on patch-package. Hope this helps! 🚀

bonesyblue avatar Jan 12 '24 13:01 bonesyblue

@itsabk @rodrigodiasf1984 @bonesyblue Could you please check if this fix works for you? Also, could you please confirm what this issue still persist on latest version (8.2.1)?

MikhailSuendukov avatar Jan 29 '24 14:01 MikhailSuendukov

FYI the info still persists on v8.2.1 @MikhailSuendukov ; as a matter of fact I just created an issue on it (which I will close now that I found this one)

although I'm on RN0.69.12 I thought of upgrading code push to latest since it is currently unusable by creating some invalid hook call out of nowhere when getting an update from it (also created an issue on that that got no reply in spite of making it unusable :/)

pierroo avatar Feb 07 '24 10:02 pierroo

If you're using expo make sure

apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

is in the gradle file at /android/app/build.gradle (not the /android/build.gradle file)

benycodes avatar Feb 11 '24 07:02 benycodes

Hi guys, Facing the same issue on 8.2.1, RN 0.73.2, could anyone fix this temporarily using a patch ?

pnogier avatar Feb 13 '24 21:02 pnogier

hello I'm trying to use Code Push v8.2.2 with React Native v0.74.1, which was recently updated, but the same issue is occurring. This issue is already closed, but I don't see a clear solution, so I'm writing a comment like this.🥲

DrunkenNeoguri avatar May 27 '24 06:05 DrunkenNeoguri