Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bare] [expo-permissions] Give a more descriptive error warning when an unrecognized permission is found #8466

Closed
jarvisluong opened this issue May 25, 2020 · 4 comments

Comments

@jarvisluong
Copy link
Contributor

馃悰 Bug Report

Running in a bare workflow app and I installed expo-permissions together with expo-camera. Trying to build an app which ask for camera permission and audio recording permission but when I call Permission.getAsync, I got Error: unrecognized permission: audio recording.

After a big of digging through expo's source code, I see that I need to install the package which will handle the permission stuff since each of them will call [UMPermissionsMethodsDelegate registerRequesters: withPermissionsManager:] in their module registry register (the similar requirement also applies in android side).

So I propose that we can improve the error message to be something like:

Error: unrecognized permission <permission>, please install and link <the package>, see more at <the link>

I can happily make a PR regarding this! Please give your thought!

@lukmccall
Copy link
Contributor

Hi @jarvisluong, I think this a good idea. It'll be so nice if you make this PR ;)

If you have any problems or questions, let me know. I'll try to help you.

@jarvisluong
Copy link
Contributor Author

Right on, will make the PR soon!

@lukmccall
Copy link
Contributor

Right on, will make the PR soon!

When you're finished, add me as a reviewer ;)

@jarvisluong
Copy link
Contributor Author

closed because #8546 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants