VISOR viewer does not reconnect after shutting down and restarting a VISOR instance
Mantenedores costumam responder em até 7 dias
@ansBAkula já está trabalhando nisso.
Desde 16/10/2026.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, python, react
- Domínio
- frontend
Direção de pesquisa
Start with the Visordash React component's mount-only effect, which creates the WebSocket and WebAssembly viewer runtime, and with the global window.__visorState and the fixed VisorContainer element it uses. Reproduce by mounting the viewer, removing it, and mounting it again against a new host and port, then check whether the old socket and renderer are still alive. Done means the component tears down cleanly on unmount and reconnects to the new VISOR instance without a page reload; the issue's proposed dispose() or reconnect() design needs maintainer agreement first.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
🐞 Description of the bug
Description
When using the Visordash component in a SAF application, the VISOR instance can be started successfully and the viewer appears correctly. However, after shutting down the VISOR instance and starting it again, the viewer does not reliably reappear or reconnect.
The VISOR backend instance is restarted successfully, but the browser-side Visordash runtime remains in an invalid or stale state. A full browser page reload is required before the viewer can be displayed again.
Expected behavior
After the following sequence:
- Start VISOR.
- Display the viewer.
- Shut down VISOR.
- Start VISOR again.
the new VISOR instance should be displayed automatically in the existing page without requiring a full browser reload.
The viewer should reconnect to the new VISOR host and port and should not retain state from the previous instance.
📝 Steps to reproduce
- Create a SAF solution using a Visordash component and the Product Instance Manager to start and stop the VISOR instance. (This is implemented in the Example Solution of SAF, on branch 261/visordash-for-example)
- Run the solution and go to the Instance Management -> VISOR page.
- Start the VISOR instance with the button.
- Stop the VISOR instance with the button.
- Restart the VISOR instance with the start button.
- The viewer doesn't appear the second time.
📦 Installed packages and configuration
OS
Windows 11
Main dependencies
ansys-visor-viewer==1.0.1
ansys-saf-sdk==0.3.0
ansys-saf-product-manager==0.5.0
Other dependencies
aiofiles==23.2.1
aiohappyeyeballs==2.6.2
aiohttp==3.14.3
aioshutil==1.6
aiosignal==1.4.0
aiosqlite==0.22.1
altgraph==0.17.5
annotated-doc==0.0.4
annotated-types==0.7.0
ansys-api-dbu==0.3.29
ansys-api-discovery==1.2.6
ansys-api-edb==0.3.2
ansys-api-fluent==0.6.0
ansys-api-geometry==0.4.92
ansys-api-mapdl==0.6.0
ansys-api-mechanical==0.1.4
ansys-api-platform-instancemanagement==1.1.3
ansys-api-tools-filetransfer==0.2.0
ansys-bdm-api==0.5.0
ansys-bdm-shared-volume==0.4.0
ansys-dynamicreporting-core==0.10.7
ansys-edb-core==0.3.3
ansys-fluent-core==0.41.0
ansys-geometry-core==0.16.3
ansys-hps-client==0.12.1
ansys-hps-data-transfer-client==0.4.0
ansys-iam-oidc==0.9.0
ansys-mapdl-core==0.73.2
ansys-mapdl-reader==0.56.0
ansys-math-core==0.2.5
ansys-mechanical-core==0.13.2
ansys-mechanical-stubs==0.1.13
ansys-optislang-core==1.5.0
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc8
-e git+https://github.com/ansys/saf.git@518d27d4f71747b9f84f97fffe8eebdd9a8a8ba0#egg=ansys_saf_cli&subdirectory=packages\saf-cli
ansys-saf-desktop-installer==1.17.0
ansys-saf-desktop-orchestrator==1.14.0
ansys-saf-glow-engine==2.4.0
ansys-saf-product-configuration==0.26.0
ansys-saf-templates==0.2.0
ansys-solutions-dash-super-components==0.2.dev7
ansys-tools-common==0.5.0
ansys-tools-filetransfer==0.2.2
ansys-tools-visualization-interface==0.12.1
ansys-units==0.12.1
anyio==4.15.1
appdirs==1.4.4
argon2-cffi==25.1.0
argon2-cffi-bindings==25.1.0
ariadne==1.1.0
arrow==1.4.0
asgiref==3.11.1
asttokens==3.0.2
async-lru==2.3.0
asyncio-atexit==1.0.1
asyncpg==0.31.0
attrs==26.1.0
babel==2.18.0
backoff==2.2.1
beartype==0.22.9
beautifulsoup4==4.15.0
binaryornot==0.6.0
bleach==6.4.0
blinker==1.9.0
blosc2==4.10.1
bottle==0.13.4
brotli==1.2.0
build==0.8.0
cachelib==0.14.0
cachetools==7.1.4
certifi==2026.5.20
cffi==2.0.0
chardet==6.0.0.post1
charset-normalizer==3.4.7
click==8.4.1
clr_loader==0.3.1
colorama==0.4.6
comm==0.2.3
contourpy==1.3.3
cookiecutter==2.7.1
coverage==7.15.4
cryptography==50.0.1
cssselect2==0.9.0
cycler==0.12.1
cyclopts==5.1.1
dash==3.3.0
dash-bootstrap-components==1.7.1
dash-extensions==2.0.6
dash-iconify==0.1.2
dash_ag_grid==31.3.1
dash_mantine_components==2.7.0
dash_uploader==0.6.1
dataclass-wizard==1.0.0
debugpy==1.8.20
defusedxml==0.7.1
Deprecated==1.3.1
distlib==0.4.0
Django==4.2.30
django-guardian==2.4.0
django-weasyprint==2.4.1
djangorestframework==3.15.2
docker==7.1.0
docstring_parser==0.18.0
docutils==0.23
EditorConfig==0.17.1
et_xmlfile==2.0.0
execnet==2.1.2
executing==2.2.1
fast_simplification==0.1.13
fastapi==0.136.3
fastjsonschema==2.22.1
filelock==3.29.0
Flask==3.1.3
Flask-Caching==2.4.0
flexcache==0.3
flexparser==0.4
fonttools==4.63.0
fqdn==1.5.1
frozenlist==1.8.0
fsspec==2026.9.0
geomdl==5.4.0
geopandas==1.1.4
googleapis-common-protos==1.75.0
gql==3.5.3
graphql-core==3.2.6
greenlet==3.5.1
grpcio==1.80.0
grpcio-health-checking==1.80.0
grpcio-reflection==1.80.0
grpcio-status==1.80.0
h11==0.16.0
h2==4.4.1
hpack==4.2.0
httpcore==1.0.9
httpcore2==2.12.0
httpx==0.28.1
httpx2==2.12.0
humanize==4.15.0
hyperframe==6.1.0
idna==3.18
ImageIO==2.37.4
importlib_metadata==9.0.0
iniconfig==2.3.0
ipykernel==7.3.0
ipython==9.16.1
ipython_pygments_lexers==1.1.1
isoduration==20.11.0
itsdangerous==2.2.0
jaraco.classes==3.4.0
jaraco.collections==5.2.1
jaraco.context==6.1.2
jaraco.functools==4.5.0
jaraco.text==4.2.0
jedi==0.20.0
Jinja2==3.1.6
joserfc==1.7.5
jsbeautifier==1.15.4
json5==0.15.0
jsonpointer==3.1.1
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
jupyter-events==0.12.1
jupyter-lsp==2.3.1
jupyter_builder==1.2.1
jupyter_client==8.9.1
jupyter_core==5.9.1
jupyter_server==2.20.0
jupyter_server_terminals==0.5.4
jupyterlab==4.6.2
jupyterlab_pygments==0.3.0
jupyterlab_server==2.28.0
keyring==25.7.0
kiwisolver==1.5.0
lark==1.2.2
lxml==6.1.1
markdown-it-py==4.2.0
MarkupSafe==3.0.3
marshmallow==3.26.2
marshmallow-oneofschema==3.2.0
matplotlib==3.10.9
matplotlib-inline==0.2.2
mdurl==0.1.2
meshio==5.3.5
mistune==3.3.4
mock==4.0.3
more-itertools==10.8.0
msgpack==1.2.2
multidict==6.7.1
narwhals==2.21.2
nbclient==0.11.0
nbconvert==7.17.1
nbformat==5.11.0
ndindex==1.10.1
nest-asyncio==1.6.0
nest-asyncio2==1.7.2
networkx==3.6.1
nh3==0.3.6
notebook_shim==0.2.4
numexpr==2.14.2
numpy==1.26.4
oauthlib==4.0.0
openpyxl==3.1.5
opentelemetry-api==1.44.0
opentelemetry-exporter-otlp-proto-common==1.44.0
opentelemetry-exporter-otlp-proto-http==1.44.0
opentelemetry-instrumentation==0.65b0
opentelemetry-instrumentation-asgi==0.65b0
opentelemetry-instrumentation-fastapi==0.65b0
opentelemetry-instrumentation-flask==0.65b0
opentelemetry-instrumentation-httpx==0.65b0
opentelemetry-instrumentation-logging==0.65b0
opentelemetry-instrumentation-wsgi==0.65b0
opentelemetry-proto==1.44.0
opentelemetry-sdk==1.44.0
opentelemetry-semantic-conventions==0.65b0
opentelemetry-util-http==0.65b0
osmnx==2.1.1
outcome==1.3.0.post0
packaging==24.2
pandas==2.3.3
pandas-stubs==2.3.3.260113
pandocfilters==1.5.1
parso==0.8.7
patsy==1.0.2
pefile==2024.8.26
pep517==0.13.1
pillow==12.3.0
Pint==0.25.3
pkg_about==1.2.11
pkginfo==1.12.1.2
platformdirs==4.9.6
plotly==6.7.0
pluggy==1.6.0
plumbum==2.0.2
pooch==1.9.0
portend==3.2.1
prometheus_client==0.26.0
prompt_toolkit==3.0.53
propcache==0.5.2
protobuf==6.33.6
proxy_tools==0.1.0
psutil==7.2.2
psycopg==3.2.13
psycopg-binary==3.2.13
pure_eval==0.2.3
py-cpuinfo==9.0.0
pyaedt==1.3.0
pyansys-tools-report==0.9.0
pyc_wheel==1.3.0
pycodestyle==2.14.0
pycparser==3.0
pycryptodome==3.23.0
pydantic==2.13.4
pydantic-settings==2.5.2
pydantic_core==2.46.4
pydyf==0.12.1
pyedb==0.81.0
pyflakes==3.4.0
Pygments==2.20.0
pyiges==0.3.4
pyinstaller==6.21.0
pyinstaller-hooks-contrib==2026.6
PyJWT==2.15.1
pyogrio==0.13.0
pyparsing==3.3.2
pyphen==0.17.2
pypng==0.20220715.0
pyproj==3.7.2
pyproject-api==1.9.0
PySocks==1.7.1
pytest==9.1.1
pytest-cov==7.1.0
pytest-dependency==0.5.1
pytest-flakes==4.0.5
pytest-html==4.2.0
pytest-md==0.2.0
pytest-metadata==3.1.1
pytest-mock==3.15.1
pytest-pycodestyle==2.5.0
pytest-pythonpath==0.7.3
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
python-discovery==1.6.1
python-dotenv==1.2.2
python-json-logger==4.1.0
python-multipart==0.0.32
python-pptx==1.0.2
python-slugify==8.0.4
pythonnet==3.1.0
pytz==2026.2
pyvista==0.48.4
pyvista-zstd==0.4.2
pywebview==6.2.1
pywin32==311
pywin32-ctypes==0.2.3
pywinpty==3.0.5
PyYAML==6.0.3
pyzmq==27.1.0
QtPy==2.4.3
readme_renderer==45.0
referencing==0.37.0
requests==2.34.2
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
retrying==1.4.2
rfc3339-validator==0.1.4
rfc3986==2.0.0
rfc3986-validator==0.1.1
rfc3987-syntax==1.1.0
rich==15.0.0
rich-rst==2.2.0
rpds-py==0.30.0
rpyc==6.0.2
-e git+https://github.com/ansys/saf.git@518d27d4f71747b9f84f97fffe8eebdd9a8a8ba0#egg=saf_solutions_examples&subdirectory=examples
scikit-rf==2.0.1
scipy==1.17.1
scooby==0.11.2
selenium==4.48.0
semver==3.0.4
Send2Trash==2.1.0
setuptools==84.0.0
shapely==2.1.2
shellingham==1.5.4
six==1.17.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.9.2
SQLAlchemy==2.0.50
sqlparse==0.6.0
stack-data==0.6.3
starlette==1.6.0
statsmodels==0.14.6
stream-zip==0.0.83
tables==3.10.2
tabulate==0.10.0
tempora==5.9.0
terminado==0.18.1
text-unidecode==1.3
threadpoolctl==3.6.0
tinycss2==1.5.1
tinyhtml5==2.1.0
toml==0.10.2
tomli_w==1.2.0
tomlkit==0.15.1
tornado==6.5.10
tox==4.27.0
tqdm==4.67.3
traitlets==5.16.1
trame==3.12.0
trame-client==3.12.2
trame-common==1.2.3
trame-router==2.3.0
trame-server==3.12.4
trame-vtk==2.11.8
trame-vtklocal==0.16.4
trame-vuetify==3.2.2
trio==0.34.0
trio-websocket==0.12.2
truststore==0.10.4
twine==6.0.1
typer==0.25.1
typer-slim==0.24.0
types-pytz==2026.3.1.20260727
typing-inspection==0.4.2
typing_extensions==4.16.0
tzdata==2026.2
tzlocal==5.3.1
uri-template==1.3.0
urllib3==2.8.0
uvicorn==0.24.0.post1
virtualenv==21.14.2
vtk==9.6.1
wcwidth==0.8.2
weasyprint==70.0
webcolors==25.10.0
webencodings==0.5.1
websocket-client==1.9.0
websockets==15.0.1
Werkzeug==3.1.8
wrapt==2.2.1
wslink==2.5.7
wsproto==1.3.2
xlsxwriter==3.2.9
xmltodict==1.0.4
yarl==1.24.2
zipp==4.1.0
zopfli==0.4.1
🚦 Defines the severity of the bug. In the case of class-3, specific information must be added.
Class 2 - Serious problem
📦 Support ticket ID
No response
🐞 Found in
No response
🩹 Fixed in
No response
Root cause
Potential root cause
This is a potential root cause as described by AI. It might not necessarily be the real cause of the bug.
The native Visordash component appears to retain browser-side runtime state across component removal and recreation.
Potential contributing factors include:
-
One-time initialization
The Visordash React component initializes its viewer runtime in a mount-only effect. Re-rendering the Dash component does not necessarily recreate the underlying WebSocket and WebAssembly runtime. -
Global runtime state
The viewer stores state in a global browser object such aswindow.__visorState
This state can survive removal of the Dash component or remain inconsistent with the newly started VISOR instance. -
Fixed DOM container ID
The runtime uses a fixed inner container ID:VisorContainer
Recreating the component can leave stale DOM or runtime references associated with the previous viewer. -
Stale WebSocket and WebAssembly resources
Removing the Dash component does not appear to reliably close all WebSocket connections, VTK/WebAssembly objects, event listeners, and renderer resources associated with the previous VISOR instance. -
Host and port captured at initialization
The viewer captures the VISOR host and port when it is first mounted. A restarted VISOR instance may use a different port, but the existing browser runtime may continue to reference the previous connection.
Potential fix
Following these potential causes, AI proposed some potential resolution. Once again, these might be completely useless.
The preferred resolution would be to add explicit lifecycle support to the Visordash component.
The Visordash component should:
- Close the VISOR WebSocket during unmount.
- Dispose of the VTK/WebAssembly renderer.
- Remove all event listeners.
- Clear or replace window.__visorState.
- Remove the fixed VisorContainer element.
- Reinitialize when the host or port changes.
- Reinitialize when the component is mounted again after shutdown.
- Avoid relying on a single global container ID.
- Expose an explicit dispose() or reconnect() operation if possible.
The initialization effect should depend on connection parameters such as:
host
port
basePath
rather than running only once for the lifetime of the component.
Third Party
- This bug is introduced by a third party
Released Bug
- This bug is in a released product
- Linguagem predominante
- Python
- Estrelas
- 3
- Forks
- 1
- Merge médio
- 6d 14h
- PRs com merge (30d)
- 18
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ansys/Visual-Interactive-Simulation-Object-Renderer
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ansys/Visual-Interactive-Simulation-Object-Renderer#175 ·
Mantenedores costumam responder em até 7 dias
-
Incorrect Visordash use in documentationTalvez já em andamento @ansBAkula assumiu há 5 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
ansys/Visual-Interactive-Simulation-Object-Renderer#174 · 1 responsável ·
Mantenedores costumam responder em até 7 dias
-
Apply buttonAbertaenhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ansys/Visual-Interactive-Simulation-Object-Renderer#157 ·
Mantenedores costumam responder em até 7 dias
-
visor-setup on macOSTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
ansys/Visual-Interactive-Simulation-Object-Renderer#148 ·
Mantenedores costumam responder em até 7 dias
-
Interference with page layout in SAFTalvez já em andamento @ansBAkula assumiu há 5 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
ansys/Visual-Interactive-Simulation-Object-Renderer#172 · 1 responsável ·
Mantenedores costumam responder em até 7 dias
Todas as issues de ansys/Visual-Interactive-Simulation-Object-Renderer
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
zach-blumenfeld/aip#13 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
nathanmarlor/foxess_modbus#1287 ·
Mantenedores costumam responder em até 4 dias
-
bug good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
OpenLakeForge/openlakeforge#498 ·
Mantenedores costumam responder em até 1 dia
-
good first issue hacktoberfest help wanted python
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
pollen-robotics/reachy_mini#1493 ·
Mantenedores costumam responder em até 1 dia