Wado
Wado

Reputation: 51

expo-image-picker crashing, no errors thrown

I added an expo-image-picker to my app, all the guides have been followed, the console is showing me no errors and functionality is almost all the time failing. The gallery is opening I press the "Choose" button and no image is selected. When I reload the app maybe 1 of 3 tries is working and my image is picked, other times nothing is happening. I'm using "expo-image-picker": "~14.7.1" and "expo": "~50.0.19" My usage:

import * as ImagePicker from "expo-image-picker";
    
const pickImage = useCallback(async () => {
        const result = await ImagePicker.launchImageLibraryAsync({
          mediaTypes: ImagePicker.MediaTypeOptions.Images, 
          allowsMultipleSelection: false, 
          allowsEditing: true, 
          quality: 0.5,
          exif: false, 
        }).catch((err) => {
          console.log(err);
        });
        if (
          result &&
          !result.canceled &&
          result.assets &&
          result.assets.length > 0 &&
          result.assets[0]
        ) {
          setImage(result.assets[0]);
        }
      }, []);

console is not showing a simple error. Has anyone faced same problem?

I've tried console logging it all, rebuilding the application, removing the cache, reinstalling it, but nothing has helped

Upvotes: 0

Views: 134

Answers (0)

Related Questions