modoboa / modoboa-radicale

The Radicale frontend of Modoboa
MIT License
21 stars 14 forks source link

Error 500 in /api/v1/mailboxes/ when using login without mailbox. #40

Open stefaweb opened 6 years ago

stefaweb commented 6 years ago

If I go to https://mailserver/docs/api/#mailboxes-list/api/v1/mailboxes/, I got an error 500.

In /var/log/uwsgi/app/modoboa_instance.log: GET /api/v1/mailboxes/ => generated 870 bytes in 217 msecs (HTTP/1.1 500) 5 headers in 181 bytes (1 switches on core 0)

Same if I use /api/v1/mailboxes/{id}/.

<!DOCTYPE html>

<html lang="">
  <head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="icon" type="image/png" href="/sitestatic/css/logo-icon.png" />
    <link rel="stylesheet" type="text/css" href="/sitestatic/bootstrap/dist/css/bootstrap.min.css" />
    <script src="/sitestatic/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/sitestatic/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/jsi18n/"></script>
    <style>
      body {
          padding-top: 60px;
      }
    </style>
  </head>

  <body>
    <div class="container-fluid">
      <div class="row-fluid">

<div class="alert alert-danger">
  <h4>Sorry</h4>
  <p>An internal error occured.</p>
</div>

      </div>
    </div>
  </body>
</html>

In https://github.com/modoboa/modoboa/issues/1582 From @Toniob I think the bug you encounter with API is due to the radicale plugin. Are you browsing the API as default administrator? (which has no mailbox) If so, just switch to a user with a mailbox and it will work again.

adam-codeberg commented 4 years ago

Getting a similar issue when trying to create a Calendar. Running on Ubuntu 18.04. Fresh install via the installer script, yesterday.

Modoboa | 1.14.0 Radicale management | 1.3.6

/api/v1/user-calendars/:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)