downloadResumable.downloadAsync() returning invalid header name error

Please provide the following:

  1. SDK Version: 44
  2. Platforms(Android/iOS/web/all): android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hello, I’m having the same problem as found in this thread: downloadResumable.downloadAsync() stopped working

It started immediately after upgrading from SDK 40 to SDK 44.
if there is a way to see the headers that DownloadResumable.downloadAsync() is sending that would be a great help.

sample code:

/// modified for convenience. based on previously working code 
let uri = "",
retrievedFile = {uri};
const downloadResumable = FileSystem.createDownloadResumable(
try {
    retrievedFile = await downloadResumable.downloadAsync();
    if ([400].includes(retrievedFile.status)) {
        console.log({ resp: await FileSystem.readAsStringAsync(retrievedFile.uri) })
} catch (e) {
    console.log({ e, retrievedFileHash }, thisFile)
    return { uri }

Hi @blackops

I don’t get the error you’re referring to:

Hi, Wodin, thanks for your reply.
I modified the snack a bit for output (couldn’t see where to view console logs). Actually I get that the filesystem module isn’t loading all its members in the snack (different from what I’m talking about).

To see the console.log() output, click in the bottom left of the window:
error/log link

Then click “LOGS”:
LOGS pane

Thanks. There is an error in the logs - “The method or property expo-file-system.downloadResumableStartAsync is not available on web, are you sure you’ve linked all the native dependencies properly?”

Once the module is linked you should get the invalid header name error…

But really it would help a great deal to know how to see the headers that downloadResumable has set on the request so that I can fix which ever one is causing the “Invalid header name” error. I don’t know which error to address.

That’s just because it’s trying to preview the Web version. If you open the snack with an actual device do you get the error about the headers? I was not getting an error.

If you want to log the headers somehow, I suppose you’d have to dig into the code and put in a console.log() call in the appropriate place or something like that.

EDIT: Here’s what I get if I run it in the Android “preview”:

Thanks, Wodin. The upgrade to 46 ended up resolving the issue.

1 Like

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