Getting ERR_UNEXPECTED while trying to access gallery with expo image picker

Hello! I got strange error while i’m trying access gallery after app reboot (reproducess only in builded apk) with expo-image-picker.

Here is my package.json

{
“name”: “delivery_sa”,
“version”: “1.0.0”,
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“build”: “eas build -p android”
},
“jest”: {
“preset”: “jest-expo”
},
“dependencies”: {
“expo/vector-icons”: “^13.0.0”,
“react-native-community/datetimepicker”: “6.5.2”,
“react-navigation/bottom-tabs”: “^6.0.5”,
“react-navigation/native”: “^6.0.2”,
“react-navigation/native-stack”: “^6.1.0”,
“axios”: “^0.27.2”,
“expo”: “^47.0.0”,
“expo-asset”: “~8.7.0”,
“expo-constants”: “~14.0.2”,
“expo-file-system”: “~15.1.1”,
“expo-font”: “~11.0.1”,
“expo-image-picker”: “~14.0.2”,
“expo-linking”: “~3.3.0”,
“expo-location”: “~15.0.1”,
“expo-notifications”: “~0.17.0”,
“expo-secure-store”: “~12.0.0”,
“expo-splash-screen”: “~0.17.5”,
“expo-status-bar”: “~1.4.2”,
“expo-task-manager”: “~11.0.1”,
“expo-updates”: “~0.15.6”,
“expo-web-browser”: “~12.0.0”,
“react”: “18.1.0”,
“react-dom”: “18.1.0”,
“react-native”: “0.70.5”,
“react-native-gesture-handler”: “~2.8.0”,
“react-native-paper”: “^4.11.2”,
“react-native-reanimated”: “~2.12.0”,
“react-native-safe-area-context”: “4.4.1”,
“react-native-screens”: “~3.18.0”,
“react-native-select-dropdown”: “^1.11.0”,
“react-native-web”: “~0.18.7”
},
“devDependencies”: {
“babel/core”: “^7.19.3”,
“types/react”: “~18.0.24”,
“types/react-native”: “~0.70.6”,
“jest”: “^26.6.3”,
“jest-expo”: “^47.0.0”,
“react-test-renderer”: “17.0.1”,
“typescript”: “^4.6.3”
},
“private”: true
}

Simple code i tried:

const addImage = async (key: any) => {

    await expoImagePicker.launchImageLibraryAsync({
             mediaTypes: expoImagePicker.MediaTypeOptions.Images,
             quality: 0.8
         });
};

And first time app was launched it works fine, but if i reboot it, i’ll get:

image

How can i fix it? Even don’t know what this error about…

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