expo-mail-composer throws exception when composing with attachment

Hello,
I am facing issue while using expo-mail-composer. I have integrated MailComposer sdk in expo app successfully. But after I ejected to bare react-native app, I integrated expo-mail-composer package. But now it throws exception when I use the attachments option.
53%20PM

Here’s how my mail function looks like.

async emailVotersData(){
      try{
        if(this.state.working)
          return;

        this.setState({ working: true });
        let fileInfo = await Api.loadGet(Api.exportData(), Object, {type: 'xlsx'}, this.props.authToken);
        let localFileInfo = await FileSystem.downloadAsync(`http://${fileInfo.link}`, `${FileSystem.documentDirectory}voters-list.xlsx`);
        await MailComposer.composeAsync({
          attachments: [localFileInfo.uri],
          subject: 'Voters List'
        });
      }
      catch(err){
        alert(err.message);
      }
      finally{
        this.setState({ working: false });
      }
    }

Help would be appreciated.
Regards.

Hey @devqalandar,

Just for clarification, when you say eject what do you mean? If you ran expo eject you’re working with an ExpoKit project not a bare workflow project.

Cheers,
Adam

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.