capacitor-community / capacitor-community/firebase-analytics
setUserProperties not working
- Dominant language
- Java
- Stars
- 178
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am using the following setup:
Ionic version 7.2.0
Capacitor version 6.1.0
@capacitor-community/firebase-analytics version 6.0.0
I am using Firebase Analytics with an Android smartphone.
When I try to call this function:
async setUserProperty(name: string, value: string){
try{
await FirebaseAnalytics.setUserProperty({
name: name,
value: value,
});
} catch(e){
console.error("Error setting", name, "with property:", value, e)
}
}
with these parameters:
await this.setUserProperty('hashed_email', 'mia@mail');
The system enters the catch block with this error message: "key must be provided."
However, in the Firebase Console's debug view, I can see my property being set.
In the Firebase Console, I added my custom user property definition hashed_email.
Has anyone encountered this issure? Is there a problem in my implementation?
Contributor guide
Research direction
Start by reproducing the Android setup with Capacitor 6.1.0 and Firebase Analytics 6.0.0, then trace the setUserProperty entry point and its returned error. Compare the caught “key must be provided” result with the property visible in Firebase DebugView; done means the behavior and expected error handling are clearly explained or consistently corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, firebase
- Domain
- analytics, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100