https://kotlinlang.org logo
Join SlackCommunities
Powered by
# firebase
  • z

    Zoltan Demant

    11/28/2023, 8:35 AM
    I spoke to Firebase about this issue recently:
    The Crashlytics build ID is missing. This occurs when the Crashlytics Gradle plugin is missing from your app's build configuration.
    Ultimately no resolution, so I thought Id ask here. The build is setup correctly, and Im even seeing the issue in older (unchanged) projects where things used to work. Specifying
    shrinkResources false
    gets things working, so Im sure its proguard related, but I cant figure out how to make it keep the build id. Any ideas? 🌻
    • 1
    • 1
  • a

    aris

    11/29/2023, 10:52 AM
    Hi guys, how can I handle deeplink from firebase push notification when its on background or "dead"?
  • c

    Christopher Mederos

    12/17/2023, 3:36 AM
    Any firebase folks here? Guest/Anonymous sign-in is broken in the pre-built auth in the iOS library https://github.com/firebase/FirebaseUI-iOS/issues/1174
  • j

    Joe Altidore

    01/25/2024, 3:22 PM
    Hello guys! I am trying to implement firebase push notifications but when the app is open, the notification does not come in. This is my FirebaseService class
    class FirebaseService : FirebaseMessagingService() {
    init {
    Log.d("TAG", "onMessageReceived: ")
    }
    override fun onNewToken(token: String) {
    super.onNewToken(token)
    Log.d("TAG", "onNewToken: $token")
    }
    override fun onMessageReceived(message: RemoteMessage) {
    super.onMessageReceived(message)
    Log.d("TAG", "onMessageReceived: ${message._notification_?._title_}")
    }
    }
    I have also added this class to my manifest as shown below
    <service
    android:name=".FirebaseService"
    android:exported="false">
    <intent-filter>
    <action android:name="com.google.firebase.MESSAGIN_EVENT"/>
    </intent-filter>
    </service>
    However, when the app is in the background, I receive notification on the notification tray but when the app is open, I expect to see the log message in the onMessageReceived method which never triggers. What am i missing?
  • u

    UzMbApps

    01/29/2024, 10:31 PM
    Hi , how can we use firebase technologies in Composemultiplatform project?
    plus1 2
  • d

    Djuro

    02/11/2024, 6:39 PM
    Hi guys, hope you are all doing well, I am trying to use kmp firebase library https://github.com/GitLiveApp/firebase-kotlin-sdk How can I get this to work? This is my
    build.gradle.kts
    Copy code
    implementation("dev.gitlive:firebase-firestore:1.11.1")
    implementation("dev.gitlive:firebase-common:1.11.1")
    The error I am getting is
    Copy code
    Failed to resolve: com.google.firebase:firebase-firestore
    Failed to resolve: com.google.firebase:firebase-common-ktx
    I created the compose mulitplatform project using multiplatform wizard https://kmp.jetbrains.com/
    s
    e
    • 3
    • 8
  • d

    Daniele B

    02/23/2024, 6:10 PM
    Concerning the official Firebase SDK for KMP, I was told by Firebase Support to subscribe to this Github issue, in order to receive updates: https://github.com/firebase/firebase-android-sdk/issues/1990 and to upvote this feature request, which seems to be taken into consideration by the Firebase team: https://firebase.uservoice.com/forums/948424-general/suggestions/46591717-support-kotlin-multiplatform-kmp-in-the-sdks
    👍🏾 1
    👍 1
    👍🏼 1
  • d

    dylan

    02/28/2024, 12:24 PM
    anyone know if calling
    firebaseAnalyticsTracker.setUserId(some_unique_user_id)
    has to be done everytime an app/process starts or calling it once after login is enough and the firebase sdk stores it somewhere
  • s

    Sevak Tadevosyan

    03/09/2024, 5:05 PM
    Hi everyone, is here best practice to create GitLive
    File
    from bitmap or byteArray in KMM?
  • p

    Pablichjenkov

    03/28/2024, 6:09 AM
    Hi 👋 I received a warning from various Chinese App Stores about my App using Android_ID. After an analysis of the App binary file we detected that crashlytics is using this Android_ID from the secure settings. It seems that, crashlytics uses it to determine if the App is running on an emulator or a real device. Is there a crashlytics version that don't use this Android_ID property?
  • a

    Akram Bensalem

    05/02/2024, 9:06 AM
    Now that Room, Datastore, ViewModel are multiplatform that open the door for more ability to convert Android code to support iOS, Desktop and web more easily. Unfortunately, there is no intention that Firebase team will help us in adopting Firebase SDK to be KMP also. So please if you want this feature vote here. We need only 100 votes and we will reach the top 2 in the list of most demanded sugesion. Thanks for @louiscad for the initiative. To push Firebase team to take attention to our demande, you only have to: 1. Click the link to the feature request 2. Sign-in (w/ Google) 3. Click VOTE 4. Add comment (Optional) Link: https://firebase.uservoice.com/forums/948424-general/suggestions/46591717-support-kotlin-multiplatform
    K 6
    🚀 6
    🙌 4
    ✅ 5
    🙌🏾 1
  • a

    Ashu

    05/16/2024, 8:03 AM
    Yesterday I was trying out the newly launched App Hosting in firebase. When hosting my NextJs app, all steps are completed successfully and still the deployment failed. It doesn't show any issue anywhere except that build failed. I tried with multiple projects, including Firebase's own CodeLab project. Is anyone else experiencing the same issue?
    not kotlin but kotlin colored 1
  • m

    Mark

    05/22/2024, 2:15 PM
    Anyone know why
    com.firebaseui:firebase-ui-auth
    has not been updated to work with the latest
    play-services-auth
    21.0.0 (or later)? https://github.com/firebase/codelab-friendlychat-android/issues/294
  • r

    Ruben Quadros

    05/26/2024, 2:41 PM
    Hey everyone! I see that there is a
    kotlinx-coroutines-play-services
    dependency for android. What is the alternative for server side? I'm using firebase admin sdk on my kotlin server
  • t

    Trey

    05/30/2024, 2:06 PM
    Hello all! I'm trying to make a minor change in firebase-messaging and deploy it with my app. I've made the change, added mavenLocal() to the top of my repo list, and deployed using the recommended deployment gradle command.
    ./gradlew -PprojectsToPublish="firebase-messaging" publishReleasingLibrariesToMavenLocal
    However, my changes aren't being used. Is there another gradle setting I've missed? I assumed that it would find the proper version of firebase-messaging in my local repo, use that and then pull the rest from the public repo. Is that what should happen?
  • s

    soufianehamama9

    06/09/2024, 3:59 PM
    Is there any way to use firebase with kotlin wasm
  • h

    Hamza Kovacevic

    07/01/2024, 9:24 AM
    any firebasers here? could use some help around https://firebase.google.com/support/faq#fcm-23-deprecation
  • e

    Eduardo Ruesta

    10/24/2024, 1:57 AM
    Hey!! im trying to integrate Analytics to my Compose Multiplatform project... Do you have like a guide or steps to do?
  • a

    Apochi

    11/12/2024, 8:34 AM
    Please do I have to pay to use Firebase storage in test mode
    g
    • 2
    • 2
  • d

    Daniel

    12/14/2024, 10:23 PM
    Hello all, I have a kmm app that uses Firebase. In the android project, the packages are found in the build process, the problem is with the ios app. When I try to build the iOS app, I receive the error:
    Copy code
    > Task :shared:checkSandboxAndWriteProtection
    > Task :shared:checkKotlinGradlePluginConfigurationErrors SKIPPED
    > Task :shared:compileKotlinIosArm64 UP-TO-DATE
    > Task :shared:xcodeVersion UP-TO-DATE
    
    > Task :shared:linkDebugFrameworkIosArm64 FAILED
    warning: Cannot infer a bundle ID from packages of source files and exported dependencies, use the bundle name instead: shared. Please specify the bundle ID explicitly using the -Xbinary=bundleId=<id> compiler flag.
    error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
    Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
        
        kotlin.native.cacheKind.iosArm64=none
        
    Also, consider filing an issue with full Gradle log here: <https://kotl.in/issue>
    The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
    output:
    ld: warning: ignoring duplicate libraries: '-lcompression', '-ldl', '-lz'
    ld: framework 'FirebaseCore' not found
    error: Compilation finished with errors
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':shared:linkDebugFrameworkIosArm64'.
    > Compilation finished with errors
    In my app I have the latest versions of Kotlin and Firebase:
    Copy code
    kotlin {
        androidTarget()
        
        listOf(
            iosX64(),
            iosArm64(),
        ).forEach {
            it.binaries.framework {
                baseName = "shared"
            }
        }
    
    plugins{
        kotlin("android").version("2.0.21").apply(false)
        kotlin("multiplatform").version("2.0.21").apply(false)
    }
    
    sourceSets {
            val commonMain by getting {
                dependencies {
                    implementation("dev.gitlive:firebase-firestore:2.1.0")
                    implementation("dev.gitlive:firebase-common:2.1.0")
                    implementation("dev.gitlive:firebase-auth:2.1.0")
                    implementation("dev.gitlive:firebase-functions:2.1.0")
                }
            }
    The FirebaseCore is present in link Binary with Libraries from Xcode : image 1 Also in Frameworks targets: image 2 and I use the last version of Firebase SDK iOS 11.6.0: image 3 Also when I import FirebaseCore in swift for my app, everything goes as expected, I can even go inside the FirebaseCore import and check their code. Version of gradle:
    Copy code
    distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
    What could be the problem of: ld: framework 'FirebaseCore' not found
  • d

    Daniel

    12/18/2024, 1:54 PM
    Hi all, Why my Firebase cloud functions are slow even if I put minInstances to 1. I have tested a simple function and it takes more than 1 second every time. If I call the same function 2 times, the second run is way faster, that is why I put minInstances to 1. Shouldn't the function run every time faster? this is my code in Kotlin:
    Copy code
    coroutineScope.launch(<http://Dispatchers.IO|Dispatchers.IO>) {
        val timeTaken = measureTimeMillis {
            currentAndroidVersion =
                loginViewModel.repo.checkAndroidVersion(lastUpdateDate)
        }
        println("checkAndroidVersion took $timeTaken ms to execute")
    }
    this usually prints:
    checkAndroidVersion took 1394 ms to execute
    checkAndroidVersion took 1028 ms to execute
    KMM repo:
    Copy code
    val functions = Firebase.functions("europe-central2")
    
    suspend fun checkAndroidVersion(version: String): String{
        return functions.httpsCallable("checkAndroidVersion").invoke(version).data<String>()
    }
    cloud function:
    Copy code
    exports.checkAndroidVersion =
    onCall({region: "europe-central2", minInstances: 1}, (request) => {
      <http://logger.info|logger.info>("current user version = "+request.data, {structuredData: true});
      const version = request.data;
      if (version != "15/10/2024") {
        return version;
      }
      return "updated";
    });
    Keep in mind that I using Firebase Kotlin SDK since I have a KMM app.
  • n

    Niklas Wintrén

    01/17/2025, 10:31 AM
    I have really tried to search the web in order to be able to write the actual cloud functions in kotlin, but most is misleading, outdated and perhaps even AI nonsense. Is it possible? What kind of Kotlin Project can I setup, so that I get access to neat IDE setup preferably?
  • a

    Ankit Sharma

    01/21/2025, 12:00 PM
    Hi all , At our company we are moving from one firebase project to other firebase project , As we know that package name + SHA1 = Auth Client ID is needed for google sign in , but when we are trying add the sha1 certificate of current project to new project it's showing error that , it's already getting used at some other project , Is there any way around ?
  • d

    Daniel

    01/21/2025, 10:02 PM
    Hi all, anyone with this error in kotlin app: GoogleApiManager com.app.myapp Exception: Failed to get service from broker. java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'. at android.os.Parcel.createExceptionOrNull(Parcel.java:3242) what can this error mean??
  • e

    Eduardo Ruesta

    02/18/2025, 1:32 PM
    Hey team! Is anyone used Firebase Crashlytics from https://github.com/GitLiveApp/firebase-kotlin-sdk and can help me? I need it to a Compose Multiplatform project
  • e

    Eduardo Ruesta

    02/19/2025, 1:59 PM
    Hey! one question about something is not clear for me: Where should i add logs or send event for Crashlytics if i don't know exactly where the app will crash?
  • p

    Pablo

    03/08/2025, 10:45 AM
    Does anyone know how to see ITEM_ID/ITEM_NAME in firebase console? I'm facing the same issue explained here: https://stackoverflow.com/questions/75508070/cant-see-item-id-in-select-content-on-firebase Firebase docs says that for logging events you must do this:
    Copy code
    firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) {
        param(FirebaseAnalytics.Param.ITEM_ID, id)
        param(FirebaseAnalytics.Param.ITEM_NAME, name)
        param(FirebaseAnalytics.Param.CONTENT_TYPE, "image")
    }
    But the reality is that if you do that, it's impossible to see ITEM_ID and ITEM_NAME in the firebase console. You only can see grouped CONTENT_TYPE events. There are a lot of stackoverflow posts of people saying the same.
  • s

    Stephen

    04/23/2025, 6:41 PM
    I'm creating a new multiplatform compose app targeting android and ios. What is the recommended method for adding firebase support? I've got it working in android but having some issues on the ios side.
  • n

    Nitesh Singh

    04/29/2025, 12:55 PM
    Error(message=The email address is badly formatted.) i am getting error could you help me which email id i should use ?
  • n

    Nitesh Singh

    04/30/2025, 1:21 PM
    how i will upload image in category_image from firebase console ? could you help m e ?
    g
    • 2
    • 1