blob stopped working in expo sdk 39

Did the upgrade and all the steps on the link but having the same issue.

Please post your package.json, the platform you are running the client on (Android or iOS) and your client version.

You’ll see the version at the bottom of the Projects tab in the app.

IOS and Android CLi is the latest 39.0.0
{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“eject”: “expo eject”
},
“dependencies”: {
@expo/vector-icons”: “^10.0.0”,
@react-native-community/datetimepicker”: “3.0.0”,
@react-native-community/picker”: “1.6.6”,
“expo”: “^39.0.0”,
“expo-apple-authentication”: “~2.2.1”,
“expo-cli”: “^3.25.1”,
“expo-constants”: “~9.2.0”,
“expo-crypto”: “~8.3.0”,
“expo-facebook”: “~9.0.0”,
“expo-font”: “~8.3.0”,
“expo-google-app-auth”: “^8.1.3”,
“expo-image-picker”: “~9.1.0”,
“expo-location”: “~9.0.0”,
“expo-notifications”: “~0.7.2”,
“expo-permissions”: “~9.3.0”,
“expo-updates”: “~0.3.3”,
“firebase”: “7.9.0”,
“geofire”: “^5.0.1”,
“lodash”: “^4.17.20”,
“moment”: “^2.27.0”,
“react”: “16.13.1”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz”,
“react-native-datepicker”: “^1.7.2”,
“react-native-geocoding”: “^0.3.0”,
“react-native-gesture-handler”: “~1.7.0”,
“react-native-maps”: “0.27.1”,
“react-native-modal”: “^11.0.1”,
“react-native-reanimated”: “~1.13.0”,
“react-native-screens”: “~2.10.1”,
“react-native-switch-selector”: “^2.0.6”,
“react-navigation”: “^3.13.0”
},
“devDependencies”: {
“babel-eslint”: “^10.0.2”,
“babel-preset-expo”: “^8.3.0”,
“eslint”: “^6.1.0”,
“eslint-config-airbnb”: “^18.0.0”,
“eslint-plugin-import”: “^2.18.2”,
“eslint-plugin-jsx-a11y”: “^6.2.3”,
“eslint-plugin-react”: “^7.14.3”,
“eslint-plugin-react-hooks”: “^1.7.0”
},
“private”: true
}

That is not the latest. e.g. the react-native dependency should be “…sdk-39.0.3…”

See the link from my comment 5 days ago for the details.

it is 0.3 I put 0.0 by mistake

And the version of the client?

2.17.4 is my cli

I found maybe why it wasn’t working, I update to the las sdk erase de package-lock.json erase de node_module folder and…

const blob = await new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onload = function () {
resolve(xhr.response);
};
xhr.onerror = function (e) {
console.log(e)
reject(new TypeError(‘Network request failed’));
};
xhr.responseType = ‘blob’;
xhr.open(‘GET’, yourImageLocalPath, true);
xhr.send(null);
});

And is working fine

the reason it wasn’t working before was that your client version was old, we patched it last saturday and so you would have needed to update expo client for ios for the fix to work. we do indeed delete package-lock.json when upgrading but this is sadly necessary otherwise you will often end up with a broken project due to how npm resolves dependencies when upgrading some subset of dependencies (note: yarn works much better in this regard).

weird, I’m also stil seeing this issue with the following version:

    "react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz",

When I run yarn why react-native I get Found "react-native@0.63.2" and I also did yarn upgrade and removed all my node_modules just to be sure

My client is iOS 2.17.4 and when I do fetch(photo.uri).then((response) => response.blob()) I get TypeError: response.blob is not a function. (In 'response.blob()', 'response.blob' is undefined)]

The photo.uri is just a local file url I got from takePictureAsync, does anyone see what I’m doing wrong?

Edit: When I try to get a blob with XHR I get the following error: Native module BlobModule is required for blob support

How to create a Minimal, Reproducible Example - Help Center - Stack Overflow - make one of these and share it :slight_smile:

darn, sorry for the bad bug report, I tried making an expo snack and wasn’t able to reproduce…which I suppose is good but I have no idea why I’m still seeing this issue in my project since I followed all the steps regarding upgrading to 39.0.3.

Edit: I’ve turned experiments.turboModules off, and it works now :thinking:

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