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

"pxt serve" conflates hostname with network address #5360

Open
xobs opened this issue Mar 18, 2019 · 0 comments
Open

"pxt serve" conflates hostname with network address #5360

xobs opened this issue Mar 18, 2019 · 0 comments
Labels

Comments

@xobs
Copy link

xobs commented Mar 18, 2019

Bug Template

Describe the bug
The documentation for pxt serve lists a --hostname parameter that can be used to specify the hostname to listen for. This can be useful when running pxt serve in a Docker container, or in any form where a remote person may want to connect but the external hostname is different from the local hostname.

To Reproduce
Steps to reproduce the behavior:

  1. Map an external address to your host (for example, through Docker, or from behind a NAT)
  2. Give the external address a hostname
  3. Run pxt serve --hostname [external-hostname]
  4. See error

Expected behavior
The hostname is different from the bind address. The server should either have a separate flag for "bind address", or it should bind to "0.0.0.0".

Screenshots

[8:12:15 PM] D:/Code/makecode/pxt-chibitronics> pxt serve --hostname makecode-dev.xobs.io
Using target PXT/chibitronics with build engine platformio
  Target dir:   D:\Code\makecode\pxt-chibitronics
  PXT Core dir: D:\Code\makecode\pxt-chibitronics\node_modules\pxt-core
log strings: 34 files; 0 strings -> sim-strings.json
error TS6053: File 'D:/Code/makecode/pxt-chibitronics/node_modules/pxt-core/built/lib.dom.d.ts' not found.
error TS6053: File 'D:/Code/makecode/pxt-chibitronics/node_modules/pxt-core/built/lib.dom.iterable.d.ts' not found.
error TS6053: File 'D:/Code/makecode/pxt-chibitronics/node_modules/pxt-core/built/lib.es2015.d.ts' not found.
error TS6053: File 'D:/Code/makecode/pxt-chibitronics/node_modules/pxt-core/built/lib.scripthost.d.ts' not found.
error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.
building target.json in D:\Code\makecode\pxt-chibitronics...
building docs in libs/core
Package built; written to binary.hex; size: 0
generated _locales\core-strings.json; size=4168
generated _locales\core-jsdoc-strings.json; size=13819
building docs in libs/scope
Package built; written to binary.hex; size: 0
generated _locales\scope-strings.json; size=160
generated _locales\scope-jsdoc-strings.json; size=370
building libs/core
  skip native build of non-project
building libs/scope
  skip native build of non-project
building libs\blocksprj
target.json built.
building sim...
[run] cd sim; node ../node_modules/typescript/bin/tsc
building cmds...
[run] cd cmds; node ../node_modules/typescript/bin/tsc
building editor...
[run] cd editor; node ../node_modules/typescript/bin/tsc
watching D:\Code\makecode\pxt-chibitronics\node_modules\pxt-core, libs/core, libs/scope, theme, theme\site\globals, editor, sim, sim\public, sim\state, sim\visuals, sim, cmds, editor...
Starting server in D:\Code\makecode\pxt-chibitronics
With pxt core at D:\Code\makecode\pxt-chibitronics\node_modules\pxt-core
starting local ws server at 3233...
INTERNAL ERROR: Error: listen EADDRNOTAVAIL: address not available 132.147.96.146:3233
    at Server.setupListenHandle [as _listen2] (net.js:1239:19)
    at listenInCluster (net.js:1304:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1443:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:63:10)
[8:12:41 PM] D:/Code/makecode/pxt-chibitronics>

Additional context
This is work that's being done in order to share C++ changes with designers who do not have a pxt development environment installed.

@abchatra abchatra added the setup label Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants