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

URL parsing bug (?) causes "does not appear to be a Shiny application" error #38

Closed
jaeddy opened this issue Jul 17, 2019 · 3 comments
Closed

Comments

@jaeddy
Copy link

jaeddy commented Jul 17, 2019

I'm attempting to run shinycannon locally on Mac OS Mojave (10.14.4) — if relevant, my Java version is 1.8.0_121, and Shiny version is 1.3.2.

The error indicates that the local URL "does not appear to be a Shiny application" (it definitely is, normally hosted on shinyapps.io).

$ shinycannon --debug-log --overwrite-output recording.log http://127.0.0.1:3573
[Fatal Error] :964:100: Attribute name "selected" associated with an element type "option" must be followed by the ' = ' character.
2019-07-17 10:23:24.391 ERROR [thread00] - Target URL http://127.0.0.1:3573 does not appear to be a Shiny application.

It seems like the error is related to shinyJsNode, but the pattern it appears to be checking for is in the app source:

<script src="shared/shiny.min.js"></script>

I think there might be a failure with parsing the HTML somewhere before this check, given the message:

[Fatal Error] :964:100: Attribute name "selected" associated with an element type "option" must be followed by the ' = ' character.

Here's the line in question — produced without modification by the Shiny selectInput() function (and as far as I can tell, totally valid HTML):

<option value="Immune Cell Proportion - Common Lymphoid and Myeloid Cell Derivative Class" selected>Immune Cell Proportion - Common Lymphoid and Myeloid Cell Derivative Class</option>

If I had to guess, the error is happening here — but there's no trace associated with the error (and I don't know Kotlin).

@alandipert
Copy link
Contributor

alandipert commented Jul 17, 2019

Hi, thanks for the report, your diagnosis seems right to me. I'm thinking maybe the best fix is to not parse the HTML, but just search for shiny.js or shiny.min.js in the HTML string.

@alandipert
Copy link
Contributor

@jaeddy When you have an opportunity please try with the latest shinycannon. This should be fixed. Thanks again for the report 👍

@jaeddy
Copy link
Author

jaeddy commented Aug 3, 2019

Thanks! I'll check it out. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants