onesignal-expo-plugin
onesignal-expo-plugin copied to clipboard
[Bug]: EAS Build fails for iOS and Android on expo 49
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: https://github.com/OneSignal/onesignal-expo-plugin/issues/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
- [X] I agree to follow this project's Code of Conduct
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.
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?
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.
@cspeer No, didn't fix the issue for me..
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.
@DengpaoHuai Hello, can you share versions of expo, expo-notifications and possibly @notifee/react-native or other related to notifications packages please?
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
@Gandalf-pro unfortunately didn't work in my case..
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.
@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?
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
@ddwebdevv were you able to fix the issue? I got the exact same error, and I have notifee installed as well.
Having the same problem right now trying to build with eas on iOS, after transferring apple app to another account.
Same issue here
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
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
This is now resolved in the latest version. Cheers
@rgomezp Still not working with expo 51.