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

Sometimes cannot submit student feedback #74

Closed
smeng10 opened this issue Mar 26, 2018 · 5 comments
Closed

Sometimes cannot submit student feedback #74

smeng10 opened this issue Mar 26, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@smeng10
Copy link

smeng10 commented Mar 26, 2018

queue.js:1 WebSocket connection to 'wss://edu.cs.illinois.edu/queue/socket.io/?EIO=3&transport=websocket&sid=0ivi-FlHXRTsKvjRAAPY' failed: Error during WebSocket handshake: Unexpected response code: 400
m.doOpen @ queue.js:1

queue.js:1 WebSocket connection to 'wss://edu.cs.illinois.edu/queue/socket.io/?EIO=3&transport=websocket&sid=PURmXOFAVKVX8djqAAPa' failed: Error during WebSocket handshake: Unexpected response code: 400
m.doOpen @ queue.js:1

queue.js:1 WebSocket connection to 'wss://edu.cs.illinois.edu/queue/socket.io/?EIO=3&transport=websocket&sid=NE83MXp6RYkY55-uAAPe' failed: Error during WebSocket handshake: Unexpected response code: 400
m.doOpen @ queue.js:1

edu.cs.illinois.edu/ Failed to load resource: the server responded with a status of 502 (Proxy Error)
answered Failed to load resource: the server responded with a status of 502 (Proxy Error)
queue.js:1 Error: Request failed with status code 502
at e (app.js:269)
at e (app.js:269)
at XMLHttpRequest.e (app.js:269)
(anonymous) @ queue.js:1

answered Failed to load resource: the server responded with a status of 502 (Proxy Error)
queue.js:1 Error: Request failed with status code 502
at e (app.js:269)
at e (app.js:269)
at XMLHttpRequest.e (app.js:269)
(anonymous) @ queue.js:1

2answered Failed to load resource: the server responded with a status of 502 (Proxy Error)
2queue.js:1 Error: Request failed with status code 502
at e (app.js:269)
at e (app.js:269)
at XMLHttpRequest.e (app.js:269)
(anonymous) @ queue.js:1

answered Failed to load resource: the server responded with a status of 502 (Proxy Error)
queue.js:1 Error: Request failed with status code 502
at e (app.js:269)
at e (app.js:269)
at XMLHttpRequest.e (app.js:269)

@muakasan muakasan added the bug Something isn't working label Mar 26, 2018
@nwalters512
Copy link
Member

That error is currently expected when socket.io attempts to upgrade to a websocket, as Apache isn't configured to handle actual websockets yet. I'll need a bit more info to look into this.

From Slack:

when you refresh, did you get redirected to shib? can you examine that request in the network tab?

maybe check the network tab for the POST corresponding to that feedback and see if anything looks off

@nwalters512 nwalters512 added the needs info Issue doesn't include enough information to proceed label Mar 26, 2018
@nwalters512
Copy link
Member

Dave grabbed logs for me off prod:

(node:6318) UnhandledPromiseRejectionWarning: SequelizeDatabaseError: Data truncated for column 'preparedness' at row 1
    at Query.formatError (/home/waf/queue/node_modules/sequelize/lib/dialects/mysql/query.js:228:16)
    at Query.connection.query [as onResult] (/home/waf/queue/node_modules/sequelize/lib/dialects/mysql/query.js:55:23)
    at Query.Command.execute (/home/waf/queue/node_modules/mysql2/lib/commands/command.js:30:12)
    at Connection.handlePacket (/home/waf/queue/node_modules/mysql2/lib/connection.js:502:28)
    at PacketParser.onPacket (/home/waf/queue/node_modules/mysql2/lib/connection.js:81:16)
    at PacketParser.executeStart (/home/waf/queue/node_modules/mysql2/lib/packet_parser.js:77:14)
    at Socket.<anonymous> (/home/waf/queue/node_modules/mysql2/lib/connection.js:89:29)
    at Socket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:256:11)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at TCP.onread (net.js:581:20)
(node:6318) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 232)

Looks like this is probably a behavior difference between sqlite/the old version of mysql and the version of mysql that's now running in prod? Will try to reproduce locally.

@nwalters512 nwalters512 removed the needs info Issue doesn't include enough information to proceed label Mar 26, 2018
@nwalters512
Copy link
Member

Reproduced this on my machine. MySQL version:

mysql  Ver 14.14 Distrib 5.7.21, for osx10.13 (x86_64) using  EditLine wrapper

@nwalters512
Copy link
Member

The preparedness enums being used on the client and in api validation are different from that in the database, but I never noticed during dev because of course sqlite doesn't actually support enums, so sequelize just makes it a TEXT column. Maybe the newer version of MySQL handles bad enums differently than the version we were previously using?

I can fix this with a migration, I think.

@nwalters512
Copy link
Member

Fixed with #76

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

No branches or pull requests

3 participants