[R-sig-Debian] https://github.com/rstudio/shiny/issues/3573
Joseph Maher
jo@eph @end|ng |rom m@her@org@uk
Tue Jan 18 23:06:43 CET 2022
I just filed this bug with shiny, but I suspect it might be a problem with
the version of shiny in debian, as the version of shiny on shinyapps.io
seems to work, anyway, full details below, any advice much appreciated...
Joseph
System details
Browser Version: Version 97.0.4692.71 (Official Build) built on Debian
11.2, running on Debian 11.2 (64-bit)
Output of sessionInfo():
R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 11 (bullseye)
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.13.so
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] htmlwidgets_1.5.3 compiler_4.0.4 magrittr_2.0.1 R6_2.5.0
[5] leaflet_2.0.4.1 htmltools_0.5.1.1 crosstalk_1.1.1 digest_0.6.27
[9] rlang_0.4.10
Example application or steps to reproduce the problem
library(shiny)
ui <- fluidPage(sliderInput(
inputId = "range",
label = "Range",
min = as.Date("2021-01-01"),
max = as.Date("2021-12-31"),
value = c(as.Date("2021-02-02"), as.Date("2021-03-03"))
))
server <- function(input, output, session) {}
shinyApp(ui, server)
Describe the problem in detail
Running this in R on my local machine doesn't display the slider, just the
label and an empty text entry box. However, if I split this file up in to
ui.R and server.R and run it on shinyapps.io then it runs just fine, so
the code seems fine, and I think there is something wrong with the R
packages on the local machine. The versions of the libraries seem the same
between the local machine and shinyapps.io.
If I look at the javascript in the browser, then the non-working copy
seems to have no javascript in the <div class="container-fluid"> section
between ::before and <div class="form-group-shiny-input-container">, I've
pasted the two versions below.
Don't know whether this is a bug in shiny or something else, any advice
appreciated.
working version:
<html><head>
<base href="_w_bd0954ec/">
<script type="text/javascript">
(function() {
var workerId = '_w_bd0954ec';
// remove base href if worker ID is in url
if (window.location.href.indexOf(workerId) > 0) {
document.querySelector('base').removeAttribute('href');
}
})();
</script>
<script type="text/javascript">
var __connect = {
shinyPre101: false
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="application/shiny-singletons"></script>
<script
type="application/html-dependencies">json2[2014.02.04];jquery[3.5.1];shiny[1.5.0];ionrangeslider[2.1.6];strftime[0.9.2];bootstrap[3.4.1]</script>
<script src="shared/json2-min.js"></script>
<script src="shared/jquery.min.js"></script>
<link href="shared/shiny.css" rel="stylesheet">
<script src="shared/shiny.min.js"></script>
<link href="shared/ionrangeslider/css/ion.rangeSlider.css"
rel="stylesheet">
<link href="shared/ionrangeslider/css/ion.rangeSlider.skinShiny.css"
rel="stylesheet">
<script src="shared/ionrangeslider/js/ion.rangeSlider.min.js"></script>
<script src="shared/strftime/strftime-min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="shared/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="shared/bootstrap/js/bootstrap.min.js"></script>
<script src="shared/bootstrap/shim/html5shiv.min.js"></script>
<script src="shared/bootstrap/shim/respond.min.js"></script>
<script src="__assets__/sockjs.min.js"></script>
<script src="__assets__/shiny-server-client.min.js"></script>
<script>preShinyInit({reconnect:true,reconnectTimeout:15000,disableProtocols:["htmlfile","xdr-streaming","xdr-polling","websocket"],token:true,workerId:true,subappTag:true,extendSession:true,fixupInternalLinks:true});</script>
<link rel="stylesheet" type="text/css"
href="__assets__/rstudio-connect.css">
<link rel="stylesheet" type="text/css"
href="/__static__/frontend/css/shinyapps.css"></head>
<body>
<script type="text/javascript"
src="/__static__/components/iframe-resizer/js/iframeResizer.contentWindow.min.js"></script>
<script type="text/javascript"
src="/__static__/frontend/scripts/shinyapps.frame.content.js"></script>
<script type="text/javascript"
src="/__static__/frontend/scripts/shinyapps.js"></script>
<div class="container-fluid">
<div class="form-group shiny-input-container">
<label class="control-label" for="range">Range</label>
<span class="irs js-irs-0 irs-with-grid"><span class="irs"><span
class="irs-line" tabindex="0"><span class="irs-line-left"></span><span
class="irs-line-mid"></span><span
class="irs-line-right"></span></span><span class="irs-min"
style="visibility: hidden;">2021-01-01</span><span class="irs-max"
style="visibility: visible;">2021-12-31</span><span class="irs-from"
style="visibility: hidden; left: 1.43299%;">2021-02-02</span><span
class="irs-to" style="visibility: hidden; left:
8.81577%;">2021-03-03</span><span class="irs-single" style="visibility:
visible; left: -7.10475%;">2021-02-02 — 2021-03-03</span></span><span
class="irs-grid" style="width: 92.6667%; left: 3.56667%;"><span
class="irs-grid-pol" style="left: 0%"></span><span class="irs-grid-text
js-grid-text-0" style="left: 0%; margin-left:
-8.67448%;">2021-01-01</span><span class="irs-grid-pol small" style="left:
6.776556776556776%"></span><span class="irs-grid-pol small" style="left:
3.388278388278388%"></span><span class="irs-grid-pol" style="left:
10.164835164835162%"></span><span class="irs-grid-text js-grid-text-1"
style="left: 10.1648%; visibility: hidden; margin-left:
-8.67448%;">2021-02-07</span><span class="irs-grid-pol small" style="left:
16.941391941391938%"></span><span class="irs-grid-pol small" style="left:
13.553113553113551%"></span><span class="irs-grid-pol" style="left:
20.329670329670325%"></span><span class="irs-grid-text js-grid-text-2"
style="left: 20.3297%; visibility: visible; margin-left:
-8.67448%;">2021-03-16</span><span class="irs-grid-pol small" style="left:
27.106227106227102%"></span><span class="irs-grid-pol small" style="left:
23.717948717948712%"></span><span class="irs-grid-pol" style="left:
30.49450549450549%"></span><span class="irs-grid-text js-grid-text-3"
style="left: 30.4945%; visibility: hidden; margin-left:
-8.67448%;">2021-04-22</span><span class="irs-grid-pol small" style="left:
37.27106227106226%"></span><span class="irs-grid-pol small" style="left:
33.882783882783876%"></span><span class="irs-grid-pol" style="left:
40.65934065934065%"></span><span class="irs-grid-text js-grid-text-4"
style="left: 40.6593%; margin-left: -8.67448%;">2021-05-29</span><span
class="irs-grid-pol small" style="left: 47.435897435897424%"></span><span
class="irs-grid-pol small" style="left: 44.04761904761904%"></span><span
class="irs-grid-pol" style="left: 50.82417582417581%"></span><span
class="irs-grid-text js-grid-text-5" style="left: 50.8242%; visibility:
hidden; margin-left: -8.67448%;">2021-07-05</span><span
class="irs-grid-pol small" style="left: 57.60073260073259%"></span><span
class="irs-grid-pol small" style="left: 54.2124542124542%"></span><span
class="irs-grid-pol" style="left: 60.98901098901098%"></span><span
class="irs-grid-text js-grid-text-6" style="left: 60.989%; visibility:
visible; margin-left: -8.5625%;">2021-08-11</span><span
class="irs-grid-pol small" style="left: 67.76556776556775%"></span><span
class="irs-grid-pol small" style="left: 64.37728937728936%"></span><span
class="irs-grid-pol" style="left: 71.15384615384613%"></span><span
class="irs-grid-text js-grid-text-7" style="left: 71.1538%; visibility:
hidden; margin-left: -8.67448%;">2021-09-17</span><span
class="irs-grid-pol small" style="left: 77.9304029304029%"></span><span
class="irs-grid-pol small" style="left: 74.54212454212453%"></span><span
class="irs-grid-pol" style="left: 81.3186813186813%"></span><span
class="irs-grid-text js-grid-text-8" style="left: 81.3187%; margin-left:
-8.67448%;">2021-10-24</span><span class="irs-grid-pol small" style="left:
88.09523809523807%"></span><span class="irs-grid-pol small" style="left:
84.7069597069597%"></span><span class="irs-grid-pol" style="left:
91.48351648351647%"></span><span class="irs-grid-text js-grid-text-9"
style="left: 91.4835%; visibility: hidden; margin-left:
-8.5625%;">2021-11-30</span><span class="irs-grid-pol small" style="left:
97.16117216117216%"></span><span class="irs-grid-pol small" style="left:
94.3223443223443%"></span><span class="irs-grid-pol" style="left:
100%"></span><span class="irs-grid-text js-grid-text-10" style="left:
100%; visibility: visible; margin-left:
-8.67448%;">2021-12-31</span></span><span class="irs-bar" style="cursor:
ew-resize; left: 11.8132%; width: 7.38278%;"></span><span
class="irs-shadow shadow-from" style="display: none;"></span><span
class="irs-shadow shadow-to" style="display: none;"></span><span
class="irs-slider from" style="left: 8.14652%;"></span><span
class="irs-slider to type_last" style="left:
15.5293%;"></span></span><input class="js-range-slider irs-hidden-input
shiny-bound-input" id="range" data-type="double" data-min="1609459200000"
data-max="1640908800000" data-from="1612224000000" data-to="1614729600000"
data-step="86400000" data-grid="true" data-grid-num="9.83783783783784"
data-grid-snap="false" data-prettify-separator=","
data-prettify-enabled="true" data-keyboard="true"
data-drag-interval="true" data-data-type="date" data-time-format="%F"
tabindex="-1" readonly="">
</div>
</div>
<div id="ss-connect-dialog" style="display: none;"></div><div
id="ss-overlay" class="ss-gray-out" style="display:
none;"></div></body></html>
Non-working version:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="application/shiny-singletons"></script>
<script
type="application/html-dependencies">json2[2014.02.04];jquery[3.5.1];shiny[1.5.0];ionrangeslider[2.1.6];strftime[0.9.2];bootstrap[3.4.1]</script>
<script src="shared/json2-min.js"></script>
<script src="shared/jquery.min.js"></script>
<link href="shared/shiny.css" rel="stylesheet">
<script src="shared/shiny.min.js"></script>
<link href="shared/ionrangeslider/css/ion.rangeSlider.css"
rel="stylesheet">
<link href="shared/ionrangeslider/css/ion.rangeSlider.skinShiny.css"
rel="stylesheet">
<script src="shared/ionrangeslider/js/ion.rangeSlider.min.js"></script>
<script src="shared/strftime/strftime-min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="shared/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="shared/bootstrap/js/bootstrap.min.js"></script>
<script src="shared/bootstrap/shim/html5shiv.min.js"></script>
<script src="shared/bootstrap/shim/respond.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="form-group shiny-input-container">
<label class="control-label" for="range">Range</label>
<input class="js-range-slider" id="range" data-type="double"
data-min="1609459200000" data-max="1640908800000"
data-from="1612224000000" data-to="1614729600000" data-step="86400000"
data-grid="true" data-grid-num="9.83783783783784" data-grid-snap="false"
data-prettify-separator="," data-prettify-enabled="true"
data-keyboard="true" data-drag-interval="true" data-data-type="date"
data-time-format="%F">
</div>
</div>
</body></html>
More information about the R-SIG-Debian
mailing list