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

LogTime for Facebook SDK on Android being converted into E notation (exponential) #908

Open
esdrasetrenne opened this issue Jan 3, 2024 · 2 comments
Labels
bug Something isn't working 🚧 Work In Progress

Comments

@esdrasetrenne
Copy link

esdrasetrenne commented Jan 3, 2024

This seems to be related to #878 but different...

This is only an issue for Android.
"@segment/analytics-react-native-plugin-facebook-app-events": "^0.5.4",

When the log call to facebook goes out, the value for the _logTime is an exponent string where an integer is expected:

400 error for POST https://graph.facebook.com/v15.0/xxxxxx/activities
{
  "error":{
     "message":" (#100) Param custom_events[0][_logTime] must be an integer",
     "type":"OAuthException",
     "code":100,
     "fbtrace_id":"xxxxxxx",
     },
  }

I can't figure out where the logTime gets converted, but the logTime in the request body is shaped as follows:

  {
    "_eventName": "Debug_Appsflyer_init_completed",
    "_eventName_md5": "xxxxxxxxxxx",
    "_logTime": "1.704267463E9",
    "_ui": "ReactApplicationContext",
    "_session_id": "xxxxxxxxxx,
    "_appVersion": "2.0.80",
    "fb_num_items": "0.0",
    "_valueToSum": 0
  },

I did some logs in the @segment/analytics-react-native-plugin-facebook-app-events lib and the logTime is indeed a number when it is passed to the AppEvents sdk but somewhere along the line it gets converted into a string...again this is happening only on Android for us.

@esdrasetrenne esdrasetrenne added the bug Something isn't working label Jan 3, 2024
@oscb
Copy link
Contributor

oscb commented Mar 18, 2024

@esdrasetrenne Sorry for the lack of updates. Some reorgs have been impacting us.

I tried debugging this, but I notice the same as you, the library itself is handling this off to the SDK as a number. Which version of RN and FBSDK-next are you using? Given that this only happens in Android it might be related to some transformation happening over the bridge communication

@esdrasetrenne
Copy link
Author

esdrasetrenne commented Mar 18, 2024

no worries about the delay, c'est la vie, hope everything is well.

lib versions:
"react-native": "0.72.12"
"react-native-fbsdk-next": "^12.1.3",

to be honest, I haven't tracked whether this is still happening or not, and if it turns out this is a version issue we may just wait to update.

And since this library is passing it off correctly, then maybe it's not a bug with this library? Were you seeing the same issue on android or maybe there is just something wrong with our team's configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🚧 Work In Progress
Projects
None yet
Development

No branches or pull requests

2 participants