expo-image-picker freezes after selecting an image and hitting the "choose" button( M1 chip Macbook running Big Sur)

See original GitHub issue

🐛 Bug Report

Summary of Issue

expo-image-picker freezes after selecting an image and hitting the “choose” button. It works as expected on a physical device and on a 2018 macbook pro. However it does not work in the IOS simulator on an M1 Chip Macbook Air(Big Sur). I have tried restarting my device, re-downloaded xcode, change some settings etc. Nothing seems to work. I replicated this issue in 2 different project now.

Environment - output of expo diagnostics & the platform(s) you’re targeting

Expo CLI 4.0.11 environment info: System: OS: macOS 11.0 Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - /usr/local/bin/node Yarn: 1.22.5 - ~/.yarn/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1 IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.2/12B45b - /usr/bin/xcodebuild npmPackages: expo: ^38.0.0 => 38.0.9 react: 16.11.0 => 16.11.0 react-dom: 16.11.0 => 16.11.0 react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2 react-native-web: ~0.11.7 => 0.11.7 react-navigation: ^4.4.0 => 4.4.0 npmGlobalPackages: expo-cli: 4.0.11 Expo Workflow: managed

Reproducible Demo

import * as ImagePicker from 'expo-image-picker'

export default function App() {

  useEffect(() => {
    (async () => {
      if (Platform.OS !== 'web') {
        const { status } = await ImagePicker.requestCameraRollPermissionsAsync()
        console.log(status)
        if (status !== 'granted') {
          alert('Sorry, we need camera roll permissions to make this work!')
        }
      }
    })()
  }, [])

  const _pickImage = async (screen: string) => {
    try {
      const result = await ImagePicker.launchImageLibraryAsync({
        mediaTypes: ImagePicker.MediaTypeOptions.All,
        allowsEditing: true,
        aspect: [4, 3],
        quality: 1,
      })
    } catch (error) {
    }
  }
  
  return (
    <View style={styles.container}>
      <Button title="pick Image" color="black" onPress={_pickImage}/>
    </View>
  );
}

Steps to Reproduce

  • expo init camera-test
  • open project
  • yarn add expo-image-picker
  • add the code to ask permission and code to launch image picker
  • yarn start
  • press I key when loaded for IOS simulator
  • project loads on IOS simulator device(Iphone 12 pro)
  • click button to open image library
  • click a picture from the library
  • Image cropping tool comes up(I am able to crop the image and click cancel button)
  • click the “choose” button
  • BUG --> IOS simulator freezes(unable to click anything or do anything at all)

Expected Behavior vs Actual Behavior

Expected Behavior: Able to choose an image from the image library. Actual Behavior: Choosing an image causes the IOS simulator to freeze and I am unable to do anything.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:9
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
snehjoganicommented, Jan 22, 2021

I’m facing the same thing on iPhone 12 simulator on M1 chip mac. Any updates/fixes on this issue?

1reaction
planetmallcommented, Mar 13, 2021

Same issue. M1 iOS 12 Max

Read more comments on GitHub >

github_iconTop Results From Across the Web

image_picker crashes when picking - Apple Developer
image_picker crashes when picking images on simulator running on Apple Silicon M1. On an Apple Silicon M1 it is not possible to select...
Read more >
How to Fix Frozen Mac - Setapp
Whatever the reason, after reading this article, you'll know about a set of stellar troubleshooting tools that can instantly “unfreeze” your Mac ......
Read more >
Fixing M1 Mac External Display Issues (Flickering Screen ...
Some M1 MacBook Pro, M1 MacBook Air, and M1 Mac Mini users have discovered display issues when using an external display connected to...
Read more >
How to Factory Reset Apple Silicon MacBook Pro M1 & Air M1 ...
This is a video on how to perform a hard reset factory restore on a MacBook Pro M1 & Air M1 running Mac...
Read more >
M1 Mac clean install, getting stuck at "Create a computer ...
Use the other machine, you indicate that you have, to restore the M1 MacBook Pro M1 fully. You can find Apple's instructions on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found