Closed DominickVale closed 1 year ago
Hello and thanks for reporting, can you share the full stack trace? Thank you 🙂
Also getting this error intermittently on 8.x of google sign in and expo 45.x
Hey I see the related tickets were closed on the Expo repo. Wanted to call out what I'm seeing here since I suspect it might be related to an incompatibility introduced by Expo Bare (and Expo Modules?) rather than this plugin. It seems that autolinking is somehow linking this library twice. Here is the Gradle task list in our project with this lib: Notice it's listed twice. I looked for any indication of improper naming but don't see it. This package is tiny and it's very easy to inspect the folder structure and naming:
In all of the other projects we have where Gradle converts the /
in @mycompany/myproject
to _
there seems to be no issue. However for some reason for this project alone Gradle creates a separate duplicate task with a -
as well. But there's nothing special about this project I can ascertain other than an Expo Modules integration. That is why I assume this has to be Expo related. The build.gradle is incredibly vanilla and very easy to diff against common RN build.gradle files. It does not stand out in configuration at all. For example here it is diffed against a stable native plugin I wrote a couple of years ago:
I did notice that the AGP version specified is quite outdated but it's not actually resolving so it can be safely deleted I think (happy to PR this one liner).
The only thing special about this plugin is that it has an Expo Adapter and some sort of recent Expo Modules integration. Off the top of my head these are the only things that stand out to me.
Related: https://github.com/expo/expo/issues/20140, https://github.com/react-native-google-signin/google-signin/issues/1112, #1092 #1124
We use expo bare, currently on sdk 45 and v8 of this project.
@brentvatne @vonovak
I confirmed that the problem is namespacing with my fork, also replicated here: https://github.com/react-native-google-signin/google-signin/pull/1125
After removing the organization off of the project (@react-native-google-signin), the duplicate gradle task is gone and Android builds are reproducible. From what I can ascertain it seems the Expo Modules integration is conflicting with having an "@organization" namespace on an npm package and autolinking it to Android.
Nice detective work! I'm also using Expo bare and have noticed this error often; was wondering what was the underlying issue but couldn't pinpoint it myself.
i'm sorry to introduce the issue from our integration. #1126 should address the issue.
:tada: This issue has been resolved in version 9.0.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for the fix @Kudo and the release @vonovak. Can we backport a patch for the previous major version? I can make the branch if needed.
@shamilovtim the target branch does not exist so I believe I'll have to do it. I'll do it on Monday 👍
@shamilovtim released https://github.com/react-native-google-signin/google-signin/releases/tag/v8.2.2 👍
I just finished upgrading my app to react native 0.70.6. I have a couple of expo packages (I'm using bare react native) so I also had to upgrade expo to 47. I have no idea why expo is even part of the issue but the error mentions it.
Steps to Reproduce
Expected Behavior
Should build
Actual Behavior
Build crashes with
The only way to make it work is to run ./gradlew clean, start metro with --reset-cache and then rebuild everything. Which is bad because expo then downloads the boost library from scratch, making me waste a lot of time since my network connection isn't that fast and I need to rebuild the app many times ...
Environment
new architecture DISABLED, hermes enabled I only tried android 12 and 13 for now "expo": "^47.0.0", "@react-native-google-signin/google-signin": "^9.0.0", "react-native": "^0.70.6",