Closed canpoyrazoglu closed 1 year ago
Oh, hi there! I've just answered you in StackOverflow, glad you're here. Let me paste here the reply:
From the provided code I can see only one possible buggy place: customerUserId should be a nullable string (string | undefined | null
) and native layer may throw an error if you've passed a number for example.
Although in this customerUserId
case the error should be: _"Argument 'userid' was not passed to a native module." The only place, where I can expect 'id'
is in adapty.getPaywall(paywallId)
method.
Make sure, that:
getPaywall
is not being called somewhere without the first required argumentpaywallId
argument is of string typeMeanwhile, I'll make sure that errors deserialize without any pain
@canpoyrazoglu, mentioning in case you are not notified by default ☝️
Hi,
After further investigation I've found that I was passing an object whereas I should be passing ID string. I had some refactoring around Adapty and paywalls but forgot to change that one line of code (which was previously working with object instead of ID).
Now it works. Completely my bad!
Description
I'm trying to initialize the SDK:
My
env.adaptySdkKey
andcustomerUserId
are set and valid. However when I'm initing I get a console warning:Failed to deserialize a native error message
Digging down further into React Native bridge and putting a breakpoint there reveals the following details with the provided error data object:
What am I doing wrong? (Tried iOS-only. I currently can't test Android so I don't know it happens on Android too or not)
Version
2.4.2
What platforms are you seeing the problem on?
iOS
System info