The method 'installAppCheckProviderFactory' isn't defined for the type 'FirebaseAppCheck' - firebase

i am trying to use firebase new feature which is App check for flutter app in android emulator.
i am trying to activate the debug provider for android by following this instructions app check .
for line "firebaseAppCheck.installAppCheckProviderFactory(
DebugAppCheckProviderFactory.getInstance());" , i got error message that says The method 'installAppCheckProviderFactory' isn't defined for the type 'FirebaseAppCheck'
does anyone know how to solve this problem

I have run into the same problem myself.
It's not stated on this page but the imports you need are:
import com.google.firebase.FirebaseApp;
import com.google.firebase.appcheck.FirebaseAppCheck;
import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory;

Related

Exports is not defined while using firestore

I am getting this error while using firestore in typescript -
exports is not defined
ReferenceError: exports is not defined
at eval (/node_modules/#firebase/firestore/dist/index.node.cjs.js?v=470e9090:5:23)
at instantiateModule (C:\Users\ADMIN\Desktop\game-store\node_modules\vite\dist\node\chunks\dep-713b45e1.js:66472:15)
I am using it with svelte kit.
I am following the docs on the firebase website and I think this error comes in getFirestore in onMount. this error happens sometimes and sometimes not.
Please help how to solve it!
I suspect there is a possible solution to your issue in a GitHub discussion I’ve found. They talk about incompatibility between firebase and svelte, but at the end someone commented this was an error caused by the imports. The comment is:
...Looks like when you import "#firebase/app" instead of "firebase/app" it works. Seems like Vite is unable to resolve "firebase/app" to "#firebase/app" because the firebase team said it actually points to "#firebase/app"...

Firebase Crashlytics React Native: Not able to understand stacktrace

So I am getting this [see Image] as a stacktrace after integrating react-native-firebase and I am able to understand it. Message is correct "undefined is not an object". But Line Numbers are missing. This is no file name.
If there is any way I can upload react native bundle to firebase to make it more understandable.
Already read
React Native Firebase Crashlytics Deobfuscation
Can't do this for every crash.
If the functionality is not available on firebase please comment. If the integration was wrong please let me know.
I am using these versions
"#react-native-firebase/app": "^12.0.0",
"#react-native-firebase/crashlytics": "^12.0.0".
And
firebaseCrashlytics {
mappingFileUploadEnabled true
}
is enabled for release flavour.
Checking these issues on release build.

Google Cloud Vision API could not find a declaration file

I'm following this tutorial that uses Ionic framework and Firebase backend to create an image recognition app https://www.youtube.com/watch?v=taPczl94Eow
For this line:
import * as vision from '#google-cloud/vision'
I keep getting the error:
Could not find a declaration file for module '#google-cloud/vision'.
'/Users/Private/Workspace/project/functions/node_modules/#google-cloud/vision/src/index.js' implicitly has an 'any' type.
Try `npm install #types/google-cloud__vision` if it exists or add a new declaration (.d.ts) file containing `declare module '#google-cloud/vision';`
What should I do? I already installed it properly. I also enabled the API from the GCP platform and followed their instructions
I was also having the same problem, so I had to replace this line:
import * as vision from '#google-cloud/vision'
For this line (it works with Typescript):
const vision = require('#google-cloud/vision');
I hope this works for your case.

React-Native Firebase custom events not showing in DebugView mode on iOS

So I followed all the instructions, installed the library and linked it with react-native link react-native-firebase
Added the correct code in my AppDelegate.m with my GoogleService-Info.plist file added in my XCode project.
I also added -FIRAnalyticsDebugEnabled and -FIRDebugEnabled in the Arguments Passed On Launch like the documentation said.
Events like: user_engagement and first_open are showing correctly so I'm guessing that my config is OK, but my custom events aren't showing at all in the DebugView.
In React-Native-Firebase documentation it says
The default app is pre-initialized natively therefore there is no need to call initializeApp for the default app instance.
But in this example that I tried to follow, he uses initializeApp with for parameter debug: false so that events show up.
Code that I tried:
import RNFirebase from 'react-native-firebase';
const firebaseApp = RNFirebase.initializeApp({ debug: false });
firebaseApp.analytics().logEvent("test_event");
I did the same thing and it's not working at all. What is the correct syntax to send events on DebugView? I'm a little lost here. Thanks!
I'm using RN: 0.52.0

Firebase is not Importing without cocoapods in Xcode

I am new at Swift. I am creating my own framework that will use Firebase for in-app messages.
I tried to install Firebase through Cocoa pods, but it has issues: when I do that for my framework, then for sample project I have to install Firebase again. And then I get the numbers of warnings like this:
Class Firebase is implemented in both /private/var/containers/Bundle/Application/AD85D7EC-2652-4019-94FB-C799D0FBA69B/MyFrameworkExampleApp.app/Frameworks/MyFramework.framework/MyFramework (0x1019a0438) and /var/containers/Bundle/Application/AD85D7EC-2652-4019-94FB-C799D0FBA69B/MyFrameworkExampleApp.app/MyFrameworkExampleApp (0x10107c558). One of the two will be used. Which one is undefined.
my app crashes at runtime due to these warnings
So I don't want to use cocoa pods in Framework but need Firebase in my project.)
.
I follow the steps:
"https://firebase.google.com/docs/ios/setup#frameworks"
I just download the firebase file and import it into my project. after this I try to:
import Firebase
at the top of my swift class but the compiler is giving me an error.
No such module 'Firebase'
I am using Xcode 9. swift 4.
All of the framework files are in
"Targets > FrameworkName > General > Linked Frameworkd and Libraries".
also in the
"Targets > FrameworkName > Build Phases > Link Binary with Libraries".
I also followed this tutorial:
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
but nothing happened.
Where am I wrong and What should I do?
Try adding following #import to framework's public header file "YourCocoaTouchFrameworkNameSwift.h"
#import <YourCocoaTouchFrameworkName/Firebase.h>
Check this link, if you need more information.
in firebase we have not a .framework file for import firebase. As we know that firebase is a combination of different frameworks, so we were unable to import firebase directly. thats why we
import required framework and dependent framework separately.
Dont try to import whole firebase.

Resources