web-server-chrome icon indicating copy to clipboard operation
web-server-chrome copied to clipboard

Turning on https breaks the app

Open ethanaobrien opened this issue 4 years ago • 3 comments

I am on chrome os, and I do not have any of these problems. I installed google chrome stable in linux (beta) and found the problem.

Error handling response: TypeError: Error in invocation of sockets.tcpServer.listen(integer socketId, string address, integer port, optional integer backlog, function callback): No matching signature.
    at WebApplication.onServerSocket (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/webapp.js:380:38)

and this (After upgrading to react 17.0.2)

Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components
    at input
    at div
    at InputBase (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:14563:30)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at Input (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:13965:32)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at div
    at FormControl (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:10583:24)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at TextField (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:30436:28)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at div
    at AppOption (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/react-ui/nojsx/options.js:14:3)
    at div
    at CardContent (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:5005:23)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at div
    at Paper (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:19955:23)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at Card (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:4677:23)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at div
    at Container (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:7201:23)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)
    at ThemeProvider (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:48846:24)
    at div
    at App (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/react-ui/nojsx/index.js:170:5)
    at WithStyles (chrome-extension://ofhbbkphhbklhfoeikjpcbhemlocgigb/assets/bundle.js:50297:31)

I think the problem is that the https setting restarts the server too quickly

@mumme74

ethanaobrien avatar Apr 29 '21 14:04 ethanaobrien

I was correct, turning off the feature to restart the web server when https changed fixed the option

Anyone who wants to download the fix, here it is: https://drive.google.com/file/d/12Ewzalvx5ZMdleWcGnms4XFnHWC4j65_/view?usp=sharing

Load unpacked from chrome://extensions

#264 - My pull request that fixes this

ethanaobrien avatar Apr 29 '21 14:04 ethanaobrien

How does it fix it? Adds a longer wait/delay? It would be helpful if you could point to the commits that fixed it

kzahel avatar May 05 '21 08:05 kzahel

@kzahel Sorry, I should have included that. When the https option is changed, the code will turn it off and immediately back on. This causes the web server to attempt to turn on while it is still turning off. I fixed this by removing the auto turn back on feature, to where it only automatically turns off

The commit that fixes it is the one labeled Fix #263 (I typed the number wrong when I was typing.)

ethanaobrien avatar May 05 '21 13:05 ethanaobrien