question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get no response when running on Ubuntu 20.04

See original GitHub issue

Hi, Trainset team! I’m raising this issue for some guidance about how to deploy it locally. I’m testing it on a Ubuntu 20.04 instance. Following I gathered the behaviour I see when testing the commands on the README.md doc.

I’ve tested all mayor versions of npm from 3.0.0 to the 6.0.0, including 6.4.1. Of course respecting the version for nodejs --> 10.15.1

When running npm run build --report it states that it’s listening on port 8888 but is not reachable. Checked for open ports in the instance and the port 8888 was effectively open, and the app listening on such port but it didn’t through any response when sending get requests. This is the output when running npm run build --report:

> trainset@1.0.0 build /home/ubuntu/trainset
> node build/build.js

⠏ building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
⠙ building for production...Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Use Ctrl+C to close it
Hash: e9d1a797449fe90274d1
Version: webpack 4.44.1
Time: 18566ms
Built at: 02/13/2021 1:17:07 PM
                                Asset       Size  Chunks                                Chunk Names
         app.e9d1a797449fe90274d1.css    178 KiB       0  [emitted] [immutable]         app
                           index.html  718 bytes          [emitted]
                      static/.gitkeep    0 bytes          [emitted]
                   static/favicon.ico   16.6 KiB          [emitted]
           static/files/colorlist.csv  134 bytes          [emitted]
     static/files/sample_trainset.csv    242 KiB          [emitted]
static/js/app.269d873e8b157dec6fc2.js    573 KiB       0  [emitted] [immutable]  [big]  app
             static/trainset_logo.png     44 KiB          [emitted]
Entrypoint app [big] = app.e9d1a797449fe90274d1.css static/js/app.269d873e8b157dec6fc2.js

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  static/js/app.269d873e8b157dec6fc2.js (573 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  app (751 KiB)
      app.e9d1a797449fe90274d1.css
      static/js/app.269d873e8b157dec6fc2.js


WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

  Build complete.

  Tip: built files are meant to be served over an HTTP server.
  Opening index.html over file:// won't work.

Running npm run dev to test it on port 8080 doesn’t work. When I telnet to port 8080 it can establish the connection temporarily but it’s closed by the host immediately. This is the output when running npm run dev:

 DONE  Compiled successfully in 6566ms                                                                                                              1:36:26 PM

 I  Your application is running here: http://localhost:8080

Output when running npm run start:

root@ip-10-35-35-69:/home/ubuntu/trainset# npm run start

> trainset@1.0.0 start /home/ubuntu/trainset
> node server.js

Listening on port 5000

If I run a telnet on port 5000 I can reach it but when sending get requests to such port it’s not able to respond properly and this output is shown on the session where I’m running npm run start:

Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/ubuntu/trainset/node_modules/send/index.js:390:13)
    at SendStream.send (/home/ubuntu/trainset/node_modules/send/index.js:617:10)
    at onstat (/home/ubuntu/trainset/node_modules/send/index.js:729:10)
    at FSReqWrap.oncomplete (fs.js:155:5)

Probably there are steps that I’m missing. I would like to understand what I’m doing wrong here and based on the outcome I can help building a more detailed documentation. Thanks in advance for your time.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cristiancevascocommented, Mar 1, 2021

That might work. I’ll also try it out on macOS. Thanks again for you answer. Best regards.

0reactions
daterdotscommented, Mar 1, 2021

the most extensively we have tested it is on MacOS running Chrome or Safari. The app runs entirely without access to the internet. The hosted version is just to get the app. You could load the page, then airgap your machine, do whatever you need to do (it will work fine), then close the page before reconnecting to the network. Would that work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ubuntu 20.04 terminal is not responding - command line
I have seen this question but no solution works as I can't enter command at all. Terminal is just there, doing nothing. I...
Read more >
How to fix non-responsive Ubuntu system?
Sometimes, the system does not have any response with mouse and keyboard. Is there any way to solve this problem except hitting the...
Read more >
WSL don't start, don't open and don't answer #5836 - GitHub
If I try to run any command like wsl.exe or wsl -l -v, etc, nothing happens either, just keeps like it's waiting for...
Read more >
Upgrade Ubuntu desktop
Getting ready to upgrade. Before proceeding ensure that your software is up to date by running: sudo apt update sudo apt upgrade. From...
Read more >
Installer hang when installing Matlab R2021b as root on ...
I have now downloaded MATLAB R2021b and the Installer hang when installing Matlab R2021b as root on Ubuntu 20.04, the command sudo ./install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found