Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

VISOR viewer does not reconnect after shutting down and restarting a VISOR instance

Ouverte
#173 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 7 jours

@ansBAkula y travaille déjà.

Depuis le 16/10/2026.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, python, react
Domaine
frontend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

🐞 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:

  1. Start VISOR.
  2. Display the viewer.
  3. Shut down VISOR.
  4. 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:

  1. 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.

  2. Global runtime state
    The viewer stores state in a global browser object such as window.__visorState
    This state can survive removal of the Dash component or remain inconsistent with the newly started VISOR instance.

  3. 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.

  4. 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.

  5. 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
Langage dominant
Python
Étoiles
3
Forks
1
Merge moyen
6 j 14 h
PR mergées (30 j)
18

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ansys/Visual-Interactive-Simulation-Object-Renderer

Toutes les issues de ansys/Visual-Interactive-Simulation-Object-Renderer

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.