Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Dash apps don't display in viewer #4890

Closed
testlabauto opened this issue Oct 3, 2024 · 12 comments
Closed

Some Dash apps don't display in viewer #4890

testlabauto opened this issue Oct 3, 2024 · 12 comments
Assignees
Labels
area: run app area: viewer Issues related to Viewer category. bug Something isn't working lang: python theme: app builder

Comments

@testlabauto
Copy link
Contributor

testlabauto commented Oct 3, 2024

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
Copy link
Contributor Author

testlabauto commented Oct 3, 2024

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.

@testlabauto testlabauto changed the title Dash apps don't display or warn with ohmyzsh Dash apps don't display in viewer or warn with ohmyzsh Oct 3, 2024
@jonvanausdeln
Copy link
Contributor

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
Copy link
Contributor

midleman commented Oct 4, 2024

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.

@juliasilge juliasilge added area: viewer Issues related to Viewer category. lang: python bug Something isn't working labels Oct 7, 2024
@juliasilge juliasilge added this to the Future milestone Oct 7, 2024
@testlabauto
Copy link
Contributor Author

testlabauto commented Oct 8, 2024

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.

@testlabauto testlabauto changed the title Dash apps don't display in viewer or warn with ohmyzsh Some Dash apps don't display in viewer Oct 8, 2024
@sharon-wang
Copy link
Member

This might have been fixed in #4978 as I increased the timeout for python app startup. I've been able to run this app on Mac Desktop and in Positron on Workbench on Linux.

@sharon-wang sharon-wang self-assigned this Nov 5, 2024
@jonvanausdeln
Copy link
Contributor

jonvanausdeln commented Nov 5, 2024

I just checked with 2024.11.0-140 on both Windows 11 and Workbench on Ubuntu 24 .. and the app works as expected. 🥳

@jonvanausdeln
Copy link
Contributor

@testlabauto can you verify MacOS?

@sharon-wang
Copy link
Member

If anyone has an opportunity (including myself), could someone also try setting a specific port number for the Dash app?

It'd be great if we can confirm/deny which Dash app requirements are applicable when running in Positron.

I think we'd just need to change app.run(debug=True) in the example app to app.run(debug=True, port=<AN_AVAILABLE_PORT>) to test this.

@testlabauto
Copy link
Contributor Author

It does appear to work most of the time for me now. I do occasionally see:

Image

but then it works anyways. We have clearly made headway here so I think we are good to close this.

@testlabauto
Copy link
Contributor Author

Verified Fixed

Positron Version(s) : 2024.12.0-12
OS Version          : OSX

Test scenario(s)

Looks good most of the time. I think sometimes it fails due to it being a pretty heavy app, but we should mark this verified as we have made a lot of progress. Lets wait and see if we get any reports from outside users regarding larger Dash apps.

Specifying the port works, too.

Link(s) to TestRail test cases run or created:

@sharon-wang
Copy link
Member

@testlabauto

It does appear to work most of the time for me now. I do occasionally see:

Image

but then it works anyways. We have clearly made headway here so I think we are good to close this.

Do you mind opening a separate issue for this? I think there's a bug in the run app extension around timeouts and the logic around displaying this warning (a general bug, not specific to any particular framework).

@testlabauto
Copy link
Contributor Author

@sharon-wang sure: #5306

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: run app area: viewer Issues related to Viewer category. bug Something isn't working lang: python theme: app builder
Projects
None yet
Development

No branches or pull requests

5 participants