Forum Discussion
GamerRoman22
2 years agoExplorer
FAIL_FORBIDDEN_PERMISSION Developer Hub error READ_PHONE_STATE Error
I have no other errors besides this one when I upload my build to the alpha production stage. The error says this: FAIL_FORBIDDEN_PERMISSION The upload could not be completed because your application contains the following Android permissions that are not supported: - android.permission.READ_PHONE_STATE Please remove the following permissions and upload your application binary again. The log says this:
2024-08-03T21:58:36.097Z [DEBUG] Run args: {"appId":"26165759013071717","apkPath":"C:\\Users\\rcper\\OneDrive\\Desktop\\Gorilla Flag First Version\\First Version.apk","channel":"ALPHA:quest2only|questproonly|quest3+","draft":true,"excludeAddons":false,"inheritAssetFiles":false,"isODH":true,"uploadFromEngine":false,"token":"(removed)","uploadConcurrency":null,"platform":"ANDROID_6DOF","disableProgressBar":true}
2024-08-03T21:58:36.367Z [DEBUG] Server log: {"app_id":"26165759013071717","client":"ODH","log_level":"DEBUG","event_name":"COMMAND_PARAMS","stack_trace":"at Object._log (C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js)\nat Object.debug (C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js)\nat C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js\nat processTicksAndRejections (node:internal/process/task_queues:96:5)","extra":"{\"appId\":\"26165759013071717\",\"apkPath\":\"C:\\\\Users\\\\rcper\\\\OneDrive\\\\Desktop\\\\Gorilla Flag First Version\\\\First Version.apk\",\"channel\":\"ALPHA:quest2only|questproonly|quest3+\",\"draft\":true,\"excludeAddons\":false,\"inheritAssetFiles\":false,\"isODH\":true,\"uploadFromEngine\":false,\"token\":\"(removed)\",\"uploadConcurrency\":null,\"platform\":\"ANDROID_6DOF\",\"disableProgressBar\":true,\"os\":\"{\\\"platform\\\":\\\"win32\\\",\\\"arch\\\":\\\"x64\\\",\\\"type\\\":\\\"Windows_NT\\\"}\",\"cli_version\":\"1.98.0.000001\",\"compatibility_version\":2,\"session_id\":\"26165759013071717_2024-08-03T21:58:36.095Z\",\"command\":\"upload-quest-build\",\"app_id\":\"26165759013071717\"}","platform":"ANDROID_6DOF","cli_version":"1.98.0.000001","session_id":"26165759013071717_2024-08-03T21:58:36.095Z","binary_id":"","duration":null,"is_patch_upload":0,"duration_since_session_start":271}
2024-08-03T21:58:37.552Z [WARN]
🟡 WARNINGS:
• Quest 1 support is automatically disabled for apps created after 04/30/2024. Please refer to this post for more details: https://developer.oculus.com/blog/changes-coming-quest-1-2023-meta/
• Your manifest includes the following permissions restricted by Oculus:
- android.permission.WRITE_EXTERNAL_STORAGE
- android.permission.READ_EXTERNAL_STORAGE
- android.permission.READ_MEDIA_AUDIO
- android.permission.READ_MEDIA_VIDEO
- android.permission.READ_MEDIA_IMAGES
- android.permission.ACCESS_MEDIA_LOCATION
- android.permission.READ_MEDIA_IMAGE
Please remove these permissions if they are not needed by your application. If they are needed, you must include justification in the “Notes for the Reviewer” field when submitting your application for review. Failure to provide justification will result in the rejection of your application.
• This app contains both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) libraries. This consumes extra storage and increases download times. Consider updating your build to target 64-bit only.
2024-08-03T21:58:37.552Z [ERROR] Server log: {"app_id":"26165759013071717","client":"ODH","log_level":"ERROR","event_name":"UPLOAD_PREVALIDATION_FAILURE","stack_trace":"at Object._log (C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js)\nat Object.error (C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js)\nat C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js\nat processTicksAndRejections (node:internal/process/task_queues:96:5)","extra":"{\"errors\":[\"The upload could not be completed because your application contains the following Android permissions that are not supported:\\n - android.permission.READ_PHONE_STATE\\nPlease remove the following permissions and upload your application binary again.\"],\"warnings\":[\"Quest 1 support is automatically disabled for apps created after 04/30/2024. Please refer to this post for more details: https://developer.oculus.com/blog/changes-coming-quest-1-2023-meta/\",\"Your manifest includes the following permissions restricted by Oculus:\\n - android.permission.WRITE_EXTERNAL_STORAGE\\n - android.permission.READ_EXTERNAL_STORAGE\\n - android.permission.READ_MEDIA_AUDIO\\n - android.permission.READ_MEDIA_VIDEO\\n - android.permission.READ_MEDIA_IMAGES\\n - android.permission.ACCESS_MEDIA_LOCATION\\n - android.permission.READ_MEDIA_IMAGE\\nPlease remove these permissions if they are not needed by your application. If they are needed, you must include justification in the “Notes for the Reviewer” field when submitting your application for review. Failure to provide justification will result in the rejection of your application.\",\"This app contains both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) libraries. This consumes extra storage and increases download times. Consider updating your build to target 64-bit only.\"],\"time\":549,\"os\":\"{\\\"platform\\\":\\\"win32\\\",\\\"arch\\\":\\\"x64\\\",\\\"type\\\":\\\"Windows_NT\\\"}\",\"cli_version\":\"1.98.0.000001\",\"compatibility_version\":2,\"session_id\":\"26165759013071717_2024-08-03T21:58:36.095Z\",\"command\":\"upload-quest-build\",\"app_id\":\"26165759013071717\",\"platform\":\"ANDROID_6DOF\"}","platform":"ANDROID_6DOF","cli_version":"1.98.0.000001","session_id":"26165759013071717_2024-08-03T21:58:36.095Z","binary_id":"","duration":549,"is_patch_upload":0,"duration_since_session_start":1456}
2024-08-03T21:58:37.793Z [ERROR]
:cross_mark: ERROR:
• The upload could not be completed because your application contains the following Android permissions that are not supported:
- android.permission.READ_PHONE_STATE
Please remove the following permissions and upload your application binary again.
2024-08-03T21:58:37.793Z [ERROR] Server log: {"app_id":"26165759013071717","client":"ODH","log_level":"ERROR","event_name":"USER_ERROR","stack_trace":"UserVisibleError: • The upload could not be completed because your application contains the following Android permissions that are not supported:\n - android.permission.READ_PHONE_STATE\nPlease remove the following permissions and upload your application binary again.\n at C:\\snapshot\\D_Zfull-fbsource\\edenfs\\redirections\\arvr\\js\\temp\\build-ovr-platform-util\\lib\\ovr_platform_util.js\n at processTicksAndRejections (node:internal/process/task_queues:96:5)","extra":"{\"error\":\"• The upload could not be completed because your application contains the following Android permissions that are not supported:\\n - android.permission.READ_PHONE_STATE\\nPlease remove the following permissions and upload your application binary again.\",\"os\":\"{\\\"platform\\\":\\\"win32\\\",\\\"arch\\\":\\\"x64\\\",\\\"type\\\":\\\"Windows_NT\\\"}\",\"cli_version\":\"1.98.0.000001\",\"compatibility_version\":2,\"session_id\":\"26165759013071717_2024-08-03T21:58:36.095Z\",\"command\":\"upload-quest-build\",\"app_id\":\"26165759013071717\",\"platform\":\"ANDROID_6DOF\"}","platform":"ANDROID_6DOF","cli_version":"1.98.0.000001","session_id":"26165759013071717_2024-08-03T21:58:36.095Z","binary_id":"","duration":null,"is_patch_upload":0,"duration_since_session_start":1697}
Thank you for your time.
Yes, there seems to be a change on Unity 2022.3.xx in one of the latest lts version that seems to add that permision.
To fix it you can modify for AndroidManifest in your project (search for it) and at the bottom, just before the </manifest> tag, add the following line:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />you will need to add the tools at the top of the manifest... like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" xmlns:tools="http://schemas.android.com/tools">with that change it will remove that permision at build time.
16 Replies
- DigibixMember
Yes, there seems to be a change on Unity 2022.3.xx in one of the latest lts version that seems to add that permision.
To fix it you can modify for AndroidManifest in your project (search for it) and at the bottom, just before the </manifest> tag, add the following line:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />you will need to add the tools at the top of the manifest... like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" xmlns:tools="http://schemas.android.com/tools">with that change it will remove that permision at build time.
- GamerRoman22Explorer
This did not work. Every time I try to edit the manifest files, (there are 13 of them) the files regenerate or restore themselves to their original state. I have looked at all of them.
Thank you for responding so quickly.
- GamerRoman22Explorer
Never mind it worked (I was on the wrong file) I have been trying to get this game up for so long... So I just wanted to thank you so much for this. I am so happy that I can finally just make my game.
Thank you so much for your quick response and helpful answer.
- GamerRoman22Explorer
IF ANYONE NEEDS TO KNOW: THE CORRECT MANIFEST IS LOCATED HERE: APPNAME\Library\Bee\Android\Prj\IL2CPP\Gradle\launcher\src\main
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 7 months ago
- 3 years ago