Coder Social home page Coder Social logo

Comments (7)

jofftiquez avatar jofftiquez commented on May 27, 2024 1

For future readers

I think I figured it out. I forgot to import the @robingenz/capacitor-firebase-authentication in src-capacitor/package.json. Will close this now. Thank you.

from capacitor-firebase-authentication.

robingenz avatar robingenz commented on May 27, 2024

This message usually appears when the installation instructions have not been followed correctly.
Please make sure you follow each step correctly.

If you have recently updated from Capacitor 2, make sure that the plugin is not registered in the MainActivity.java.

from capacitor-firebase-authentication.

jofftiquez avatar jofftiquez commented on May 27, 2024

Hi, @robingenz thanks for the reply. I will double-check everything. Yes, I am currently using Capacitor 3, I will check that as well. I'll give feedback the soonest.

from capacitor-firebase-authentication.

jofftiquez avatar jofftiquez commented on May 27, 2024

@robingenz after re-following the setup guide it's still not working. To give you a summary of what I have done.

Context: I updated manually from cap 2 to cap 3, seems to be no issue as I can build successfully.

1. Properly installed required packages

Screenshot_20211127_215740

2. Add firebase to android setup

google-services.json

File present

Screenshot_20211127_220509

root-level build.gradle

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

buildscript {
    
    repositories {
        jcenter()
+        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
+        classpath 'com.google.gms:google-services:4.3.10'

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

apply from: "variables.gradle"

allprojects {
    repositories {
        jcenter()
+        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app-level app/gradle.build

apply plugin: 'com.android.application'
+ apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId "org.axie.account.tracker"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    flatDir{
        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
    }
}

dependencies {
    androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
    androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
+    implementation platform('com.google.firebase:firebase-bom:29.0.0')
+    implementation 'com.google.firebase:firebase-analytics'
+    implementation 'com.google.firebase:firebase-auth'
    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':capacitor-android')
    implementation project(':capacitor-cordova-android-plugins')
    testImplementation "junit:junit:$junitVersion"
}

apply from: 'capacitor.build.gradle'
apply plugin: 'com.google.gms.google-services'

3. App's SHA-1 setup done, and Auth Stragegy enabled already

4. Implementation

src-capacitor/capacitor.config.json

{
  "appId": "org.axie.account.tracker",
  "appName": "Axie Dashboard",
  "bundledWebRuntime": false,
  "npmClient": "yarn",
  "webDir": "www",
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 0,
      "launchAutoHide": false,
      "backgroundColor": "#ffffff"
    },
    "PushNotifications": {
      "presentationOptions": [
        "badge",
        "sound",
        "alert"
      ]
    },
    "FirebaseAuthentication": {
      "skipNativeAuth": false,
      "providers": [
        "google.com"
      ]
    }
  }
}

SignInPage.vue

// simply
const result = await FirebaseAuthentication.signInWithGoogle();

from capacitor-firebase-authentication.

jofftiquez avatar jofftiquez commented on May 27, 2024

Sorry for closing, I verified it's still not working.

from capacitor-firebase-authentication.

mburger81 avatar mburger81 commented on May 27, 2024

@jofftiquez Hey, I have exactly the same issue, what do you mean in "src-capacitor/package.json"
What is this package.json? Do mean the normal package.json in the root? If yes the error you get should be a different

from capacitor-firebase-authentication.

jofftiquez avatar jofftiquez commented on May 27, 2024

No, not the package.json in the root. I meant the package.json in src-capacitory/package.json.

from capacitor-firebase-authentication.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.