natysoz / expo-images-picker

Multiple Asset Photos Videos selecting package for Expo SDK
MIT License
95 stars 35 forks source link

Permissions error, EXPO 43 #44

Closed anthonywebster closed 2 years ago

anthonywebster commented 2 years ago

Hi, I just updated the expo sdk to version 43 and now it doesn't work on android phone, it shows me the error message with the permissions. He asks me if I give permission to access the images etc, and I give him permission and then he shows me the message that permissions were not granted

{ "expo-images-picker": "^2.2.3", "expo-media-library": "~13.0.3", "expo": "^43.0.0", }

os: android version android: 11 brand: samsung

Screenshot_20211124-004930_InTactics

natysoz commented 2 years ago

can you share your whole package json ?

anthonywebster commented 2 years ago

yep.

{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@react-native-async-storage/async-storage": "~1.15.0", "@react-native-community/datetimepicker": "3.5.2", "@react-native-firebase/app": "^13.0.1", "@react-native-masked-view/masked-view": "0.2.5", "@react-navigation/bottom-tabs": "^6.0.5", "@react-navigation/drawer": "^6.1.6", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "@react-navigation/stack": "^6.0.7", "autoprefixer": "^10.3.1", "axios": "^0.23.0", "dotenv": "^10.0.0", "expo": "^43.0.0", "expo-app-loading": "~1.2.1", "expo-application": "~4.0.0", "expo-av": "~10.1.3", "expo-camera": "~12.0.3", "expo-constants": "~12.1.3", "expo-device": "~4.0.3", "expo-file-system": "~13.0.3", "expo-image-manipulator": "~10.1.2", "expo-image-picker": "~11.0.3", "expo-images-picker": "^2.2.3", "expo-linear-gradient": "~10.0.3", "expo-media-library": "~13.0.3", "expo-screen-orientation": "~4.0.3", "expo-status-bar": "~1.1.0", "expo-updates": "~0.10.15", "lodash": "^4.17.21", "mime": "^3.0.0", "moment": "^2.29.1", "postcss": "^8.3.6", "react": "17.0.1", "react-dom": "17.0.1", "react-is": "^16.8.0", "react-native": "0.64.3", "react-native-calendars": "^1.1269.0", "react-native-expo-fancy-alerts": "^2.1.0", "react-native-gesture-handler": "~1.10.2", "react-native-image-viewing": "^0.2.1", "react-native-modal-datetime-picker": "^13.0.0", "react-native-reanimated": "~2.2.0", "react-native-safe-area-context": "3.3.2", "react-native-screens": "~3.8.0", "react-native-table-component": "^1.2.1", "react-native-web": "0.17.1", "react-native-webview": "11.13.0", "sentry-expo": "^4.0.0", "styled-components": "^5.3.0", "tailwind-rn": "^3.0.1", "tailwindcss": "^2.2.7" }, "devDependencies": { "@babel/core": "^7.12.9", "@types/react": "~17.0.21", "@types/react-native": "~0.64.12", "typescript": "~4.3.5" }, "private": true }

anthonywebster commented 2 years ago

app.json

{ "expo": { "android": { "permissions": [ "CAMERA", "RECORD_AUDIO", "READ_EXTERNAL_STORAGE", "WRITE_EXTERNAL_STORAGE", "USE_BIOMETRIC", "VIBRATE" ], "versionCode": 9 }, } }

anthonywebster commented 2 years ago

Here you can see that the application asks my permission

Screenshot_20211125-010125_Permission controller

anthonywebster commented 2 years ago

I would appreciate your help, because I had already launched the application and with this update it stopped working

natysoz commented 2 years ago

hi sorry , well for me the last sdk 43 is working without any issues , i try to reproduce without any luck can u create an expo snack where the problem happens ?

anthonywebster commented 2 years ago

Hello, thank you very much for answering, I will try to create the snack expo. It works very well for me in the simulator and even with expo go, it does not give me any problem, but when the app is installed from google play it returns an error. I think it's not your library's problem, I think the problem is with expo directly because I've been seeing that there are many having problems with expo-media-library. I did a quick test using directly expo-media-library and I skipped the part of asking for permission and the photos were shown, if I ask for permission then it does not show me the images.

I found this: https://github.com/expo/expo/issues/15273

natysoz commented 2 years ago

ill investigate it further

natysoz commented 2 years ago

you are right im trying to fix this issue seems like if user already denied , and we cant ask for permissions again , we must show him a button that lead to app settings where he might allow it manually

andrey-grach commented 2 years ago

Exactly the same issue on Android in standalone app, btw button that should lead to app settings will not help because in app setings permissions allowed to use gallery.

andrey-grach commented 2 years ago

Hello, thank you very much for answering, I will try to create the snack expo. It works very well for me in the simulator and even with expo go, it does not give me any problem, but when the app is installed from google play it returns an error. I think it's not your library's problem, I think the problem is with expo directly because I've been seeing that there are many having problems with expo-media-library. I did a quick test using directly expo-media-library and I skipped the part of asking for permission and the photos were shown, if I ask for permission then it does not show me the images.

I found this: expo/expo#15273

Have you found a solution to this?

andrey-grach commented 2 years ago

you are right im trying to fix this issue seems like if user already denied , and we cant ask for permissions again , we must show him a button that lead to app settings where he might allow it manually

Actually I didn't deny ask for permissions, I allowed and in my app settings permissions allowed to use gallery.

Any solution to this?

anthonywebster commented 2 years ago

Unfortunately I haven't found the solution yet. @andrey-grach

MarouaniALA commented 2 years ago

Hi any luck here for this issue, same as on expo 44 permission granted but it shows the error message of permission denied

natysoz commented 2 years ago

hi we are waiting for sdk 45 ,

the permissions should work fine for SDK 43

daniel commented 2 years ago

I think I have the same problem. I recently released an upgrade of my app on Google Play, where I have upgraded to Expo 43 and now I have received 3 bug reports about this problem. I'm unable to reproduce it on my own Android phone or in simulators.

EDIT: I'm using "expo-image-picker" and not this library. I also noticed the message about Expo 45 in the README for this repo.

Andrew-Jang commented 2 years ago

Hi any updates to this issue?

natysoz commented 2 years ago

still waitin for sdk 45 ....

Andrew-Jang commented 2 years ago

I was able to fix the issue by using eas build instead of expo build!

On Tue, Apr 26, 2022 at 7:04 PM Natysoz @.***> wrote:

still waitin for sdk 45 ....

— Reply to this email directly, view it on GitHub https://github.com/natysoz/expo-images-picker/issues/44#issuecomment-1109603689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKRYR4A3VYH27N2EY2NBDVG65TJANCNFSM5IVJENZA . You are receiving this because you commented.Message ID: @.***>

-- 장동해

대표이사

버틱비 | (주)남산컴퍼니 010-6521-2302 | 010-3101-6825 @.*** www.namsancompany.com 서울특별시 퇴계로 18길 33, 504호 [image: linkedin] https://www.linkedin.com/in/andrew-jang-0/

andrey-grach commented 2 years ago

I was able to fix the issue by using eas build instead of expo build! On Tue, Apr 26, 2022 at 7:04 PM Natysoz @.> wrote: still waitin for sdk 45 .... — Reply to this email directly, view it on GitHub <#44 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKRYR4A3VYH27N2EY2NBDVG65TJANCNFSM5IVJENZA . You are receiving this because you commented.Message ID: @.> -- 장동해 대표이사 버틱비 | (주)남산컴퍼니 010-6521-2302 | 010-3101-6825 @.*** www.namsancompany.com 서울특별시 퇴계로 18길 33, 504호 [image: linkedin] https://www.linkedin.com/in/andrew-jang-0/

How? I have just tried with EAS build and still the same result users just cannot pick images...

natysoz commented 2 years ago

fixed with new version .

majirosstefan commented 2 years ago

If you are using Expo 44, and want to fix it in standalone / ejected apps, for us it was enough to add permissions into Android manifest like in this thread: https://github.com/expo/expo/issues/15273 and here https://github.com/natysoz/expo-images-picker/issues/58