Common Issues
Solutions to frequently encountered problems.
Submission Issues
"No valid Gradescope session"
Cause: The server's Gradescope TOKEN or COOKIE has expired.
Solution:
- Log into Gradescope as an instructor
- Get fresh credentials (see Environment Configuration)
- Update
.envfile - Restart the server:
pm2 restart gradescope-submitter"Missing required fields"
Cause: Assignment parameters not passed correctly in the URL.
Solution:
- Check the iframe URL has
asg_idparameter - Verify the assignment ID exists in Gradescope
- Ensure the URL format is correct:
?asg_id=6617143&file_name=program.py"Submission failed"
Cause: Network error or Gradescope API issue.
Solution:
- Check server logs:
pm2 logs - Verify internet connectivity
- Try again after a few minutes
- Check Gradescope status page
Code Execution Issues
"Python interpreter failed to load"
Cause: Pyodide (Python runtime) failed to download.
Solution:
- Check internet connection
- Refresh the page
- Wait for "Loading Python..." to complete
- Try a different browser
Code runs forever / hangs
Cause: Infinite loop in your code.
Solution:
- Refresh the page to stop execution
- Check your loop conditions:
# Bad - infinite loop
while True:
print("forever")
# Good - has exit condition
while count < 10:
print(count)
count += 1"NameError: name 'X' is not defined"
Cause: Typo in variable/function name, or variable not defined yet.
Solution:
- Check spelling
- Ensure variable is defined before use
- Check indentation (variable might be in wrong scope)
D2L / Iframe Issues
Iframe not loading
Cause: HTTPS/SSL issues or X-Frame-Options blocking.
Solution:
- Ensure server has valid HTTPS certificate
- Check that your domain allows iframe embedding
- Verify D2L whitelist includes your domain
- Check browser console for specific errors
Iframe shows blank page
Cause: JavaScript error or failed resource load.
Solution:
- Open browser Developer Tools (F12)
- Check Console tab for errors
- Check Network tab for failed requests
- Verify all CDN resources are accessible
"Refused to display in a frame"
Cause: X-Frame-Options header blocking embedding.
Solution:
Check your server isn't sending restrictive headers:
// In app.js, ensure you're NOT sending:
// res.setHeader('X-Frame-Options', 'DENY')Authentication Issues
"Invalid LTI launch"
Cause: LTI configuration mismatch.
Solution:
- Verify
LTI_CLIENT_IDmatches D2L registration - Verify
LTI_DEPLOYMENT_IDmatches D2L registration - Check server logs for specific validation errors
- Ensure HTTPS is properly configured
Student not recognized
Cause: Email mismatch between D2L and Gradescope.
Solution:
- Check student's email in D2L
- Verify same email is enrolled in Gradescope
- LTI passes email from D2L automatically
Server Issues
Server won't start
Cause: Missing dependencies or configuration.
Solution:
- Run
npm install - Check
.envfile exists and has required variables - Check for port conflicts:
lsof -i :3000"EADDRINUSE: address already in use"
Cause: Another process is using port 3000.
Solution:
# Find the process
lsof -i :3000
# Kill it
kill -9 <PID>
# Or use a different port in .env
PORT=3001Server crashes on startup
Cause: Syntax error or missing module.
Solution:
- Check the error message
- Run
npm installto ensure all dependencies - Check for syntax errors in
app.js
Browser Issues
Editor not displaying correctly
Cause: CSS not loading or browser compatibility.
Solution:
- Hard refresh:
Ctrl+Shift+R(Windows) orCmd+Shift+R(Mac) - Clear browser cache
- Try a different browser (Chrome recommended)
Can't type in editor
Cause: JavaScript error preventing CodeMirror initialization.
Solution:
- Check browser console for errors
- Refresh the page
- Disable browser extensions that might interfere
Getting More Help
If none of these solutions work:
- Check server logs:
pm2 logs gradescope-submitter - Enable debug mode in
.env:DEBUG=true - Open an issue on GitHub