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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native run-windows hangs at "Installing new version of the app" #3190

Closed
dstaley opened this issue Sep 24, 2019 · 10 comments
Closed

react-native run-windows hangs at "Installing new version of the app" #3190

dstaley opened this issue Sep 24, 2019 · 10 comments

Comments

@dstaley
Copy link

dstaley commented Sep 24, 2019

Environment

  1. react-native -v: react-native-cli: 2.0.1, react-native: 0.59.10
  2. npm ls rnpm-plugin-windows: rnpm-plugin-windows@0.2.11
  3. npm ls react-native-windows: react-native-windows@0.59.0-vnext.190
  4. node -v: v12.10.0
  5. npm -v: 6.10.3
  6. yarn --version: N/A

Then, specify:

  • Target Platform Version(s): 10.0.18362
  • Target Device(s): Desktop
  • Visual Studio Version: Visual Studio 2019
  • Build Configuration: Debug

Steps to Reproduce

(Write your steps here:)

  1. Inside a new, fresh project run react-native run-windows.

Expected Behavior

The application launches.

Actual Behavior

The build doesn't progress past "Installing new version of the app".

image

Reproducible Demo

This is running the default template, so no custom code.

Additional context

(Write any other additional context that may help in root causing the issue.)
image

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Sep 24, 2019
@chrisglein chrisglein added must-have p1 and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Sep 30, 2019
@chrisglein chrisglein added this to the vNext Milestone 3 milestone Sep 30, 2019
@chrisglein
Copy link
Member

@ddalp A number of us have also seen this. Definite road bump for new developers to the platform... and old ones too. Can you take a poke and see what you can find?

@FyLMartin
Copy link

@chrisglein - Just started trying to add windows support to an existing React Native app and ran into this. Is there a workaround while we're waiting for the next version?

@acoates-ms
Copy link
Contributor

If you launch the solution file in visual studio, (windows/*.sln) Then hit F5 in there, it should build and install your app. Then you just need to use npm run start to boot the packager from your command line, and you can use F5 to install / boot your app.

@FyLMartin
Copy link

@acoates-ms - thanks! Turns out my work image is also getting in the way of the C++ build tools, so I'll need to chase that down as well, but didn't know that until I got into Visual Studio.

@savatia
Copy link
Member

savatia commented Oct 10, 2019

@dstaley and @FyLMartin This might have to do with Powershell being stuck in the deployment script waiting for user input to create an elevated command prompt in order to install the project in the PC certificate. Can you run react-native run-windows --logging and dump the output?

@dstaley
Copy link
Author

dstaley commented Oct 10, 2019

@savatia Looks like you're exactly right!

√ Building Solution
 √ Starting the React-Native Server                                                                                     √ Removing old version of the app                                                                                      Found package: C:\Users\stale\Documents\windemo\windows\windemo\AppPackages\windemo_1.0.0.0_x86_Debug_Test\windemo_1.0.0.0_x86_Debug.appx
Found certificate: C:\Users\stale\Documents\windemo\windows\windemo\AppPackages\windemo_1.0.0.0_x86_Debug_Test\windemo_1.0.0.0_x86_Debug.cer

Before installing this app, you need to do the following:
        - Install the signing certificate
Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.
Press Enter to continue...:

After pressing Enter to launch the elevated prompt and installing the certificate, I was able to successfully run the app.

@acoates-ms
Copy link
Contributor

Looks like we should ensure that that part of the output shows even when not using the --logging arg.

@FyLMartin
Copy link

@savatia - wanted to confirm I'm seeing the same prompt for installing the certificate. good catch!

@ddalp
Copy link
Contributor

ddalp commented Oct 16, 2019

There are two issues here:

  1. If the develop mode is not enabled, the first time installing the app will have a "Press Enter to continue" prompt which is suppressed if we don't run with --logging option, and that is why it is hang.
  2. We should by default use -force to force the certificate installation without prompt.

@ddalp
Copy link
Contributor

ddalp commented Oct 22, 2019

Fix checked in and verified.

@ddalp ddalp closed this as completed Oct 22, 2019
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

6 participants