Open AmauryLiet opened 1 month ago
Android
0.74.5
11.0.0
100% of the time, on release builds
NB: This is reproduced when using Braze & Didomi together, but the described erratic behaviour should be addressed regardless of Didomi implementation
import React, { useCallback, useEffect, useState } from 'react'; import Braze, { ContentCard } from '@braze/react-native-sdk'; import { Didomi, DidomiEventType } from '@didomi/react-native'; import { TouchableOpacity, View } from 'react-native'; const myVendors = ['my vendor id']; export const App = () => { const enableCookies = useCallback(async () => { const currentUserStatus = await Didomi.getUserStatus(); await Didomi.setUserStatusSets( currentUserStatus.purposes.consent.enabled, currentUserStatus.purposes.consent.disabled, currentUserStatus.purposes.legitimate_interest.enabled, currentUserStatus.purposes.legitimate_interest.disabled, [...currentUserStatus.vendors.consent.enabled, ...myVendors], currentUserStatus.vendors.consent.disabled, currentUserStatus.vendors.legitimate_interest.enabled, currentUserStatus.vendors.legitimate_interest.disabled ); }, []); const [contentCards, setContentCards] = useState<ContentCard[]>([]); useEffect(() => { Didomi.addEventListener(DidomiEventType.CONSENT_CHANGED, async () => { const cards = await Braze.getContentCards(); setContentCards(cards); }); }, []); return ( <View> <TouchableOpacity onPress={enableCookies} /> {contentCards.map(renderCard)} </View> ); };
Braze.getContentCards() returns an array once cookies are enabled
Braze.getContentCards()
Braze.getContentCards() never resolves.
Regardless of Didomi integration, the call should return a value (error, empty array, filled array, ...) and not hang indefinitely
No response
Hi @AmauryLiet ,
Which Platforms?
Android
Which React Native Version?
0.74.5
Which @braze/react-native-sdk SDK version?
11.0.0
Repro Rate
100% of the time, on release builds
Steps To Reproduce
NB: This is reproduced when using Braze & Didomi together, but the described erratic behaviour should be addressed regardless of Didomi implementation
Expected Behavior
Braze.getContentCards()
returns an array once cookies are enabledActual Incorrect Behavior
Braze.getContentCards()
never resolves.Regardless of Didomi integration, the call should return a value (error, empty array, filled array, ...) and not hang indefinitely
Verbose Logs
No response
Additional Information
No response