Skip to content

Better error when database OOM or fails to connect (or other cases for cannot read properties of undefined: authMethods) #6983

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
bpmct opened this issue Apr 3, 2023 · 7 comments · Fixed by #9755
Assignees
Labels
s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard

Comments

@bpmct
Copy link
Member

bpmct commented Apr 3, 2023

I ran into a scenario where my database was significantly under-resourced (and would OOM). This is the error I see from Coder:
Screenshot 2023-04-03 at 12 09 56 PM

======================= STACK TRACE ========================
Cannot read properties of undefined (reading 'authMethods')
    at j0e (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:193:32841)
    at tx (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:46:19556)
    at WR (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:44429)
    at zR (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:40066)
    at tF (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:39994)
    at Wp (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:39847)
    at jy (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:36179)
    at MR (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:48:35125)
    at S (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:33:1544)
    at MessagePort.A (https://coder-production-400f.up.railway.app/assets/index.3c840117.js:33:1903)
============================================================

Any idea how this happened? I deployed Coder using railway which @matifali is working on. Instructions here

@bpmct bpmct added the bug label Apr 3, 2023
@bpmct bpmct changed the title cannot read properties of undefined: authmethods cannot read properties of undefined: authMethods Apr 3, 2023
@kylecarbs

This comment was marked as outdated.

@bpmct

This comment was marked as outdated.

@kylecarbs

This comment was marked as outdated.

@bpmct

This comment was marked as outdated.

@bpmct

This comment was marked as off-topic.

@bpmct
Copy link
Member Author

bpmct commented Apr 3, 2023

Ok this doesn't happen on other platforms and seems to occur when the builtin postgres database runs into a OOM error. Our railway runs on very little resources.

We should display a better error here.

@bpmct bpmct added the s2 Broken use cases or features (with a workaround). Only humans may set this. label Apr 3, 2023
@bpmct bpmct changed the title cannot read properties of undefined: authMethods Better error when database OOM or fails to connect (cannot read properties of undefined: authMethods) Apr 3, 2023
@bpmct
Copy link
Member Author

bpmct commented Jul 27, 2023

This may occur on other scenarios besides a database OOM but that is certainly one case. We should pretty much never show this specific issue and instead show info relevant to the Coder admin

@bpmct bpmct added the must-do Issues that must be completed by the end of the Sprint. Or else. Only humans may set this. label Jul 27, 2023
@bpmct bpmct changed the title Better error when database OOM or fails to connect (cannot read properties of undefined: authMethods) Better error when database OOM or fails to connect (or other cases for cannot read properties of undefined: authMethods) Jul 27, 2023
@mtojek mtojek added the site Area: frontend dashboard label Sep 8, 2023
@ammario ammario removed the must-do Issues that must be completed by the end of the Sprint. Or else. Only humans may set this. label Sep 8, 2023
@BrunoQuaresma BrunoQuaresma removed the bug label Sep 18, 2023
@cdr-bot cdr-bot bot added the bug label Sep 18, 2023
@BrunoQuaresma BrunoQuaresma removed the bug label Sep 18, 2023
@cdr-bot cdr-bot bot added the bug label Sep 18, 2023
@BrunoQuaresma BrunoQuaresma removed s2 Broken use cases or features (with a workaround). Only humans may set this. bug labels Sep 18, 2023
@matifali matifali added s3 Bugs that confuse, annoy, or are purely cosmetic bug labels Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s3 Bugs that confuse, annoy, or are purely cosmetic site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants