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

feat: allow specifying port in robot url, so that user could use port other than 31950 #11820

Open
arogozhnikov opened this issue Dec 4, 2022 · 11 comments
Labels
app Affects the `app` project easyfix Ticket is an easy fix; good for first time contributors feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping.

Comments

@arogozhnikov
Copy link

arogozhnikov commented Dec 4, 2022

Overview

solutions for tunneling like cloudflared and ngrok do not provide freedom to choose which port used to expose service:

tunnel.at.cloudflare.com:80 -> [opentrons]localhost:31950

Now, app needs only one port to be exposed, so I'm running an additional redirection to get it working:

[laptop]:localhost:31950 -> tunnel.at.cloudflare.com:80 

Now I can specify 127.0.0.1 as an address in opentrons app and it seems to work normally (robot is seen, I can operate with it).

Screen Shot 2022-12-03 at 7 27 49 PM

Side comment: Interestingly, it understands IP, but does not understand localhost.

I've tried to specify here both address and port (first line, partially covered name), but that does not work. Tried with http:https://, https:// and without protocol - no success.
That would be more convenient and more reliable than an additional SSH forward.

Importance: 3/5.

Implementation details

No response

Design

No response

Acceptance criteria

No response

@arogozhnikov arogozhnikov added the feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping. label Dec 4, 2022
@SyntaxColoring SyntaxColoring added the app Affects the `app` project label Dec 7, 2022
@koji

This comment was marked as off-topic.

@arogozhnikov

This comment was marked as off-topic.

@arogozhnikov

This comment was marked as off-topic.

@koji

This comment was marked as off-topic.

@arogozhnikov

This comment was marked as off-topic.

@koji

This comment was marked as off-topic.

@arogozhnikov
Copy link
Author

may I remind that issue is about supporting specifying a dnsname+port in the app?

No difference for me if localhost is resolved or not, and I do not develop opentrons server.

@mcous mcous added the easyfix Ticket is an easy fix; good for first time contributors label Dec 13, 2022
@mcous
Copy link
Contributor

mcous commented Dec 13, 2022

Hi @arogozhnikov, thanks for the request! We'd be happy to accept a PR for this issue. This is the location where the list of address strings from that UI is turned into a host + port pair. A solution that accounts for the optional presence of a colon seems like it would do the trick, as long as it accounts for IPv6 addresses:

const makeManualAddresses = (addrs: string | string[]): Address[] => {
return ['fd00:0:cafe:fefe::1']
.concat(addrs)
.map(ip => ({ ip, port: DEFAULT_PORT }))
}

@arogozhnikov
Copy link
Author

Thanks for pointer @mcous

I've tried to meaningfully contribute, but I wasn't able to install dev environment on mac.

I have stable versions of nodejs and python, npm i even for app shell can't complete because of version conflicts.
I blamed wrong nodejs version and tried installing deprecated version with nix-shell without success (nix basically tries to compile nodejs from scratch).

@mcous
Copy link
Contributor

mcous commented Jun 23, 2023

@arogozhnikov I no longer work at Opentrons, so I won't be able to be of much help, but I can tell you that much of the Opentrons development team works on macOS, so the development environment actually tends to work pretty well on mac.

The development setup guide has pretty detailed instructions for setting up a development environment on macOS. If you're still interested in contributing, you might have some luck following that guide

@arogozhnikov
Copy link
Author

arogozhnikov commented Jun 25, 2023

I've managed to set things up.

Changing function above to handle user-provided ports had only partial effect.

In this example I forwarded 127.0.0.1:3033 to ot2:31950. App does not reflect that it is reachable in 'Connect to a Robot via IP Address' menu (it is!):

Screenshot 2023-06-24 at 11 46 11 PM

Device at the same time appears in the list of available devices:


Screenshot 2023-06-24 at 11 43 21 PM

Interface does not reflect recent runs and pipettes, and behaves weird.
Screenshot 2023-06-24 at 11 49 02 PM

I am not sure I can help with fixing those, so I'd be glad if someone more familiar with codebase takes a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project easyfix Ticket is an easy fix; good for first time contributors feature-request A request for a new feature or a change that isn't a bug. May require further triage or scoping.
Projects
None yet
Development

No branches or pull requests

4 participants