New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ SDK 36 ] Permissions.askAsync(Permissions.LOCATION) -> Unrecognized permission #6533
Comments
Hi @GuillaumeSarfati, could you provide your |
Hello @lukmccall, I have the exact same issue on Camera, Camera Roll , it's working fine if I migrate to the new API.
{
"expo": "^36.0.0",
"expo-apple-authentication": "^2.0.0",
"expo-asset": "~8.0.0",
"expo-av": "~8.0.0",
"expo-blur": "~8.0.0",
"expo-camera": "~8.0.0",
"expo-constants": "~8.0.0",
"expo-contacts": "~8.0.0",
"expo-facebook": "~8.0.0",
"expo-file-system": "^8.0.0",
"expo-font": "~8.0.0",
"expo-image-picker": "~8.0.0",
"expo-linear-gradient": "~8.0.0",
"expo-local-authentication": "~8.0.0",
"expo-location": "~8.0.0",
"expo-sms": "~8.0.0",
"expokit": "36.0.0"
} |
Thank you for more information. Could you also provide me with your |
And is that exactly the error message you get?
|
Yes exactly, I edit my message above, the bigger problem for me now is that I have the same issue with the Notifications and I don't see the new API in the doc
import * as Permissions from 'expo-permissions';
// ....
async componentDidMount() {
try {
const permission = await Permissions.askAsync(Permissions.NOTIFICATIONS);
// ...
} catch (e) {
console.log(e);
}
}
// ... Result : [Error: Unrecognized permission: (
notifications
)] |
It's pretty weird because your result looks like
You can try clean node modules and cache:
Notifications, for now, don't have a new API. |
@lukmccall Same result, I make a fresh app and I eject it, lets keep in touch |
@lukmccall working like a charm from a fresh app...... I miss something... Do you have some advises ? |
Please, try running your project with |
Ok Thank you so much @lukmccall, react-native-unimodules wasn't 0.7.0 ! |
I have What else can be done?
|
I even checked sources and don't see if it supports other permissions except Notification https://stackoverflow.com/questions/59541610/expo-permissions-error-unrecognized-persmission-location |
Hi @vvscode, please check #6682 (comment) |
@lukmccall thanks, already discovered the same. It worth to add this point to the doc |
Hello, I make the migration from SDK 35 to the SDK 36, I don't know why but when I ask for location I have this error :
Is this possible that the permission location was rename to split the behavior always/whenInUse ?
Edit : Its working now with Location.requestPermissionsAsync() but I thought the old permission API was always available no ? The example in the doc need to be update maybe
Environment
Expo CLI 3.11.1 environment info:
System:
OS: macOS 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.12.1 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
expo: ^36.0.0 => 36.0.0
react: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
react-navigation: ^4.0.6 => 4.0.10
npmGlobalPackages:
expo-cli: 3.11.1
The text was updated successfully, but these errors were encountered: