Repository navigation
React Native in privileged processes #22721
Copy link
Copy link
Closed
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 7.65 GB / 32.00 GB
Shell: 5.5.1 - /usr/local/bin/zsh
Binaries:
Node: 10.8.0 - ~/.asdf/shims/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.2.0 - ~/.asdf/shims/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
Build Tools: 23.0.1, 25.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3
API Levels: 23, 25, 26, 28
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
Hi There! I checked stack overflow but this is a weird one!
I'm currently developing a system app for Android that will run React Native on the view layer. However, when adding:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:sharedUserId="android.uid.system" <-- this line
xmlns:tools="http://schemas.android.com/tools">
To the AndroidManifest.xml, I see the following error (on react-native run-android):
java.lang.UnsupportedOperationException: For security reasons, WebView is not allowed in privileged processes
When I build the app as a release, the error doesn't show, so I'm guessing the WebView it's talking about is some type of developer tool.
Scratch that - it appears to happen for debug and release builds.
Is there a way around this when developing a system app with React Native? Can I disable this tool?
Reproducible Demo
- Obtain the Platform keys for an Android AOSP Image
- Add the above line to the AndroidManifest.xml
- Setup Gradle to sign the debug build with the Platform keys, and ensure you're running the app on a device with the Android AOSP Image installed (that the platform keys correspond to)
- run
react-native run-android
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Activity
react-native-bot commentedon Dec 20, 2018
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The "⏪Old Version" label will be removed automatically once you edit your original post with the results of running
react-native infoon a project using the latest release.vovkasm commentedon Dec 20, 2018
Well, I think when react-native-community/discussions-and-proposals#3 will be implemented and then WebView core component will be removed you will be allowed to use stock RN code. Until that you only option is fork RN code and remove all references to WebView manually (AFAIK).
react-native-bot commentedon Jan 4, 2019
I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.
If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.