Solved

How to handle UNKNOWN_BACKEND_ERROR - attribute_errors ?

  • 24 February 2022
  • 10 replies
  • 619 views

Badge +5

 Hello,

 

I am getting following error when syncing purchases or getting subscriber info:

Key Value
attribute_errors   ( { "key_name" = "$idfv"; message = "IDFV cannot be modified."; }, { "key_name" = "$appsflyerId"; message = "AppsFlyer ID cannot be modified."; } ) 
finishable 1
nserror-code 16
nserror-domain  RCPurchasesErrorDomain
NSLocalizedDescription    There was an unknown backend error.
NSUnderlyingError    Error Domain=RCBackendErrorDomain Code=0 "" UserInfo={NSLocalizedDescription=} 
rc_successfullySynced 1
readable_error_code UNKNOWN_BACKEND_ERROR

 

The documentation says I should report the error, so here I am :)

Please advise

 

Thanks

icon

Best answer by joshdholtz 25 February 2022, 17:11

View original

10 replies

Userlevel 3
Badge +5

Hey @Tim Papler

First, I’m a huge fan of Lake so hello 😊 

Second, I’m not exactly sure why this is being sent as a `UNKNOWN_BACKEND_ERROR` 🤔 Both IDFV and AppsflyerID aren’t allowed to be modified after set on a purchaser/customer.

Do you know how this started happening and is this happening to a handful of your users? Or is this something that was discovered through local testing? 

If it was local testing you could uninstall and reinstall the app and those subscriber attributes should no longer try to sync.

If this is happening to a bunch of users in a non-local testing environment then we’d probably need to figure out a different kind of solution 😇 

Hopefully this helps and we can get this figured out for you!

Badge +5

Hey @joshdholtz,

Love to hear you’re a fan 😀

We are seeing this in production. I am not sure when this started happening. But we had quite a lot of users needing to restore purchases often, at the moment my suspicion is this happens because they upgraded from version of the app without RevenueCat SDK to version with it and we try to do purchases sync and we get this error. 

Honestly at the moment I am not 100% sure this error happens only when I try to sync purchases or also when I try to get subscriber info.

We try to sync purchases when getting subscriber info for the first time (only users who upgraded app from app version without RevenueCat to version with it) and if we succeed we then get subscriber info without syncing. But if it fails well we keep trying. So I was wondering if we can safely ignore the error if `rc_successfullySynced = 1`  and try to get subscriber info?

 

Userlevel 3
Badge +5

Hey @Tim Papler!

The `$idfv` error is expected and can be ignored 😊 `$idfv` will change when a user is using multiple devices so it’s really only used for attribution integrations. This is something that RC picks up automatically but I’m not sure why the `UNKNOWN_BACKEND_ERROR` error is getting reported but I’m going to look into that.

The next thing is the `$appsflyerId` part of the error. This also shouldn’t be an error that is stopping you from continuing on but this one I think is manually set by your app. Is this also getting set by the IDFC with `UIDevice.current.identifierForVendor`? If so, that would explain this same error behavior.

Thanks!

Badge +5

Hello,

Yes you are correct we are setting $appsflyerId manually in the app, but we set it to the value we get from AppsFlyer SDK, but in case user has multiple devices different #appsflyerId is set for each device since it is generated by AppsFlyer SDK I can’t really tell how they generate it but I would assume they can’t match multiple devices to the same user.

 

Thanks for your help :)

Userlevel 3
Badge +5

Okay, that is good to know! Then based on that… I think it is safe to ignore these errors 😊 

am going to create a task for us to look into reporting these errors that you saw as something different that `UNKNOWN_BACKEND_ERROR` because they totally feel known.

Would you like to be updated when this is addressed? If so, I’ll attach your name to the story and then we can reach out to you!

Thanks!

Badge +5

Ok great, will ignore the errors.

Yes, please let me know when this is addressed.

 

Thank you very much for your support!

Userlevel 3
Badge +5

@Tim Papler It’s been my pleasure 😊 We’ll be in touch again when this is fixed!

Badge +5

Hello @joshdholtz,

 

I have found potential reason for this issue. Our server didn’t send the attributes to RevenueCat server so idfv and appsflyerId were not set. We are using our server to forward receipts to RevenueCat for app versions that don’t use RevenueCat SDK. I suppose when users upgraded the app to version with RevenueCat SDK included, these attributes got set and rejected by RevenueCat backend?

 

 

In my case.

This error occurred because i was not configuring App Store Server Notifications of revenuecat for both production and sandbox URL of AppStore. 

 

When its purchased Appstore fail to notify revenuecat i guess.

After fixing it, this error is solved.

 

Thanks.

Badge

When trying to fetch the offering from revenue cat [Error: There was an unknown backend error.]. I am getting this error suddenly. I even purchased some products. Suddenly I got this error. Any idea what to do?

Reply