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

[Bug]: EAS Build fails for iOS and Android on expo 49 #212

Closed
1 task done
ddwebdevv opened this issue Nov 22, 2023 · 18 comments
Closed
1 task done

[Bug]: EAS Build fails for iOS and Android on expo 49 #212

ddwebdevv opened this issue Nov 22, 2023 · 18 comments

Comments

@ddwebdevv
Copy link

ddwebdevv commented Nov 22, 2023

What happened?

EAS Build failing for both platforms after adding Onesignal in my project.

Steps to reproduce?

"expo": "^49.0.0",
    "onesignal-expo-plugin": "^2.0.2",
    "react-native-onesignal": "^5.0.3",
    "expo-notifications": "~0.20.1",
    "@notifee/react-native": "^7.8.0",

Using Expo-notifications for push notifications in the app.
Using @notifee/react-native as a dependency for third party package( getstream.io) not directly.
Never had a problem before installing OneSignal packages.

What did you expect to happen?

Expected to build will be successful.

Seems like similar issues were found before but no clear solution

like for example:
#71

OneSignal Expo SDK version

expo 49.0.0

Platform

No response

Relevant log output

For iOS:

2023-11-21 14:48:21.865 xcodebuild[1969:9180] warning: The file reference for "OneSignalNotificationServiceExtension" is a member of multiple groups ("Pods" and ""); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path.
** ARCHIVE FAILED **
Exit status: 65

For android:


[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':app:checkDebugDuplicateClasses'.
[RUN_GRADLEW] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
[RUN_GRADLEW] > Duplicate class androidx.work.OneTimeWorkRequestKt found in modules work-runtime-2.8.0-runtime (androidx.work:work-runtime:2.8.0) and work-runtime-ktx-2.7.1-runtime (androidx.work:work-runtime-ktx:2.7.1)
[RUN_GRADLEW] Duplicate class androidx.work.PeriodicWorkRequestKt found in modules work-runtime-2.8.0-runtime (androidx.work:work-runtime:2.8.0) and work-runtime-ktx-2.7.1-runtime (androidx.work:work-runtime-ktx:2.7.1)
[RUN_GRADLEW]

Code of Conduct

  • I agree to follow this project's Code of Conduct
@cspeer
Copy link

cspeer commented Nov 23, 2023

I just ran into the same error. Couldn't find anything.
Instead I updated eas to the latest version, et voilà, it works again. Not sure what your setup here is. But if you're using eas for the build, might wanna give it a shot.

@ddwebdevv
Copy link
Author

I just ran into the same error. Couldn't find anything.
Instead I updated eas to the latest version, et voilà, it works again. Not sure what your setup here is. But if you're using eas for the build, might wanna give it a shot.

@cspeer do you mean update eas-cli? what version you are using?
I send build to eas to build in the cloud. it has Expo CLI 6.3.10

And is your method solved iOS error or android?

@cspeer
Copy link

cspeer commented Nov 23, 2023

Sorry, yes I meant eas-cli, the latest version is 5.9.1, which I updated to:

 $ eas --version
eas-cli/5.9.1 darwin-x64 node-v16.15.0

It fixed both, iOS & Android.

@ddwebdevv
Copy link
Author

@cspeer No, didn't fix the issue for me..

@DengpaoHuai
Copy link

I just had the same issue :

2023-11-24 02:12:20.129 xcodebuild[1305:6344] warning: The file reference for "OneSignalNotificationServiceExtension" is a member of multiple groups ("Pods" and ""); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path.

I tried :

  • Updating eas to latest version
  • Use local credentials with credentials.json
  • update to he latest version of both packages ("onesignal-expo-plugin" & "react-native-onesignal") (same version than the author)

Working on Android but not iOS.

@ddwebdevv
Copy link
Author

@DengpaoHuai Hello, can you share versions of expo, expo-notifications and possibly @notifee/react-native or other related to notifications packages please?

@Gandalf-pro
Copy link

Hi, we just got the same problem. It turns out we needed to put "onesignal-expo-plugin" plugin as the first element of the plugins array.

https://github.com/OneSignal/onesignal-expo-plugin/tree/main?tab=readme-ov-file#plugin

@ddwebdevv
Copy link
Author

@Gandalf-pro unfortunately didn't work in my case..

@DengpaoHuai
Copy link

Hi, I got :
"react-native-onesignal": "^5.0.3",
"onesignal-expo-plugin": "^2.0.2",
"expo": "^49.0.0",

eas-cli : eas-cli/5.9.1 win32-x64 node-v16.16.0

The custom build work.
Not prod.

I also tried to put "onesignal-expo-plugin" plugin as the first element.

@emawby
Copy link
Contributor

emawby commented Dec 6, 2023

@DengpaoHuai I am not able to reproduce the build failure on iOS did you let eas create distribution certificates and provisioning profiles for both the main app and extension targets?

@dtyrrell
Copy link

Hi, I got : "react-native-onesignal": "^5.0.3", "onesignal-expo-plugin": "^2.0.2", "expo": "^49.0.0",

eas-cli : eas-cli/5.9.1 win32-x64 node-v16.16.0

The custom build work. Not prod.

I also tried to put "onesignal-expo-plugin" plugin as the first element.

the same is happening for me, but with node 20.0.0 and expo 50.

@emawby I created the identifier & provisioning profile for the onesignal service

@nyplex
Copy link

nyplex commented Jan 27, 2024

@ddwebdevv were you able to fix the issue? I got the exact same error, and I have notifee installed as well.

@nmateo
Copy link

nmateo commented Mar 4, 2024

Having the same problem right now trying to build with eas on iOS, after transferring apple app to another account.

@aledebla03
Copy link

Same issue here

@Brunowilliang
Copy link

same issue for me:

[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':app:checkDebugDuplicateClasses'.
[RUN_GRADLEW] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[RUN_GRADLEW]    > Failed to transform jackson-core-2.16.1.jar (com.fasterxml.jackson.core:jackson-core:2.16.1) to match at.
[RUN_GRADLEW]       > Execution failed for JetifyTransform: /Users/brunogarcia/.gradle/caches/modules-2/files-2.1/com.faste.
[RUN_GRADLEW]          > Failed to transform '/Users/brunogarcia/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.c)
[RUN_GRADLEW]            Suggestions:
[RUN_GRADLEW]             - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modi.
[RUN_GRADLEW]             - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/ne.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 38s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Build failed
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
npx exited with non-zero code: 1

@tslater
Copy link

tslater commented May 25, 2024

We're seeing the same thing. We're on Expo SDK 51:

2024-05-25 13:18:02.164 xcodebuild[4716:14855] warning:  The file reference for "OneSignalNotificationServiceExtension" is a member of multiple groups ("Pods" and ""); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
** ARCHIVE FAILED **

Exit status: 65

@rgomezp
Copy link
Contributor

rgomezp commented Jun 20, 2024

This is now resolved in the latest version. Cheers

@rgomezp rgomezp closed this as completed Jun 20, 2024
@oliviercperrier
Copy link

@rgomezp Still not working with expo 51.

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