Skip to content

400 Interface: reveal container - cannot invoke reveal method before creating reveal elements #61

@ffrankfolupa

Description

@ffrankfolupa

Error Description:
When attempting to invoke the reveal method in the Skyflow React-Native SDK, an error occurs with the following details:

Reveal Failed {"errors":[{"code":400,"description":"Interface: reveal container - cannot invoke reveal method before creating reveal elements"}]}
Steps to Reproduce:

Followed the Skyflow integration steps:
Added the Skyflow wrapper in the app-level files.
Copied the end-to-end example code onto an empty screen component.
Run the application.
On the screen with the Skyflow integration, click on the "Reveal" button.
Encounter the above error message.
Expected Behavior:
The reveal method should successfully execute and reveal the appropriate elements within the reveal container.

Actual Behavior:
The reveal method fails to execute, and the application returns a 400 error with the description indicating that the reveal method cannot be invoked before creating reveal elements.

Additional Information:

Skyflow React-Native SDK version: 1.4.0
React Native version: 0.72.4
Operating System: macos/ android device
Relevant Code:

`const Skyflow = () => {

const dispatch = useDispatch();
const revealContainer = useRevealContainer();

const handleReveal = () => {
console.log(revealContainer);
revealContainer
.reveal()
.then(response => {
console.log('Reveal Success', JSON.stringify(response));
})
.catch(err => {
console.error('Reveal Failed', JSON.stringify(err));
});
};

return (

<RevealElement
token={''}
container={revealContainer}
label="Card Number"
altText="XXXX XXXX XXXX XXXX"
inputStyles={revealInputStyles}
labelStyles={revealLabelStyles}
errorTextStyles={revealerrorTextStyles}
redaction={RedactionType.PLAIN_TEXT}
/>

  <View style={buttonStyles.button}>
    <Button title="Reveal" onPress={handleReveal} />
  </View>
</View>

);
};`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions