Skip to content

Bug: react-devtools error when KEY and CERT are provided, SSL not usable #19338

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
digicide opened this issue Jul 13, 2020 · 7 comments
Closed

Comments

@digicide
Copy link

SSL is not usable because key and cert options are added to an uninitialized options object.

Line 149 of react-devtools/app.html reads 'let options;'
Line 154 and 155 begin with 'options.cert = …'

In every case, this throws an error and enters the catch block.

React version: 16.5.2
react-devtools version: 4.8.1

Steps To Reproduce

  1. on command line, execute
    KEY=react-devtools-ssl-key.pem CERT=react-devtools-ssl-cert.pem ./node_modules/react-devtools/bin.js

Regardless of whether the key and cert are valid, the error "Cannot set property 'key' of undefined" is thrown.

@digicide digicide added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Jul 13, 2020
@digicide
Copy link
Author

I was able to fix this by changing line 149 in my local copy to:
let options = {};

@bvaughn
Copy link
Contributor

bvaughn commented Jul 13, 2020

cc @ittaibaratz Interested in picking this one up?

OR @digicide, want to submit a fix? :)

@bvaughn bvaughn added Component: Developer Tools good first issue Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jul 13, 2020
@ittaibaratz
Copy link
Contributor

@digicide's fix sounds good to me - I'll submit a PR shortly.

@bvaughn
Copy link
Contributor

bvaughn commented Jul 13, 2020

Looks like a PR already got submitted #19336

@ittaibaratz
Copy link
Contributor

cc @ittaibaratz Interested in picking this one up?

OR @digicide, want to submit a fix? :)

Actually, there's already a PR that fixes a slightly different way - https://github.com/facebook/react/pull/19336/files

@bvaughn
Copy link
Contributor

bvaughn commented Jul 13, 2020

Sorry for the inconvenience here. Will probably publish a release in the morning.

@bvaughn bvaughn closed this as completed Jul 13, 2020
@bvaughn
Copy link
Contributor

bvaughn commented Jul 15, 2020

Version 4.8.2 has just been published to NPM with a fix for this issue.

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

No branches or pull requests

3 participants