expo-image-picker-multiple
expo-image-picker-multiple copied to clipboard
New Expo SDK 42 breaks expo-image-picker-multiple
Hi,
In the new Expo SDK 42 the expo-permissions library was deprecated in expo SDK 42 in favor of module specific permissions (https://blog.expo.io/expo-sdk-42-579aee2348b6)
As a result, this breaks expo-image-picker-multiple because it's still based on expo-permissions.
Will there be an update in line with the expo-permissions deprecation for this expo-image-picker-multiple? When do you project this to be completed?
Thanks so much!
Having the same issue. Considering this feature is important for me, I have to go and pick another package although I like this one a lot! Shame...
Having the same issue. Considering this feature is important for me, I have to go and pick another package although I like this one a lot! Shame...
@asalha actually, you can simply follow the base code of this library and change the way permissions are requested. I did it quite quickly and it works.
@ShindoSensei you are right. I did it and it was a very quick fix indeed. Thanks
However, I am facing a problem with eas build. Even when using patch-package, it's still giving me error always in the same place. Locally it works fine, but not while making the bulid.
I would reccomend to downgrade an expo to 41.0.1
or to modify getPermissionsAsync
function.
In the 42.v you need to requestion permission through expo-image-picker
- link to expo ImagePicker doc
need update asap please.... i do not want to tweak code myself, i am not sure how it will effect on upgrading this module in the future if i tweak it myself.
I believe every one agrees its time to get patch done for this error.
If it's such a small fix, can anyone create a full request so that maintainer can review it and approve the changes please.
here is my error log:
iOS Bundling failed 2334ms
Unable to resolve module unimodules-permissions-interface from /Volumes/roshan_1T/MAC/Documents/del_test/bump_version/bumped_to_42/eKaa_app/node_modules/expo-image-picker-multiple/node_modules/expo-media-library/build/MediaLibrary.js: unimodules-permissions-interface could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
1 | import { EventEmitter, UnavailabilityError } from '@unimodules/core';
2 | import { Platform } from 'react-native';
> 3 | import { PermissionStatus, } from 'unimodules-permissions-interface';
| ^
4 | import MediaLibrary from './ExponentMediaLibrary';
5 | const eventEmitter = new EventEmitter(MediaLibrary);
6 | export { PermissionStatus };
Android Bundling failed 2513ms
Unable to resolve module unimodules-permissions-interface from /Volumes/roshan_1T/MAC/Documents/del_test/bump_version/bumped_to_42/eKaa_app/node_modules/expo-image-picker-multiple/node_modules/expo-media-library/build/MediaLibrary.js: unimodules-permissions-interface could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
1 | import { EventEmitter, UnavailabilityError } from '@unimodules/core';
2 | import { Platform } from 'react-native';
> 3 | import { PermissionStatus, } from 'unimodules-permissions-interface';
| ^
4 | import MediaLibrary from './ExponentMediaLibrary';
5 | const eventEmitter = new EventEmitter(MediaLibrary);
6 | export { PermissionStatus };
looks like: "expo-media-library": "^11.0.0", "expo-permissions": "^11.0.0", "expo-screen-orientation": "^3.0.0" needs to be upgraded to newer version to support expo sdk 42.
could the maintainer of this site upgrate it please ..... i would have done it and created a pull request but want it to be done my the team as they know this repo much better.
Hi,
In the new Expo SDK 42 the expo-permissions library was deprecated in expo SDK 42 in favor of module specific permissions (https://blog.expo.io/expo-sdk-42-579aee2348b6)
As a result, this breaks expo-image-picker-multiple because it's still based on expo-permissions.
Will there be an update in line with the expo-permissions deprecation for this expo-image-picker-multiple? When do you project this to be completed?
Thanks so much!
Having the same issue. Considering this feature is important for me, I have to go and pick another package although I like this one a lot! Shame...
@asalha actually, you can simply follow the base code of this library and change the way permissions are requested. I did it quite quickly and it works.
Hello Shindo sensei, you can simply follow the base code of this library and change the way permissions are requested. I did it quite quickly and it works.
can you please explain more ? i try to change as follow but still ng. imageBrowser.js original: const {status: camera} = await Permissions.askAsync(Permissions.CAMERA); const {status: cameraRoll} = await Permissions.askAsync(Permissions.MEDIA_LIBRARY); this.setState({ hasCameraPermission: camera === 'granted', hasCameraRollPermission: cameraRoll === 'granted' });
New: const {status: camera} = await Camera.requestPermissionsAsync(); const {status: cameraRoll} = await MediaLibrary.requestPermissionsAsync(); this.setState({ hasCameraPermission: camera === 'granted', hasCameraRollPermission: cameraRoll === 'granted' });
Hi, In the new Expo SDK 42 the expo-permissions library was deprecated in expo SDK 42 in favor of module specific permissions (https://blog.expo.io/expo-sdk-42-579aee2348b6) As a result, this breaks expo-image-picker-multiple because it's still based on expo-permissions. Will there be an update in line with the expo-permissions deprecation for this expo-image-picker-multiple? When do you project this to be completed? Thanks so much!
Having the same issue. Considering this feature is important for me, I have to go and pick another package although I like this one a lot! Shame...
@asalha actually, you can simply follow the base code of this library and change the way permissions are requested. I did it quite quickly and it works.
@ShindoSensei
Hello Shindo sensei, you can simply follow the base code of this library and change the way permissions are requested. I did it quite quickly and it works.
can you please explain more ? i try to change as follow but still ng. imageBrowser.js original: const {status: camera} = await Permissions.askAsync(Permissions.CAMERA); const {status: cameraRoll} = await Permissions.askAsync(Permissions.MEDIA_LIBRARY); this.setState({ hasCameraPermission: camera === 'granted', hasCameraRollPermission: cameraRoll === 'granted' });
New: const {status: camera} = await Camera.requestPermissionsAsync(); const {status: cameraRoll} = await MediaLibrary.requestPermissionsAsync(); this.setState({ hasCameraPermission: camera === 'granted', hasCameraRollPermission: cameraRoll === 'granted' });
Upgrade the Expo SDK to 44 (make sure you follow the instructions and read the documentation for each upgrade if you have skipped the update).
Open 'node_modules\expo-image-picker-multiple' on your terminal and run 'npm install react-native-unimodules'.
Note: the issue I have experienced was the unimodules was not found on this package, I am NOT sure if this will work on your end too.
The new version with fixes will be available later today. Thanks!
Hi @MonstroDev, it would be great if you could publish the fixes in npmjs as well :)
The new version with fixes will be available later today. Thanks!
hi @MonstroDev has the new version rolled out ?? , npmjs is still showing version 1.4.1
would appreciate if npmjs could be changed, or if you let us know how to do the upgrade in expo from git itself.... it new version has been fixed.
PS: I did install this package from github and was getting same error, however, i checked my json-lock and it seems, expo-screen-orientation dependency version 3.3.0 is installed for this package.
code from package.lock:
"node_modules/expo-screen-orientation": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/expo-screen-orientation/-/expo-screen-orientation-3.3.0.tgz", "integrity": "sha512-J+VSqaMw65UNjavhIVbSNV8suzx7CzbvuuaPxbyqTzPejjlpcLpTFImS28Px58OXTkcMPky72vrj4KynLKsUNA==", "dependencies": { "@expo/config-plugins": "^3.0.0" } },
this expo-screen-orientation is still using "@unimodules/core" module ... you can validate it inside nodemodule:
nodemoudle/ expo-screen-orientation > build> screenOrientation.js has line: import { EventEmitter, Platform, UnavailabilityError } from '@unimodules/core';
can we make the depedency "expo-screen-orientation": "~4.1.1", which does not use "@unimodules/core' instead uses : expo-modules-core
link to validate: https://github.com/expo/expo/blob/master/packages/expo-screen-orientation/src/ScreenOrientation.ts
since @unimodules/core is deprecated, could this be changed promptly please @MonstroDev
Hey all,
If you are running expo 45+ (which you need to do now to get expo apps into the App Store) you will need to modify the expo-screen-orientation to v4.2+
I forked this repo and added that, you can load it into your project like this:
yarn add expo-image-picker-multiple@https://github.com/bfarrgaynor/expo-image-picker-multiple
I will keep my repo running indefinitely, feel free to bake it into your project.
Thanks @bfarrgaynor that worked! @MonstroDev if by any chance you update this repo please let us know since we'd like to keep using the original repo as a way to give you credit! Thanks all!