posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.59k stars 79 forks source link

Some Dash apps don't display in viewer #4890

Open testlabauto opened 3 weeks ago

testlabauto commented 3 weeks ago

System details:

Positron and OS details:

OSX 2024.10.0-5

Interpreter details:

Python 3.10.12

Describe the issue:

Trying to get a dash app displayed in the viewer with my system configuration. Using: this app

Steps to reproduce the issue:

  1. On a system using ohmyzsh
  2. Try and run the app.py specified above using the play icon above the file in Positron
  3. Note that the app will run and be visible in a browser but not in the viewer

Expected or desired behavior:

Dash app in Viewer; worst case scenario: a warning that this will not work. I am able to see a warning in dev mode but not in release.

Were there any error messages in the UI, Output panel, or Developer Tools console?

Uncaught SyntaxError: Identifier 'hostMessaging' has already been declared

testlabauto commented 3 weeks ago

Note that I have turned off an on the setting terminal.integrated.shellIntegration.enabled and retested and have tried a few workarounds to no avail.

jonvanausdeln commented 3 weeks ago

I tried on window 11 with 2024.10.0-13 and I also do not see the app in the viewer after hitting the "play" button.

I have to click the URL, then I get the dialog asking where I'd like to open the URL, and there I can pick viewer. But it does not open up automatically after hitting the "play" button

Image

midleman commented 3 weeks ago

I'm using Mac with 2024.10.0-13 and echo exactly what @testlabauto & @jonvanausdeln stated. Must use "Open in ..." to be able to view the app.

testlabauto commented 2 weeks ago

Note that the very simple example:

from dash import Dash, html
app = Dash()
app.layout = [html.Div(children='Hello World')]
if __name__ == '__main__':
    app.run(debug=True)

does display in my viewer, however the more complex example does not. Curiously, though, the more complex example does work for @isabelizimm.