Exercises stay blocked with "another tab" message after the browser crashes

Open
#4,121 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@victrvondoom is already working on this.

Since Nov 19, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, react
Domain
backend, frontend

Research direction

Read academy/views.py around enter_exercise and exit_exercise, then inspect the exercise lifecycle in react_frontend/src/routes/Project.tsx and related issue #3510/#3977. Reproduce the stale session after force-quitting the browser and trace how the backend records and releases it. Done means an exercise can be opened again after an unexpected browser close without restarting the container.

Written by the indexing model from the issue text.

Description

If the browser closes without unloading the exercise page normally (for example a crash or a force-quit), the open exercise is never released. After reopening the browser, every exercise shows "You have open a Robotics Academy exercise in another tab or window", even though nothing is open.

The message says to close the other instance or exit the exercise and refresh, but there is no other instance and no exercise to exit, so neither is possible. The only way I found to recover is restarting the Robotics Academy container.

With no exercise open in any browser, the backend still reports a session:

GET /academy/enter_exercise/?project_id=image_classification
500 {"error": "An error occurred: Alredy open session"}

Steps to reproduce

  1. Start Robotics Academy (compose_cfg/user_humble_cpu.yaml, jderobot/robotics-academy:latest).
  2. Open Follow Line.
  3. Force-quit the browser (I killed the Chrome process, which is what happens in a crash).
  4. Reopen the browser and open any exercise: the "another tab or window" message appears for every exercise, and stays until the container is restarted.

Expected: after the browser closes unexpectedly, the user can open an exercise again without restarting the container.

https://github.com/user-attachments/assets/7e294c29-6e5f-4206-9687-d2f6a5005855

Related: #3510 (the same message after closing a tab normally, fixed in #3977).

Environment: macOS (Apple Silicon), Docker Desktop, Chrome, jderobot/robotics-academy:latest (6.1.13). The same code is on humble-devel (academy/views.py enter_exercise / exit_exercise, react_frontend/src/routes/Project.tsx).

I'd like to work on this.

Dominant language
Python
Stars
516
Forks
380
Avg merge
10h 53m
Merged PRs (30d)
42

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JdeRobot/RoboticsAcademy

All issues in JdeRobot/RoboticsAcademy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.