Closed prajjwal-epifi closed 4 months ago
Hey @prajjwal-epifi,
Can you please let us know where you are getting that sourceConfig? Do you populate this config? As the required fields are already present if you use the writeKey from app.rudderstack.com
.
If you're hosting this file, make sure to add these values to the config object:
"config": {
"statsCollection": {
"errors": {
"enabled": true
},
"metrics": {
"enabled": false
}
}
},
You may set the both values as false
.
Thanks @1abhishekpandey , We will add these fields to unblock ourselves. However, please consider fixing the null object reference issue.
Hey @prajjwal-epifi, Thanks for pointing this out. I've informed the team, and we are planning to fix this soon.
We are currently using a very old version of the Rudder SDK and would like to upgrade to a newer version. While testing newer version 1.21.3, we found that events are not reaching our backend server.
After debugging the SDK, I discovered that when server config file did not include the config field during SDK initialization, which resulted in the following error:
Error: Attempt to invoke virtual method 'com.rudderstack.android.sdk.core.SourceConfiguration$Metrics com.rudderstack.android.sdk.core.SourceConfiguration$StatsCollection.getMetrics()' on a null object reference.
It seems that the issue is caused by the following line of code: https://github.com/rudderlabs/rudder-sdk-android/blob/7176a6851d5782ff15489a219f415e7236e8e086/core/src/main/java/com/rudderstack/android/sdk/core/EventRepository.java#L276
here is my server config file
Please let me know if anything is needed from my side.