Skip to content

Firebase Analytics: unable to clear user id in debug view #4856

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

Open
xanderbuck opened this issue Feb 7, 2020 · 13 comments
Open

Firebase Analytics: unable to clear user id in debug view #4856

xanderbuck opened this issue Feb 7, 2020 · 13 comments
Assignees

Comments

@xanderbuck
Copy link

Step 1: Describe your environment

  • Xcode version: 11.2
  • Firebase SDK version: 6.15.0
  • Firebase Component: analytics
  • Component version: 6.15.0
  • Installation method: CocoaPods

Step 2: Describe the problem

Steps to reproduce:

I am trying to clear the user id of the current user after a user logs out of my app. In my log out sequence I call the following:

Analytics.setUserID(nil)

In the documentation of this method it says:

The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to nil removes the user ID.

So as far as I can tell I'm clearing it correctly.

However.

When I am in debugView on firebase console, I see no indication that the user id has been cleared and when I look at subsequent events after clearing the user id, I can see under user properties, the old user id of the logged out user. I would expect this field to be empty here.

Not sure if this is a bug on debug view of the firebase console or if I'm doing something wrong?

It should be noted that when I try to set the user id as such below, I can see the user id being set in debug view and events having that id under user properties:

Analytics.setUserID("1234")
@google-oss-bot

This comment has been minimized.

@rizafran
Copy link
Contributor

Thanks for the report, @xanderbuck. Upon testing on my end using the quickstart, I can see that there's no indication that the user id has been deleted. But on my logs, it seems that the value of user id was removed.
analytics

Can you share a sample code or project that reproduces the issue? You may also share any significant details that might help to investigate the issue.

@allenktv
Copy link
Contributor

Hi @xanderbuck, I was able to reproduce your issue. It seems to be a UI issue in DebugView, and the user ID is indeed removed when set to nil. You should be able to query the data correctly on the dashboard after it is processed, which could take about a day.

The tracker for the UI bug is at b/149401786

@xanderbuck
Copy link
Author

@allenktv @rizafran thanks a bunch guys! Really appreciate the timely response on this ticket. Cheers!

@simonsickle
Copy link

@allenktv is there a public link available for this bug? I do not currently see the issue when I search the issuetracker for that ID. Thanks!

@allenktv
Copy link
Contributor

@sicklepilot Unfortunately the issue is only viewable internally. And unfortunately as of the time of typing this, there has been no updates on it.

@simonsickle
Copy link

Thanks for checking on this for me. The really confusing part for us was the fact that the UserID is being shown on events that it wasn't actually attached to, making us think it wasn't being removed. When I enabled verbose logging, I can see the removal of the property when I set it to null and then events called in the future don't include the property.

If in doubt to wether your code is removing the property or not, try setting the debug logging.

@rmorrin
Copy link

rmorrin commented Sep 8, 2021

Has there been any updates on this? We're still observing the same issue in the DebugView over 1 year later...

@chauhan130
Copy link

Do we have any updates on this?

@Monsteel
Copy link

Monsteel commented Apr 1, 2022

Do you have any news?

@mikehardy
Copy link
Contributor

Popped again in react-native-firebase invertase/react-native-firebase#6583

@Mdmitriy119E
Copy link

Hi, do we have any updates on this?

@AmerigoM
Copy link

Encountered this problem on Xcode 13.4.1 and FirebaseAnalytics 9.5.0. Any update on this matter would be appreciated. Using Analytics.setUserID(nil) or Analytics.setUserID("") didn't help.

I also tried to shut down and up again the Analytics just to see if that would do the trick through Analytics.setAnalyticsCollectionEnabled(false) and Analytics.setAnalyticsCollectionEnabled(true) right away but nothing changed: the user id is still there with every event I send in debug view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests