Skip to content

Use web workflow port to connect to the board #37

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

Closed
Neradoc opened this issue Nov 15, 2022 · 5 comments · Fixed by #39
Closed

Use web workflow port to connect to the board #37

Neradoc opened this issue Nov 15, 2022 · 5 comments · Fixed by #39
Labels
bug Something isn't working Web Workflow

Comments

@Neradoc
Copy link
Contributor

Neradoc commented Nov 15, 2022

The web workflow doesn't take into account the board's port, and always tries to connect to 80.
When the board is configured uses a different port, it can't connect back to it. (CIRCUITPY_WEB_API_PORT)

Unable to connect. The device 192.168.1.92 was not found. Be sure it is plugged in and set up properly.

(from adafruit/circuitpython#7168 )

@makermelissa
Copy link
Collaborator

I was wondering about that, hence #29.

@makermelissa makermelissa added bug Something isn't working Web Workflow labels Nov 15, 2022
@Neradoc
Copy link
Contributor Author

Neradoc commented Nov 15, 2022

I swear I looked at the issues and missed it somehow 🤦

I'm not setup to test locally, would changing from location.hostname to location.host here do it ?

} else if (isMdns()) {
this.host = location.hostname;
} else if (isIp()) {
this.host = location.hostname;
}

@makermelissa
Copy link
Collaborator

makermelissa commented Nov 16, 2022

I was thinking of just setting up a couple of devices and changing the port to something besides 80 and seeing what happens when I go to http://circuitpython.local

@makermelissa
Copy link
Collaborator

The error message that the person is running into is thrown here: https://github.com/circuitpython/web-editor/blob/main/assets/js/workflows/web.js#L146. There are likely several places that need fixing for alternate ports to work.

@makermelissa
Copy link
Collaborator

I'm not setup to test locally, would changing from location.hostname to location.host here do it ?

Yep, that's basically the fix. For some reason I was thinking there was extra stuff in host (like the protocol), but after looking it up just now, that would have been better than my solution.

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

Successfully merging a pull request may close this issue.

2 participants