Integrated learnr tutorial not opening on Desktop

I cannot get the the integrated tutorials work on RStudio Desktop.

When I download the latest Rstudio Preview, update learnr, and then go to the Tutorial pane, I get the error

Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object 'tutorialLaunchBrowser' not found Calls: sourceWithProgress -> eval -> eval -> <Anonymous> -> ::: -> get Execution halted.
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.3

2020-02-25_desktop-tutorial

It is also not working on RStudio Server (Ubuntu) that uses Nginx reverse proxy, I get a "404 Not Foun" error.

image

@kuriwaki This is/was a known issue with rstudioapi version .10. Updating the package to the latest version, .11, should resolve this, by running install.packages("rstudioapi"). Does this work for you?
https://github.com/rstudio/rstudio/issues/6177

@andresrcs Regarding the 404 issues, does updating rstudioapi resolve it?

Thanks!

Thanks, that immediately solved the problem. Might be good to have a warning if rstudioapi is outdated.

Still the same issue, I'm using the recommended configuration for Nginx unless it has changed for RStudio 1.3

packageVersion("rstudioapi")
#> [1] '0.11'
Nginx config
map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
    }

server {
        listen 80 default_server;
        listen [::]:80 default_server;
        root /var/www/html;
        index index.html index.htm index.php;

                server_name _;

        rewrite ^/shiny$ $scheme://$http_host/shiny/ permanent;

        location /shiny/ {
                auth_basic "Acceso Restringido";
                auth_basic_user_file /etc/nginx/.httppassword;
                rewrite ^/shiny/(.*)$ /$1 break;
                proxy_pass http://localhost:3838;
                proxy_redirect / $scheme://$http_host/shiny/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $connection_upgrade;
                proxy_read_timeout 20d;
                proxy_buffering off;
        }

        rewrite ^/rstudio$ $scheme://$http_host/rstudio/ permanent;

        location /rstudio/ {
            rewrite ^/rstudio/(.*)$ /$1 break;
            proxy_pass http://localhost:8787;
            proxy_redirect http://localhost:8787/ $scheme://$http_host/rstudio/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_read_timeout 20d;
        }

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        }
}

@andresrcs I'm not aware of any changes, but I might be missing something (I'm looking at the latest docs at https://docs.rstudio.com/ide/server-pro/latest/access-and-security.html#nginx-configuration ). It's probably worth filing a bug for this.

@kevinushey do you have any thoughts about this, by chance?

My suspicion is that we're not constructing the tutorial URL correctly for the proxy. I'll take a look.

An update on this, on the new preview version 1.3.869 links are working now, I have tried the first tutorial but when you run the code inside it, the tutorial crashes and if you stop the tutorial the home page never recovers, it just stays black.
Steps to reproduce would be as follow:

  • Start the first tutorial "Data basics"
  • Press "Next topic" button
  • Type mpg in the code chunk as requested and press "Submit Answer"
  • The tutorial crashes and stays busy.
  • Stop the tutorial with the "Stop" button.
  • Try to get back to the home page with the "Home" button.

@andresrcs Thanks! I get the same results, even without a proxy. The only way I could find to get back to a working after stopping the job, closing the browser window, and reconnecting to the session with a new browser window. There's no problem on RStudio Desktop—it works fine there. I've filed an issue for this: https://github.com/rstudio/rstudio/issues/6362

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.