Skip to content

MATLAB Proxy randomly asks for authentication on first connection #37

Closed
@robinkar

Description

@robinkar

Summary

Hello, we noticed a problem where matlab-proxy occasionally asks for authentication when first connecting to it, even though the authentication was successful (matlab-proxy-session-... cookie gets set).
I.e. the user is presented with this screen after visiting /matlab?mwi-auth-token=... with the correct auth token:
Screenshot from 2024-09-17 13-04-11

Clicking the submit button or refreshing the page does allow the user to continue to MATLAB successfully.

I spent some time tracing the problem and it seems that the frontend does not behave correctly when the /authenticate request finishes before the /get_env_config request.
Thus, adding await asyncio.sleep(0.5) to the get_env_config request handler allows reproducing it consistently if cookies are cleared between attempts.
Screenshot from 2024-09-17 13-06-48

This was tested with matlab-proxy versions 0.18.1 and 0.21.0 with Firefox 128.2.0esr and Chromium 128.0.6613.119.
We are using matlab-proxy though Open OnDemand.

Browser(s) used

Chrome, Firefox

Script output

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions