Closed as not planned
Description
When using GiftedChat's renderActions with a custom modal (e.g., bottom sheet), calling a file/image picker directly from the modal causes the app to crash on Android 12.
<GiftedChat
renderActions={(props) => (
<Actions
{...props}
onPressActionButton={() => setVisible(true)} // opens modal
/>
)}
/>
const pickFile = async () => {
pick?.({
type: ['application/pdf'],
})
.then(results => {
// handle result
})
.catch(err => {
console.log('File error:', err);
});
};
File error: Error: Warning: previous promise did not settle and you attempted to overwrite it. You've called "pick" while "pick" was already in progress and has not completed yet.
Your computer environment
Node:
version: 22.14.0
npm:
version: 10.9.2
react-native:
installed: 0.79.1
"@react-native-documents/picker": "^10.1.2",