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

unable to access GUI after update #54

Open
gargamelonly opened this issue Dec 24, 2020 · 11 comments
Open

unable to access GUI after update #54

gargamelonly opened this issue Dec 24, 2020 · 11 comments

Comments

@gargamelonly
Copy link

gargamelonly commented Dec 24, 2020

I have updated to latest version, reinstalled over existing installation.
Running openHAB. The port 3000 is occupied by Grafana.
Kept the same local.json config as before with port 3030 assigned to GUI.
I am able to see the logs in port 3001, identifying the device and existing commands.
Commands are sent and run ok. Still the GUI on port 3030 is not accessible.
It worked ok before the update.

@gargamelonly
Copy link
Author

It looks like the webserver does not even start.
Please help resolve this issue.

@gargamelonly
Copy link
Author

[10:45:18] openhabian@openHABianPi:~/broadlink-mqtt-bridge$ node index.js
/home/openhabian/broadlink-mqtt-bridge/index.js:1
import { exec } from 'child_process';
       ^

SyntaxError: Unexpected token {
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

@gargamelonly
Copy link
Author

Also does not work on a clean install.

@miguelbueno
Copy link

Same here. In a brand new install on Rasp4

@melkati
Copy link

melkati commented Jan 6, 2021

Same thing here on Rasp3

@fbacker
Copy link
Owner

fbacker commented Jan 6, 2021

Might be because the 'new' autoinstaller doesn't install in the old path. You would need to goto the folder cd /srv/openhab2-conf/ before running the auto installer.

https://github.com/fbacker/broadlink-mqtt-bridge/wiki/Installation

I've no real release cycles of good way of making 'major' releases :( hopefully this will solve the issue. I'm planning of making better docker releases and then removing this auto installer in the future.

@mtzro2003
Copy link

I had the same problem... GUI not responding on port 3000.
I noticed in the log that the GUI is

Listen on ip 127.0.0.1

So, I modified the src/web.js changing

class WebserverClass {
  constructor() {
    this.host = isDocker() ? '0.0.0.0' : '127.0.0.1';
    logger.info(`Listen on ip ${this.host}`);

to

class WebserverClass {
  constructor() {
    this.host = '0.0.0.0';
    logger.info(`Listen on ip ${this.host}`);

@gargamelonly
Copy link
Author

I had the same problem... GUI not responding on port 3000.
I noticed in the log that the GUI is

Listen on ip 127.0.0.1

So, I modified the src/web.js changing

class WebserverClass {
  constructor() {
    this.host = isDocker() ? '0.0.0.0' : '127.0.0.1';
    logger.info(`Listen on ip ${this.host}`);

to

class WebserverClass {
  constructor() {
    this.host = '0.0.0.0';
    logger.info(`Listen on ip ${this.host}`);

Does not resolve the issue for me.

@Astral0
Copy link

Astral0 commented Jan 20, 2021

The problem is localised in commit cabd581

And the solution is to revert the line 302 of file src/web.js to its previous state :

this.server.listen(config.settings.gui.port, this.host, () => {

replace by :
this.server.listen(config.settings.gui.port, () => {

Regard

@gargamelonly
Copy link
Author

The problem is localised in commit cabd581

And the solution is to revert the line 302 of file src/web.js to its previous state :

this.server.listen(config.settings.gui.port, this.host, () => {

replace by :
this.server.listen(config.settings.gui.port, () => {

Regard

That is correct.
I modified the file and now it works.

@gargamelonly
Copy link
Author

Please help...
Upgraded to an RPI4 and did a new auto install.
Now nothing is working again. Throwing different errors in index.js, service crash, does not start.
Latest Bullseye OS installed.
NPM version 7.5.2
Node version v12.22.5

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

No branches or pull requests

6 participants