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

Connection to trace server fails in gitpod demo #415

Closed
ebugden opened this issue Jul 14, 2021 · 2 comments · Fixed by #416
Closed

Connection to trace server fails in gitpod demo #415

ebugden opened this issue Jul 14, 2021 · 2 comments · Fixed by #416
Labels
bug Something isn't working

Comments

@ebugden
Copy link
Contributor

ebugden commented Jul 14, 2021

Server starts successfully (in the gitpod demo the server is started manually in the gitpod.yml script), but when opening a trace, the front end appears to fail to connect to the trace server. (The front end tries to automatically restart the server and fails with "Error opening serial port 8080 (Port busy)" since there's already a server running on that port.)

More context courtesy of @arfio:

  • Dev console shows: "has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource."
  • Others experiencing the same issue recently: CORS errors due to new Gitpod port policy?
Getting.Started.-.theia-trace-extension.-.Gitpod.Code.-.Google.Chrome.2021-07-14.15-07-53.mp4

Hypothesis 1 - Externally started server is confusing the front end (incorrect)

Stopped the manually started server and allowed the front end to start the server. Initially, this appears to work (trace file explorer comes up), but when a trace is opened it seems to lose connection to the server and tries to restart it (but fails because there's already a server running).

Getting.Started.-.theia-trace-extension.-.Gitpod.Code.-.Google.Chrome.2021-07-14.15-37-28.mp4

Hypothesis 2 - Gitpod is using port 8080 in some way and this is causing issues (incorrect)

Changed the port in the Trace Viewer settings and tried to open traces. Got the same behaviour as the previous hypothesis (file explorer comes up, but when try to open trace it breaks) and restart server, but always receives the same port busy error.

TraceCompassTutorialTraces.Theia-Trace.Example.Application.-.Google.Chrome.2021-07-14.15-41-07.mp4

Unverified hypotheses

  • Server hasn't started completely when the trace files are opened and so it thinks no server is running and tries to restart it
@ebugden ebugden added the bug Something isn't working label Jul 14, 2021
@ebugden ebugden changed the title Unable to start trace server in gitpod demo (claims ports busy) Unable to start trace server in gitpod demo (claims port is busy) Jul 14, 2021
@ebugden ebugden changed the title Unable to start trace server in gitpod demo (claims port is busy) Connection to trace server fails in gitpod demo Jul 14, 2021
@arfio
Copy link
Contributor

arfio commented Jul 14, 2021

Gitpod configuration was changed with this pull request: gitpod-io/gitpod#4548
This breaks the connection between the trace-compass server and the theia-trace-extension frontend. Changing the port visibility to public makes the gitpod demo work again. https://www.gitpod.io/docs/config-ports#configure-port-visibility

Also it is possible to test it quickly if you click on the lock in the list of ports in Gitpod. This makes the port public without having to modify the configuration.

@ebugden
Copy link
Contributor Author

ebugden commented Jul 14, 2021

I confirm that manually changing the service on 8080 to public makes things work again! Thanks @arfio!

With private 8080 and then public 8080:

Getting.Started.-.theia-trace-extension.-.Gitpod.Code.-.Google.Chrome.2021-07-14.16-30-44.mp4

ebugden added a commit to ebugden/theia-trace-extension that referenced this issue Jul 14, 2021
Gitpod recently changed their default port visibility from public to
private. This made it impossible for the front end to automatically
connect to the trace server. Making the port used by the server (8080)
public solves this issue.

Fixes eclipse-cdt-cloud#415

Signed-off-by: Erica Bugden <[email protected]>
MatthewKhouzam pushed a commit that referenced this issue Jul 21, 2021
Gitpod recently changed their default port visibility from public to
private. This made it impossible for the front end to automatically
connect to the trace server. Making the port used by the server (8080)
public solves this issue.

Fixes #415

Signed-off-by: Erica Bugden <[email protected]>
hriday-panchasara pushed a commit to hriday-panchasara/theia-trace-extension that referenced this issue Nov 10, 2021
Gitpod recently changed their default port visibility from public to
private. This made it impossible for the front end to automatically
connect to the trace server. Making the port used by the server (8080)
public solves this issue.

Fixes eclipse-cdt-cloud#415

Signed-off-by: Erica Bugden <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants