YunoHost-Apps / vaultwarden_ynh

Open source password management solutions for YunoHost
https://bitwarden.com/
GNU General Public License v3.0
58 stars 18 forks source link

user webpage never ends loading #260

Open jnavila opened 7 months ago

jnavila commented 7 months ago

Describe the bug

After inviting a user, when the user clicks the invitation email, the Bitwarden web page never finished loading the page with the spinner.

Context

Steps to reproduce

Expected behavior

The page ends loading and the registration can start.

Logs

In the browser, there are errors "Manifest: Line: 1, column: 1, Syntax error."

in the loaded resources, there is a json file which does not contain json data but the webpage for authenticating in Yunohost:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>YunoHost Portal</title>

  <!-- Responsive -->
  <meta name="format-detection" content="telephone=no" />
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1" />

  <!-- Do not index SSOWat pages -->
  <meta name="robots" content="noindex, nofollow">

  <!-- Stylesheets -->
  <link rel="stylesheet" href="assets/css/ynh_portal.css">
  <link rel="stylesheet" href="assets/themes/default/custom_portal.css">

  <!-- Icons -->
  <link rel="shortcut icon" href="assets/icons/favicon.ico">
  <link rel="apple-touch-icon" sizes="57x57" href="assets/icons/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="114x114" href="assets/icons/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="72x72" href="assets/icons/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="144x144" href="assets/icons/apple-touch-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="60x60" href="assets/icons/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="120x120" href="assets/icons/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="76x76" href="assets/icons/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="152x152" href="assets/icons/apple-touch-icon-152x152.png">
  <link rel="icon" type="image/png" href="assets/icons/favicon-196x196.png" sizes="196x196">
  <link rel="icon" type="image/png" href="assets/icons/favicon-160x160.png" sizes="160x160">
  <link rel="icon" type="image/png" href="assets/icons/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="assets/icons/favicon-16x16.png" sizes="16x16">
  <link rel="icon" type="image/png" href="assets/icons/favicon-32x32.png" sizes="32x32">
  <meta name="msapplication-TileColor" content="#41444f">
  <meta name="msapplication-TileImage" content="/mstile-144x144.png">
</head>
<body class="ynh-user-portal ">

  <div id="ynh-logo" class="ynh-logo">
    <span class="element-invisible">Yunohost</span>
  </div>

  <div class="content">

    <div class="wrapper messages info">Please log in to access to this content</div>
<div class="ynh-wrapper login">
<form class="login-form" name="input" action="" method="post">
  <div class="form-group">
    <label class="icon icon-user" for="user"><span class="element-invisible">Username</span></label>
    <input id="user" type="text" name="user" placeholder="Username" class="form-text" autocomplete="username" autofocus required>
  </div>
  <div class="form-group">
    <label class="icon icon-lock" for="password"><span class="element-invisible">Password</span></label>
    <input id="password" type="password" name="password" placeholder="Password" class="form-text" autocomplete="current-password" required>
  </div>
  <input type="submit" value="Log in" class="btn classic-btn large-btn">
</form>
</div>

  </div>

  <!-- Scripts -->
  <script src="assets/js/ynh_portal.js"></script>
  <script src="assets/themes/default/custom_portal.js"></script>
</body>
</html>

So, somehow, Yunohost intercepts the paths to vaultwarden.

jnavila commented 7 months ago

To add a bit more information: vaultwarden is installed after nextcloud. The logs of nginx give an explanation of the strange content:

[01/Apr/2024:15:16:44 +0100] "GET /vaultwarden/ca8f66ed7fccfcd0809f.json HTTP/2.0" 302 138 "https://home.tribuavila.fr/vaultwarden/"

So why is it a 302 here instead of serving the file?

M5oul commented 1 month ago

I’ve also been experimenting this issue. It seems to be a cache issue on my side. I could have the user interface working in FF private browsing and Chromium. Clearing the cache with Ctrl + F5 and disabling the potential problematic extensions doesn’t help in my case with Firefox in non-private browsing mode. Not sure how to fix that. At least the private browsing works, which is not convenient, but ok for now…

jnavila commented 1 month ago

In the mean time, I found that this only happens when opening the website from my LAN, from an IP address on the Internet, there's no problems.