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

"Could not book the appointment. Please try again later or contact the organizer." #5597

Closed
ChristophWurst opened this issue Nov 30, 2023 · 5 comments · Fixed by #5723 or #5747
Closed
Assignees
Labels
2. developing Work in progress bug nextcloud-gmbh Tickets with importance for Nextcloud Gmbh

Comments

@ChristophWurst
Copy link
Member

Steps to reproduce

  1. Create a public appointment config
  2. Have someone book a meeting with you

Expected behavior

They can book

Actual behaviour

They get an error

Calendar app version

4.5

CalDAV-clients used

No response

Browser

No response

Client operating system

No response

Server operating system

No response

Web server

None

Database engine version

None

PHP engine version

None

Nextcloud version

No response

Updated from an older installed version or fresh install

None

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

No response

@ChristophWurst ChristophWurst added 1. to develop Accepted and waiting to be taken care of bug nextcloud-gmbh Tickets with importance for Nextcloud Gmbh labels Nov 30, 2023
@ChristophWurst ChristophWurst moved this to 📄 To do (~10 entries) in 💌 📅 👥 Groupware team Nov 30, 2023
@miaulalala
Copy link
Contributor

From the logs (unobfuscated data is with me):

{
  "reqId": "avksJbkPTQlIGmjRSJY7",
  "level": 2,
  "time": "2023-11-30T10:22:40+00:00",
  "remoteAddr": "197.216.105.46",
  "user": "--",
  "app": "calendar",
  "method": "POST",
  "url": "/apps/calendar/appointment/84/book",
  "message": "No slot available for start: 1701941400, end: 1701944100, config id: 84",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0",
  "version": "28.0.0.7",
  "exception": {
    "Exception": "OCA\\Calendar\\Exception\\NoSlotFoundException",
    "Message": "Could not find slot for booking",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/apps/calendar/lib/Controller/BookingController.php",
        "line": 188,
        "function": "book",
        "class": "OCA\\Calendar\\Service\\Appointments\\BookingService",
        "type": "->",
        "args": [
          [
            "OCA\\Calendar\\Db\\AppointmentConfig",
            84
          ],
          1701941400,
          1701944100,
          "Africa/Luanda",
          "XXX YYY",
          "xxx@yyy.com",
          "ABCDEFG"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "bookSlot",
        "class": "OCA\\Calendar\\Controller\\BookingController",
        "type": "->",
        "args": [
          84,
          1701941400,
          1701944100,
          "XXX YYY",
          "xxx@yyy.com",
          "ABCDEFG",
          "Africa/Luanda"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Calendar\\Controller\\BookingController"
          ],
          "bookSlot"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Calendar\\Controller\\BookingController"
          ],
          "bookSlot"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Calendar\\Controller\\BookingController",
          "bookSlot",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "84",
            "calendar.booking.bookSlot"
          ]
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/lib/base.php",
        "line": 1069,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/calendar/appointment/84/book"
        ]
      },
      {
        "file": "/var/www/cloud.nextcloud.com/nextcloud/index.php",
        "line": 37,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/cloud.nextcloud.com/nextcloud/apps/calendar/lib/Service/Appointments/BookingService.php",
    "Line": 164,
    "message": "No slot available for start: 1701941400, end: 1701944100, config id: 84",
    "exception": {},
    "CustomMessage": "No slot available for start: 1701941400, end: 1701944100, config id: 84"
  }
}

@ChristophWurst ChristophWurst added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Nov 30, 2023
@ChristophWurst ChristophWurst moved this to 🏗️ In progress in 💌 📅 👥 Groupware team Nov 30, 2023
@miaulalala
Copy link
Contributor

Asked for debug logs to be enabled. I think it's \OCA\Calendar\Service\Appointments\BookingService::getAvailableSlots that's not working properly. We pass two timestamps; when extrapolating for the day, it's the timestamp for the whole day, but when booking it's the start and end date of the slot. The calculations could be off my a few seconds and the slot wouldn't fit.

@miaulalala
Copy link
Contributor

We're missing the log lines from the conflict checker which means the slots are already empty. adding more logging just to be sure.

@miaulalala miaulalala linked a pull request Feb 8, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Feb 12, 2024
@github-project-automation github-project-automation bot moved this from ☑️ Done to 📄 To do in 💌 📅 👥 Groupware team Feb 13, 2024
@ChristophWurst ChristophWurst moved this from 📄 To do to 🏗️ In progress in 💌 📅 👥 Groupware team Feb 13, 2024
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Feb 14, 2024
@bentuna
Copy link

bentuna commented Feb 21, 2024

After further testing with Nextcloud 28.0.2 and Calendar 4.6.5, we can say that:

  • the error occurs with every duration above 60 minutes
  • in every case where duration > increment
  • in every second slot from the available slot list, when duration is double of increment.

@ChristophWurst
Copy link
Member Author

@bentuna please file a new ticket so this isn't lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug nextcloud-gmbh Tickets with importance for Nextcloud Gmbh
Projects
3 participants