RNFetchBlob request error: Expected URL scheme 'http' or 'https' but was 'file'null]
sahilkakwani9 opened this issue · 2 comments
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
hi @sahilkakwani9 , I am facing the same issue. Were you able to resolve ?
Not yet!