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

network error #128

Closed
niekvlessert opened this issue Nov 16, 2019 · 19 comments
Closed

network error #128

niekvlessert opened this issue Nov 16, 2019 · 19 comments
Labels
bug Something isn't working

Comments

@niekvlessert
Copy link

Maybe I'm causing this issue myself but I have a network error when accessing the webgui for the first time. Just followed the instructions, download a relase.zip, npm install, npm run start. Nothing special. Then when visiting the webinterface it says network error, that's it, no wizard. The raspberry Pi 3b I'm running this one has internet, as well as my mac. Tried different browsers. Any tips?

Running on Raspberry Pi 3b with Raspbian 10 and nodejs 13.1.0.

@niekvlessert
Copy link
Author

niekvlessert commented Nov 16, 2019

I now discovered the console gives a connection error to 127.0.0.1. So I did a ssh -L 3000:localhost:3000 and not it works...

@srvrguy
Copy link

srvrguy commented Nov 18, 2019

If you get the page that says "Whoops! We lost your server connection" you can enter in the IP of the remote system and that will solve the issue. This information is saved in local storage in the browser, so you will need to do that again if you connect from a different browser or different computer.

@niekvlessert
Copy link
Author

I'm not aware of that message & option. I just see the google speaker speaking animation with network error in the top, no options afaik.

@808Boss
Copy link

808Boss commented Nov 19, 2019

i'm receiving the same error message. What can i do? I included a sceenshot.
Schermafbeelding 2019-11-19 om 19 05 47

@Mallinanga
Copy link

Same here

@ryancasler
Copy link
Contributor

ryancasler commented Nov 19, 2019

You should try with node v10. That's the version that was used for development. Also, are you accessing the dashboard from the same subnet that the GAR server is on?

@niekvlessert
Copy link
Author

niekvlessert commented Nov 19, 2019

Well, as I said you could make an ssh tunnel to get it working. It's a work around and I just noticed that's it also needed after the initial setup. When having that it works fine with the new node version... should be doable to fix. Yeah, on the same subnet.
ssh -L 3000:localhost:3000 <user>@<server ip>

@niekvlessert
Copy link
Author

niekvlessert commented Nov 19, 2019

I've been trying to debug it, I can't get find out how it works since my knowledge of this pm2 and stuff is too limited, my changes to js files are simply being ignored for some reason. Usercount is the first one that goes wrong; probably this in routes/server.js;
router.post('/userCount',async(req, res) => {

But as long as I can't edit them...

@niekvlessert
Copy link
Author

It's a webpack thing. Since @greghesp tells us to download the release instead of the sources I'm not sure how he generates the webpack files. Any tips on that?

@greghesp
Copy link
Owner

greghesp commented Nov 19, 2019

The UI is build using CRA. If you've downloaded the source code, you can build the UI using npm run build, or hotload it for development using npm run start.

As for the server in development, you can run that for development using npm run dev.

I'll have a look tomorrow to see if I can debug this. I've not had this error myself but might be because I'm developing in the same system it's running in.

What it's supposed to do is check localhost to see if it can connect to the server. If it fails, then it should ask you to confirm the IP.
Obviously something isn't handling the errors quite right

@greghesp greghesp added the bug Something isn't working label Nov 19, 2019
@niekvlessert
Copy link
Author

The source does not include a package.json, where to get that? I might better wait for you...

@greghesp
Copy link
Owner

@niekvlessert
Copy link
Author

Right, I wasn't looking in subdirectories... ;P

@greghesp
Copy link
Owner

Ah yes. The server runs Express, and the Client is React. To build the release, I have to move the built client files into the express server to host it. Hopefully that makes sense

@niekvlessert
Copy link
Author

Sure. :) I tried the source code, but my Raspberry Pi is not really up to the task, I'm willing to install a VM to test it more if needed, but it's not very hard to reproduce the issue; just start the release.zip version somewhere and visit it from another host.

@greghesp
Copy link
Owner

Ah found the bug. My fault, commented some stuff out when testing by mistake. Will fix shortly

@greghesp
Copy link
Owner

@niekvlessert
Copy link
Author

I realised I didn't thank you; so thanks for fixing this. :)

@am9magic
Copy link

I am getting a client error, can someone help me on what is causing it.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants