Skip to content
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

fxa-auth-server error " _b.histogram is not a function" when hit "sync now" on android firefox #21

Closed
hamkido opened this issue Feb 27, 2024 · 6 comments

Comments

@hamkido
Copy link

hamkido commented Feb 27, 2024

Thank you for your excellent work. I have set up services by following the readme, and it can sync my Firefox desktop data.

  • Then, I tried to sync Firefox on Android.
    I customized the link in "sync debug" and then I logged in.
    After I hit "sync now" for sync data,
    the fxa-auth-server displayed the following message.
fxa-auth-server-1                   | {"Timestamp":1709042851788000000,"Logger":"fxa-auth-server","Type":"metricsEvents.emitFlowEvent","Severity":2,"Pid":32,"EnvVersion":"2.0","Fields":{"event":"route./account/device/commands.200","miss
ingFlowId":true}}                                                                                                                                                                                                                           
fxa-auth-server-1                   | {"Timestamp":1709042856813000000,"Logger":"fxa-auth-server","Type":"RedisShared","Severity":2,"Pid":32,"EnvVersion":"2.0","Fields":{"error":"TypeError: _b.histogram is not a function"}}

branch: master
android firefox application verison:
fenix 110.0.1 && fennic 122.1.0

If you need more information, please let me know, and I will provide it as soon as possible.
Thank you once again.

@jackyzy823
Copy link
Owner

Ok , thats a fxa bug:

https://github.com/mozilla/fxa/blob/main/packages/fxa-auth-server/bin/key_server.js#L52 "histogram" function is not mocked.


May i ask the sync function in Firefox for android works or not.

If it works, you could just ignore it.

// I guess it will work, because when error here, no result would be returned from redis, then all tokens are fetched directly from database.

@jackyzy823
Copy link
Owner

I opened a issue mozilla/fxa#16491

@hamkido
Copy link
Author

hamkido commented Feb 29, 2024

May i ask the sync function in Firefox for android works or not.

If it works, you could just ignore it.

// I guess it will work, because when error here, no result would be returned from redis, then all tokens are fetched directly from database.

In my previous testing, Firefox for android sync wasn't working, I'll test again to confirm.

@hamkido
Copy link
Author

hamkido commented Feb 29, 2024

I deleted the database and started a new fxa.

When I re-register and log into Firefox for android
"Settings -> Account Settings -> Sync" now continues to show "Last sync: Never"

I also tested whether the custom sync server could be reached by the mobile network. I can connect to the custom sync server ("https://token.fxa.example.com/token/1.0/sync/1.5") over the network.
And "https://token.fxa.example.com" shows "It works".

So I don't know how to troubleshoot this issue. If you need any information please let me know.

branch: master
android firefox application verison:
fenix 110.0.1

@jackyzy823
Copy link
Owner

I'm sorry that i cannot reproduce that.

In my test , although there're logs of "_b.histogram is not a function " , Fenix is still able to sync.

I can see the opening tabs of Fenix from Firefox Desktop , also vice versa.

Here's some hint:

  1. Try upgrade Firefox android to the latest
  2. Double check the url you input in "Sync Debug"
  3. Check if your device appear in management site ( https://www.fxa.example.com ) or "Firefox View" or "Send tabs to devices"
  4. Try get log from your android devices via adb logcat ( those logs contains 1. fxa 2. sync_manager 3. sync15)

@hamkido
Copy link
Author

hamkido commented Mar 1, 2024

After I reinstall lastest Fennec 123.0.0, android sync works.
Interestingly, I've tried using this version before without success. #21 (comment)
I'm not sure what went wrong locally at the time, so it's hard to troubleshoot.
It works now.
Thank you for your help

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

No branches or pull requests

2 participants