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

feat: fallback to default browser if Chrome is not found #612

Merged

Conversation

thecodrr
Copy link
Contributor

@thecodrr thecodrr commented Aug 4, 2019

Summary:

It can be annoying for users (like me) who do not have Google Chrome installed to enable 'Remote Debugging' only to receive an error. This rectifies that by falling back to the default installed browser making the whole experience more fluid.

Test Plan:

Tested on a sample app by enabling 'Remote Debugging'.

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flow is not happy

packages/cli/src/commands/server/launchDebugger.js Outdated Show resolved Hide resolved
@thymikee thymikee changed the title Fallback to default browser if Google Chrome is not found feat: fallback to default browser if Chrome is not found Aug 4, 2019
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the debugger actually work in other browsers?

Co-Authored-By: Michał Pierzchała <thymikee@gmail.com>
'https://www.google.com/chrome/',
)}`,
);
//fallback to default browser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space here before the inline command. I also think we can rid of that comment and rename the function to something like: launchDefaultBrowser

Copy link
Contributor Author

@thecodrr thecodrr Aug 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. @thymikee

Copy link
Member

@grabbou grabbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@thymikee thymikee merged commit c7de371 into react-native-community:master Aug 14, 2019
thymikee pushed a commit that referenced this pull request Aug 15, 2019
* feat: fallback to default browser if chrome not found

* refactor: make flow happy

* refactor: fix launchDebugger path

Co-Authored-By: Michał Pierzchała <thymikee@gmail.com>

* refactor: rename launchBrowser to launchDefaultBrowser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants