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

EAS Build - Execution failed for task ':app:checkDebugAarMetadata'. #59

Closed
hridoy43 opened this issue Feb 10, 2022 · 10 comments
Closed

Comments

@hridoy43
Copy link

hridoy43 commented Feb 10, 2022

Description:

After adding onesignal-expo-plugin in app.config.json when I run eas build command. The build failed with the following error:

It is related to this issue, OneSignal/react-native-onesignal#1318
I have tried to create a custom plugin with the solution found there. But It doesn't work

Expo-SDK: 44.0.6
onesignal-expo-plugin: 1.0.0-beta10
react-native-onesignal: 4.3.6

Build Error:

// Build failed with an exception.

[stderr] *    What went wrong:
[stderr]      Execution failed for task ':app:checkDebugAarMetadata'.
[stderr] >   A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] >  The minCompileSdk (31) specified in a
[stderr]      dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr]      is greater than this module's compileSdkVersion (android-30).
[stderr]      Dependency: androidx.work:work-runtime:2.7.1.
[stderr]      AAR metadata file: /home/expo/.gradle/caches/transforms-3/c9b633a7cdef94f5ad87c49ed563a3db/transformed/work-runtime-2.7.1/META-INF/com/android/build/gradle/aar-metadata.properties.

Custom Plugin Code:

// plugins/one-signal-csdk-downgrade-plugin.js

const expoConfigPlugins = require('@expo/config-plugins');

const newResolutionStrategyGradle = `
configurations.all {
    resolutionStrategy {
        force 'androidx.work:work-runtime:2.6.0'
    }
}`;


/**
 * Update **app/build.gradle** by adding work-runtime
 */
module.exports = function withWorkingWorkRuntimeVersion (config, _props) {
    return expoConfigPlugins.withAppBuildGradle(config, (newConfig) => {
      newConfig.modResults.contents = `${newResolutionStrategyGradle.trimStart()}\n\n${
        newConfig.modResults.contents
      }`;
  
      return newConfig;
    });
};

app.config.json:

"plugins": [
    "plugins/one-signal-csdk-downgrade-plugin",
    [
      "onesignal-expo-plugin",
      {
        "mode": "development"
      }
    ],
  ]
@jkasten2
Copy link
Member

@hridoy43 Thanks for reporting, can you make sure you are using [email protected] or newer?
If so can you check your build.gradle fields to ensure onesignal-gradle-plugin was added to it? If not you may need to run expo prebuild --clean to regenerate your Android folder.

This special case should be handled by onesignal-gradle-plugin version 0.14.0. We define a version range which should pick up this version but you can try bumping it in your build.gradle to be sure it is getting that version:

dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'`;

@hridoy43
Copy link
Author

hridoy43 commented Feb 10, 2022

@jkasten2 Yeah, I'm using [email protected] on my project. And there is no onesignal-gradle-plugin added in build.gradle even after running expo prebuild --clean

build.gradle after running expo rebuild --clean :

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
    }
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:4.3.3'
        classpath("com.android.tools.build:gradle:4.1.0")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../android"))
        }
        maven {
            // Android JSC is installed from npm
            url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
        }

        google()
        mavenCentral()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}

@jkasten2
Copy link
Member

@hridoy43 Thanks for checking, sorry I forgot to mention that there are more than one build.gradle file for Android projects. Can you check the app/build.gradle file?
The top few lines should look like this:

buildscript {
    repositories {
        gradlePluginPortal()
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
    }
}

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).

@hridoy43
Copy link
Author

hridoy43 commented Feb 11, 2022

@jkasten2 there is no oneSignal dipendencies or plugins added in app/build.gradle too

here are the dependencies which exist there.

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules

    def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
    def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
    def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";

    // If your app supports Android versions before Ice Cream Sandwich (API level 14)
    // All fresco packages should use the same version
    if (isGifEnabled || isWebpEnabled) {
        implementation 'com.facebook.fresco:fresco:2.0.0'
        implementation 'com.facebook.fresco:imagepipeline-okhttp3:2.0.0'
    }

    if (isGifEnabled) {
        // For animated gif support
        implementation 'com.facebook.fresco:animated-gif:2.0.0'
    }

    if (isWebpEnabled) {
        // For webp support
        implementation 'com.facebook.fresco:webpsupport:2.0.0'
        if (isWebpAnimatedEnabled) {
            // Animated webp support
            implementation 'com.facebook.fresco:animated-webp:2.0.0'
        }
    }
    
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
      exclude group:'com.facebook.fbjni'
    }
    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }
    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
    }

    if (enableHermes) {
        debugImplementation files(new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim(), "../android/hermes-debug.aar"))
        releaseImplementation files(new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim(), "../android/hermes-release.aar"))
    } else {
        implementation jscFlavor
    }
}

@jkasten2
Copy link
Member

@hridoy43 I have a few more idea of some directions we can go to find out why this isn't being added to your app/build.gradle.

Debugging

Can you run EXPO_DEBUG=1 expo prebuild --clean to provide some extra logging? You will see a few lines containing withOneSignal, the one we are looking for is withOneSignalAndroid and the full line should look like this:

android.appBuildGradle: withConfigPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withOneSignal ➜ withOneSignalAndroid ➜ withGradleBuildConfig ➜ withAppBuildGradle

Check for any errors if you don't see this entry in the log, or share the whole log here.

Environment & Project

Could share your results of running expo diagnostics?

Also if possible please share a project reproducing this issue.

Other plugins

In the app.config.json you shared I see "plugins/one-signal-csdk-downgrade-plugin",. I haven't seen this before can you share the source for this?

@hridoy43
Copy link
Author

hridoy43 commented Feb 13, 2022

@jkasten2 There's no withOneSignal entry on the log. here's the full EXPO-DEBUG log for prebuild.

- Config syncing
android.dangerous: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidDangerousBaseMod
- Config syncing
android.dangerous: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPackageRefactor ➜ withDangerousMod
- Config syncing
android.dangerous: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidIcons ➜ withDangerousMod
- Config syncing
android.dangerous: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withGoogleServicesFile ➜ withDangerousMod
- Config syncing
android.dangerous: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withErrorHandling ➜ withDangerousMod
- Config syncing
android.dangerous: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withDevLauncherApplication ➜ withDangerousMod
- Config syncing
android.dangerous: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashDrawables ➜ withDangerousMod
- Config syncing
android.dangerous: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashImages ➜ withDangerousMod
- Config syncing
android.dangerous: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsAndroid ➜ withNotificationSounds ➜ withDangerousMod
- Config syncing
android.dangerous: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsAndroid ➜ withNotificationIcons ➜ withDangerousMod
- Config syncing
android.manifest: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidManifestBaseMod
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPermissions ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withOrientation ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withScheme ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidIntentFilters ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withWindowSoftInputMode ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAllowBackup ➜ withAndroidManifest
- Config syncing
android.manifest: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPackageManifest ➜ withAndroidManifest
- Config syncing
android.manifest: withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withMediaLibrary ➜ withPlugins ➜ withStaticPlugin ➜ withMediaLibraryExternalStorage ➜ withAndroidManifest
- Config syncing
android.manifest: withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withMediaLibrary ➜ withPlugins ➜ withStaticPlugin ➜ withPermissions ➜ withAndroidManifest
- Config syncing
android.manifest: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withFileSystem ➜ withPermissions ➜ withAndroidManifest
- Config syncing
android.manifest: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevClient ➜ withGeneratedAndroidScheme ➜ withAndroidManifest
- Config syncing
android.manifest: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withAV ➜ withPermissions ➜ withAndroidManifest
- Config syncing
android.manifest: withStaticPlugin ➜ withExpoFacebook ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withFacebookManifest ➜ withAndroidManifest
- Config syncing
android.manifest: withStaticPlugin ➜ withExpoBranch ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidBranch ➜ withAndroidManifest
- Config syncing
android.manifest: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoUpdates ➜ withStaticPlugin ➜ withRunOnce ➜ withUpdates ➜ withUpdates ➜ withAndroidManifest
- Config syncing
android.manifest: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsAndroid ➜ withNotificationManifest ➜ withAndroidManifest
- Config syncing
android.manifest: withStaticPlugin ➜ withExpoAdsAdmob ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidAdMob ➜ withAndroidManifest
- Config syncing
android.manifest: withStaticPlugin ➜ withReactNativeMaps ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withGoogleMapsApiKey ➜ withAndroidManifest
- Config syncing
android.colors: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidColorsBaseMod
- Config syncing
android.colors: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidIcons ➜ withAndroidAdaptiveIconColors ➜ withAndroidColors
- Config syncing
android.colors: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPrimaryColor ➜ withPrimaryColorColors ➜ withAndroidColors
- Config syncing
android.colors: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withStatusBar ➜ withStatusBarColors ➜ withAndroidColors
- Config syncing
android.colors: withStaticPlugin ➜ withExpoNavigationBar ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withNavigationBar ➜ withNavigationBarColors ➜ withAndroidColors
- Config syncing
android.colors: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashStyles ➜ withAndroidColors
- Config syncing
android.colors: withStaticPlugin ➜ withExpoSystemUi ➜ withStaticPlugin ➜ withRunOnce ➜ withSystemUI ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidRootViewBackgroundColor ➜ withRootViewBackgroundColorColors ➜ withAndroidColors
- Config syncing
android.colors: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsAndroid ➜ withNotificationIconColor ➜ withAndroidColors
- Config syncing
android.strings: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidStringsBaseMod
- Config syncing
android.strings: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withName ➜ withStringsXml
- Config syncing
android.strings: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashStrings ➜ withStringsXml
- Config syncing
android.strings: withStaticPlugin ➜ withExpoSystemUi ➜ withStaticPlugin ➜ withRunOnce ➜ withSystemUI ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidUserInterfaceStyle ➜ withStringsXml
- Config syncing
android.strings: withStaticPlugin ➜ withExpoFacebook ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withFacebookAppIdString ➜ withStringsXml
- Config syncing
android.styles: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidStylesBaseMod
- Config syncing
android.styles: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPrimaryColor ➜ withPrimaryColorStyles ➜ withAndroidStyles
- Config syncing
android.styles: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withStatusBar ➜ withStatusBarStyles ➜ withAndroidStyles
- Config syncing
android.styles: withStaticPlugin ➜ withExpoNavigationBar ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withNavigationBar ➜ withNavigationBarStyles ➜ withAndroidStyles
- Config syncing
android.styles: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashStyles ➜ withAndroidStyles
- Config syncing
android.styles: withStaticPlugin ➜ withExpoSystemUi ➜ withStaticPlugin ➜ withRunOnce ➜ withSystemUI ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidRootViewBackgroundColor ➜ withRootViewBackgroundColorStyles ➜ withAndroidStyles
- Config syncing
android.colorsNight: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidColorsNightBaseMod
- Config syncing
android.colorsNight: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withAndroidSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withAndroidSplashStyles ➜ withAndroidColorsNight
- Config syncing
android.mainActivity: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidMainActivityBaseMod
- Config syncing
android.mainActivity: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withDevLauncherActivity ➜ withMainActivity
- Config syncing
android.mainActivity: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevMenu ➜ withDevMenuActivity ➜ withMainActivity
- Config syncing
android.gradleProperties: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidGradlePropertiesBaseMod
- Config syncing
android.gradleProperties: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withJsEngineGradleProps ➜ withGradleProperties
- Config syncing
android.settingsGradle: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidSettingsGradleBaseMod
- Config syncing
android.settingsGradle: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withNameSettingsGradle ➜ withSettingsGradle
- Config syncing
android.projectBuildGradle: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidProjectBuildGradleBaseMod
- Config syncing
android.projectBuildGradle: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withClassPath ➜ withProjectBuildGradle
- Config syncing
android.appBuildGradle: withDefaultBaseMods ➜ withAndroidBaseMods ➜ withGeneratedBaseMods ➜ withAndroidAppBuildGradleBaseMod
- Config syncing
android.appBuildGradle: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withVersion ➜ withAppBuildGradle
- Config syncing
android.appBuildGradle: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withPackageGradle ➜ withAppBuildGradle
- Config syncing
android.appBuildGradle: withAndroidExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withApplyPlugin ➜ withAppBuildGradle
- Config syncing
ios.dangerous: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosDangerousBaseMod
- Config syncing
ios.dangerous: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withIosIcons ➜ withDangerousMod
- Config syncing
ios.dangerous: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withBundleIdentifier ➜ withDangerousMod
- Config syncing
ios.dangerous: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withErrorHandling ➜ withDangerousMod
- Config syncing
ios.dangerous: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withDevLauncherPodfile ➜ withDangerousMod
- Config syncing
ios.dangerous: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevMenu ➜ withDevMenuPodfile ➜ withDangerousMod
- Config syncing
ios.dangerous: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withIosSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withIosSplashAssets ➜ withDangerousMod
- Config syncing
ios.dangerous: withStaticPlugin ➜ withReactNativeMaps ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withMaps ➜ withMapsCocoaPods ➜ withDangerousMod
- Config syncing
ios.xcodeproj: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosXcodeprojBaseMod
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withLocales ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withBitcode ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withDeviceFamily ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withGoogleServicesFile ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withProductName ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withNoopSwiftFile ➜ withBuildSourceFile ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withSwiftBridgingHeader ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withIosSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withIosSplashXcodeProject ➜ withXcodeProject
- Config syncing
ios.xcodeproj: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsIOS ➜ withNotificationSounds ➜ withXcodeProject
- Config syncing
ios.infoPlist: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosInfoPlistBaseMod
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withVersion ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withBuildNumber ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withUsesNonExemptEncryption ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withScheme ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withRequiresFullScreen ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withOrientation ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withDisplayName ➜ withInfoPlist
- Config syncing
ios.infoPlist: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withGoogle ➜ withInfoPlist
- Config syncing
ios.infoPlist: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withScreenOrientationViewController ➜ withInfoPlist
- Config syncing
ios.infoPlist: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevClient ➜ withGeneratedIosScheme ➜ withInfoPlist
- Config syncing
ios.infoPlist: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withAV ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoSplashScreen ➜ withStaticPlugin ➜ withRunOnce ➜ withSplashScreen ➜ withIosSplashScreen ➜ withPlugins ➜ withStaticPlugin ➜ withIosSplashInfoPlist ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoSystemUi ➜ withStaticPlugin ➜ withRunOnce ➜ withSystemUI ➜ withPlugins ➜ withStaticPlugin ➜ withIosUserInterfaceStyle ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoSystemUi ➜ withStaticPlugin ➜ withRunOnce ➜ withSystemUI ➜ withPlugins ➜ withStaticPlugin ➜ withIosRootViewBackgroundColor ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoFacebook ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosFacebook ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoBranch ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosBranch ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withExpoAdsAdmob ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withIosAdMob ➜ withInfoPlist
- Config syncing
ios.infoPlist: withStaticPlugin ➜ withReactNativeMaps ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withMaps ➜ withGoogleMapsKey ➜ withInfoPlist
- Config syncing
ios.appDelegate: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosAppDelegateBaseMod
- Config syncing
ios.appDelegate: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevLauncher ➜ withDevLauncherAppDelegate ➜ withAppDelegate
- Config syncing
ios.appDelegate: withLegacyExpoPlugins ➜ withOptionalLegacyPlugins ➜ withStaticPlugin ➜ withRunOnce ➜ withDevMenu ➜ withDevMenuAppDelegate ➜ withAppDelegate
- Config syncing
ios.appDelegate: withStaticPlugin ➜ withReactNativeMaps ➜ withRunOnce ➜ withFallback ➜ withPlugins ➜ withStaticPlugin ➜ withMaps ➜ withGoogleMapsAppDelegate ➜ withAppDelegate
- Config syncing
ios.entitlements: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosEntitlementsBaseMod
- Config syncing
ios.entitlements: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withAssociatedDomains ➜ withEntitlementsPlist
- Config syncing
ios.entitlements: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoNotifications ➜ withStaticPlugin ➜ withRunOnce ➜ withNotifications ➜ withNotificationsIOS ➜ withEntitlementsPlist
- Config syncing
ios.entitlements: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoContacts ➜ withRunOnce ➜ withAccessesContactNotes ➜ withEntitlementsPlist
- Config syncing
ios.entitlements: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoAppleAuthentication ➜ withRunOnce ➜ withAppleSignInWarning ➜ withEntitlementsPlist
- Config syncing
ios.expoPlist: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosExpoPlistBaseMod
- Config syncing
ios.expoPlist: withVersionedExpoSDKPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withExpoUpdates ➜ withStaticPlugin ➜ withRunOnce ➜ withUpdates ➜ withUpdates ➜ withExpoPlist
- Config syncing
ios.podfileProperties: withDefaultBaseMods ➜ withIosBaseMods ➜ withGeneratedBaseMods ➜ withIosPodfilePropertiesBaseMod
- Config syncing
ios.podfileProperties: withIosExpoPlugins ➜ withPlugins ➜ withStaticPlugin ➜ withJsEnginePodfileProps ➜ withPodfileProperties
- Config syncing

Evaluated config:
{
  name: 'DigitalCoach',
  slug: 'Digital-Coach',
  owner: 'thrive-edtech',
  version: '1.14.0',
  orientation: 'portrait',
  icon: './assets/images/icon.png',
  scheme: 'dcapp',
  userInterfaceStyle: 'automatic',
  assetBundlePatterns: [
    '**/*'
  ],
  description: undefined,
  sdkVersion: '44.0.0',
  platforms: [
    'ios',
    'android',
    'web'
  ],
  splash: {
    image: './assets/images/splash.png',
    resizeMode: 'contain',
    backgroundColor: '#ffffff'
  },
  updates: {
    fallbackToCacheTimeout: 0
  },
  ios: {
    supportsTablet: true,
    bundleIdentifier: 'com.thriveedtech.digitalcoach',
    buildNumber: '440011400',
    infoPlist: {
      CFBundleDevelopmentRegion: '$(DEVELOPMENT_LANGUAGE)',
      CFBundleExecutable: '$(EXECUTABLE_NAME)',
      CFBundleIdentifier: '$(PRODUCT_BUNDLE_IDENTIFIER)',
      CFBundleInfoDictionaryVersion: '6.0',
      CFBundleName: '$(PRODUCT_NAME)',
      CFBundlePackageType: '$(PRODUCT_BUNDLE_PACKAGE_TYPE)',
      CFBundleSignature: '????',
      CFBundleShortVersionString: '1.14.0',
      CFBundleVersion: '440011400',
      LSRequiresIPhoneOS: true,
      UILaunchStoryboardName: 'SplashScreen',
      UIRequiredDeviceCapabilities: [
        'armv7'
      ],
      UISupportedInterfaceOrientations: [
        'UIInterfaceOrientationPortrait',
        'UIInterfaceOrientationPortraitUpsideDown'
      ],
      UIViewControllerBasedStatusBarAppearance: false,
      UIStatusBarStyle: 'UIStatusBarStyleDefault',
      NSPhotoLibraryUsageDescription: 'Allow $(PRODUCT_NAME) to access your photos',
      NSPhotoLibraryAddUsageDescription: 'Allow $(PRODUCT_NAME) to save photos',
      CFBundleURLTypes: [
        {
          CFBundleURLSchemes: [
            'dcapp',
            'com.thriveedtech.digitalcoach'
          ]
        },
        {
          CFBundleURLSchemes: [
            'exp+digital-coach'
          ]
        }
      ],
      'UISupportedInterfaceOrientations~ipad': [
        'UIInterfaceOrientationPortrait',
        'UIInterfaceOrientationPortraitUpsideDown',
        'UIInterfaceOrientationLandscapeLeft',
        'UIInterfaceOrientationLandscapeRight'
      ],
      UIRequiresFullScreen: false,
      CFBundleDisplayName: 'DigitalCoach',
      NSMicrophoneUsageDescription: 'Allow $(PRODUCT_NAME) to access your microphone',
      UIUserInterfaceStyle: 'Automatic',
      NSAppTransportSecurity: {
        NSAllowsArbitraryLoads: true,
        NSExceptionDomains: {
          localhost: {
            NSExceptionAllowsInsecureHTTPLoads: true
          }
        }
      }
    },
    entitlements: {
      'aps-environment': 'development'
    }
  },
  android: {
    googleServicesFile: './google-services.json',
    useNextNotificationsApi: true,
    package: 'com.thriveedtech.digitalcoach',
    versionCode: 440011400,
    permissions: [
      'android.permission.RECORD_AUDIO',
      'android.permission.MODIFY_AUDIO_SETTINGS',
      'android.permission.READ_EXTERNAL_STORAGE',
      'android.permission.WRITE_EXTERNAL_STORAGE',
      'android.permission.INTERNET',
      'android.permission.ACCESS_MEDIA_LOCATION'
    ],
    adaptiveIcon: {
      foregroundImage: './assets/images/adaptive-icon.png',
      backgroundColor: '#000000'
    },
    config: {
      googleSignIn: {
        apiKey: 'AIzaSyBV6p6An892RU97ubebX9O57iS93IKRR44',
        certificateHash: '10:F9:C2:A9:0E:04:47:34:11:66:E9:95:6F:F8:E0:BF:C0:CF:B3:96'
      }
    }
  },
  web: {
    favicon: './assets/images/icon.png',
    config: {
      firebase: {
        apiKey: 'AIzaSyAAx5XMKVGHTxh-ykKmQgDaBMFDfoiDkVo',
        authDomain: 'nightwings.firebaseapp.com',
        projectId: 'nightwings',
        storageBucket: 'nightwings.appspot.com',
        messagingSenderId: '803606570155',
        appId: '1:803606570155:web:7845bddacb41c67afbc3ee',
        measurementId: 'G-ZFHN6PL09V'
      }
    }
  },
  packagerOpts: {
    config: 'metro.config.js',
    sourceExts: [
      'expo.ts',
      'expo.tsx',
      'expo.js',
      'expo.jsx',
      'ts',
      'tsx',
      'js',
      'jsx',
      'json',
      'wasm',
      'svg'
    ]
  },
  extra: {
    oneSignalAppId: '4157f9b0-9cef-477d-a9aa-13fab330fc8a'
  },
  _internal: {
    isDebug: true,
    projectRoot: '/media/hridoy/linux ssd/projects/thrive/mobile-app/spectre',
    dynamicConfigPath: null,
    staticConfigPath: '/media/hridoy/linux ssd/projects/thrive/mobile-app/spectre/app.config.json',
    packageJsonPath: '/media/hridoy/linux ssd/projects/thrive/mobile-app/spectre/package.json',
    autolinkedModules: [
      'expo',
      'expo-analytics-segment',
      'expo-application',
      'expo-av',
      'expo-constants',
      'expo-crypto',
      'expo-dev-client',
      'expo-dev-launcher',
      'expo-dev-menu',
      'expo-dev-menu-interface',
      'expo-device',
      'expo-error-recovery',
      'expo-file-system',
      'expo-firebase-analytics',
      'expo-firebase-core',
      'expo-font',
      'expo-json-utils',
      'expo-keep-awake',
      'expo-linear-gradient',
      'expo-manifests',
      'expo-media-library',
      'expo-modules-core',
      'expo-notifications',
      'expo-screen-capture',
      'expo-screen-orientation',
      'expo-secure-store',
      'expo-splash-screen',
      'expo-structured-headers',
      'expo-system-ui',
      'expo-updates',
      'expo-updates-interface',
      'expo-web-browser',
      'react-native-reanimated',
      'unimodules-task-manager-interface'
    ],
    pluginHistory: {
      'react-native-maps': {
        name: 'react-native-maps',
        version: 'UNVERSIONED'
      },
      'expo-ads-admob': {
        name: 'expo-ads-admob',
        version: 'UNVERSIONED'
      },
      'expo-apple-authentication': {
        name: 'expo-apple-authentication',
        version: 'UNVERSIONED'
      },
      'expo-contacts': {
        name: 'expo-contacts',
        version: 'UNVERSIONED'
      },
      'expo-notifications': {
        name: 'expo-notifications',
        version: '0.14.1'
      },
      'expo-updates': {
        name: 'expo-updates',
        version: '0.11.6'
      },
      'expo-branch': {
        name: 'expo-branch',
        version: 'UNVERSIONED'
      },
      'expo-document-picker': {
        name: 'expo-document-picker',
        version: 'UNVERSIONED'
      },
      'expo-facebook': {
        name: 'expo-facebook',
        version: 'UNVERSIONED'
      },
      'expo-system-ui': {
        name: 'expo-system-ui',
        version: '1.1.1'
      },
      'expo-splash-screen': {
        name: 'expo-splash-screen',
        version: '0.14.2'
      },
      'expo-navigation-bar': {
        name: 'expo-navigation-bar',
        version: 'UNVERSIONED'
      },
      'expo-firebase-core': {
        name: 'expo-firebase-core',
        version: '4.1.0'
      },
      'expo-av': {
        name: 'expo-av',
        version: '10.2.1'
      },
      'expo-dev-menu': {
        name: 'expo-dev-menu',
        version: '0.9.3'
      },
      'expo-dev-launcher': {
        name: 'expo-dev-launcher',
        version: '0.10.4'
      },
      'expo-dev-client': {
        name: 'expo-dev-client',
        version: '0.8.4'
      },
      'expo-file-system': {
        name: 'expo-file-system',
        version: '13.1.3'
      },
      'expo-media-library': {
        name: 'expo-media-library',
        version: '14.0.1'
      },
      'expo-screen-orientation': {
        name: 'expo-screen-orientation',
        version: '4.1.2'
      }
    }
  },
  mods: {
    android: {
      manifest: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      colors: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      dangerous: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      strings: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      styles: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      colorsNight: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      mainActivity: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      gradleProperties: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      settingsGradle: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      projectBuildGradle: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      appBuildGradle: [AsyncFunction: interceptingMod] {
        isProvider: true
      }
    },
    ios: {
      infoPlist: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      dangerous: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      appDelegate: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      entitlements: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      xcodeproj: [AsyncFunction: interceptingMod] {
        isProvider: true
      },
      expoPlist: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      },
      podfileProperties: [AsyncFunction: interceptingMod] {
        isProvider: true,
        isIntrospective: true
      }
    }
  },
  androidStatusBar: {
    backgroundColor: '#ffffff'
  }
}

Also, I have already mentioned about the custom plugin "plugins/one-signal-csdk-downgrade-plugin" here. And It was not the issue. You can skip this as I'm not using this now. (without adding this custom plugin the issue remains the same)

@jkasten2
Copy link
Member

jkasten2 commented Feb 14, 2022

@hridoy43 Thanks for the log, it seems none of the onesignal-expo-plugin hooks are not getting fired.

I found these entries to confirm which config file is being used. I see it is app.config.json as you stated above but this confirms it:

dynamicConfigPath: null,
staticConfigPath: '/media/hridoy/linux ssd/projects/thrive/mobile-app/spectre/app.config.json',

Next I checked your "Evaluated config" section, it is missing a plugins: section.

Evaluated config:
{

This seems to be the root cause of why onesignal-expo-plugin isn't running, nor your custom plugin. I think you may have put the plugins: entry in the wrong spot in your app.config.json and it is being skipped. Can you double check this and / or share your full app.config.json?

To confirm you have it fixed you can run expo config --type prebuild and should see a plugins section.

@hridoy43
Copy link
Author

hridoy43 commented Feb 15, 2022

@jkasten2 Thanks for your kind reply.

The issue has been resolved now. It was my fault that I had added the plugins property outside of expo object.

However, Idk how the other plugins were working like react-native-firebase/app, flipper and so on which I had added later.

Anyway... I'm facing a new issue after solving this.

After sending push/in-app notification from the one-signal panel, I'm getting two notifications at the same time (one with title and the other one with title and body

Also, the first one only appears as a pop-up notification. I can see the second one If I only expand the notification panel.

Idk It's an SDK related issue or not. So, that's why asking for the workaround/solution here!

Screenshot_2022-02-16-04-00-30-903_com miui home
Screenshot_2022-02-16-04-08-03-866_com thriveedtech digitalcoach

@jkasten2
Copy link
Member

jkasten2 commented Feb 17, 2022

@hridoy43 The title only notification is a common problem we have seen when another SDK / library attempts to display a notification from OneSignal. Check the other packages in your project that support notifications and remove or disable that part of them. (This is an Android only issue, due to the way Android handles push vs iOS)

@hridoy43
Copy link
Author

@hridoy43 The title only notification is a common problem we have seen when another SDK / library attempts to display a notification from OneSignal. Check the other packages in your project that support notifications and remove or disable that part of them. (This is an Android only issue, due to the way Android handles push vs iOS)

After removing "Expo-notifications" from the project dependency. everything works fine. Thank you for your support.

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

2 participants