Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RNFetchBlob request error: Expected URL scheme 'http' or 'https' but was 'file'null] #848

Open
sahilkakwani9 opened this issue Jul 15, 2023 · 2 comments

Comments

@sahilkakwani9
Copy link

sahilkakwani9 commented Jul 15, 2023

Getting the following error while fetching a local video:
RNFetchBlob request error: Expected URL scheme 'http' or 'https' but was 'file'null]

Following is the code that produces the above error:

 Logger.Log('Inside Video Blob');
    const response = await RNFetchBlob.fetch('GET', URI);
    Logger.Log('Inside Video Blob', response);


    if (!response.respInfo || !response.respInfo.headers) {
      throw new Error('Failed to fetch file');
    }

    const headers = response.respInfo.headers;
    const contentType = headers['Content-Type'] || '';
    const blob = response.blob(contentType, 0);
 
    return blob;

System:
OS: macOS 13.3.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
npmPackages:
expo: ^48.0.0 => 48.0.15
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.7 => 0.71.7
react-native-web: ~0.18.7 => 0.18.10
npmGlobalPackages:
expo-cli: 6.0.8
Expo Workflow: bare

I am testing on Android 13

@ashutosh5247
Copy link

hi @sahilkakwani9 , I am facing the same issue. Were you able to resolve ?

@sahilkakwani9
Copy link
Author

Not yet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants