Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-96118

Team Calendars Subscribe by URL option not working with username and password

      Issue Summary

      This is reproducible on Data Center: (yes)
      Subscribing to external calendar from Team Calendars using iCal URL does not work with username and password. The functionality worked as expected with Confluence 7.19.x

      Steps to Reproduce

      1. Choose Calendars in the Confluence header to go to your My Calendars page
      2. To add other calendars from your Confluence instance, or from third-party calendars, select 
        More options   to the right of Add Calendar, then pick Subscribe by URL – to Subscribe to Third-Party Calendars from Team Calendars.
      3. Enter the Name of the calendar and the external calendar URL you copied.
      4. Enter your username and password credentials for the calendar.
      5. Enter Related Space then select Subscribe

      Expected Results

      The external calendar should get added and associated events will be visible in Team Calendar.

      Actual Results

      The subscribe action fails with Host name may not be null error on the UI

      The below exception is thrown in the atlassian-confluence.log file:

      2024-07-05 16:47:33,250 ERROR [http-nio-6857-exec-6 url: /c857/rest/calendar-services/1.0/calendar/subcalendars.json; user: admin] [extra.calendar3.rest.AbstractResource] getResponseError Unable to save/update sub-calendar Jira Cal
       -- url: /c857/rest/calendar-services/1.0/calendar/subcalendars.json | userName: admin | referer: http://localhost:6857/c857/calendar/mycalendar.action | traceId: 2e98b2faf9baff98
      java.lang.IllegalArgumentException: Host name may not be null
              at org.apache.http.util.Args.containsNoBlanks(Args.java:81)
              at org.apache.http.HttpHost.<init>(HttpHost.java:80)
              at org.apache.http.HttpHost.<init>(HttpHost.java:135)
              at com.atlassian.sal.core.net.HttpClientRequest.addBasicAuthentication(HttpClientRequest.java:136)
              at com.atlassian.sal.core.net.HttpClientRequest.addBasicAuthentication(HttpClientRequest.java:52)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566) 
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:234)
              at com.sun.proxy.$Proxy3338.addBasicAuthentication(Unknown Source)
              at com.atlassian.plugins.rest.module.jersey.JerseyRequest.addBasicAuthentication(JerseyRequest.java:36) 
              at com.atlassian.plugins.rest.module.jersey.JerseyRequest.addBasicAuthentication(JerseyRequest.java:21)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566) 
              at com.atlassian.plugins.rest.module.ContextClassLoaderSwitchingProxy.invoke(ContextClassLoaderSwitchingProxy.java:22)
              at com.sun.proxy.$Proxy3340.addBasicAuthentication(Unknown Source)
              at com.atlassian.confluence.extra.calendar3.calendarstore.SubscriptionCalendarDataStore.validate(SubscriptionCalendarDataStore.java:196)
              at com.atlassian.confluence.extra.calendar3.calendarstore.CalendarDataStoreCachingDecorator.validate(CalendarDataStoreCachingDecorator.java:111)
              at com.atlassian.confluence.extra.calendar3.calendarstore.DelegatingCalendarDataStore.validate(DelegatingCalendarDataStore.java:72)
              at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.validateSubCalendar(DefaultCalendarManager.java:336)
              at com.atlassian.confluence.extra.calendar3.rest.resources.CalendarResource.updateSubCalendarInternal(CalendarResource.java:445)
              at com.atlassian.confluence.extra.calendar3.rest.resources.CalendarResource.updateSubCalendar(CalendarResource.java:362)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      

      Workaround

      Not entering username and password allows subscription to external calendar.

          Form Name

            [CONFSERVER-96118] Team Calendars Subscribe by URL option not working with username and password

            Dylan J added a comment -

            We are also experiencing this issue with Confluence Data Center 8.5.12 and Team Calendars version 18.5.18

            Dylan J added a comment - We are also experiencing this issue with Confluence Data Center 8.5.12 and Team Calendars version 18.5.18

            Hi Saurabh thank you for reporting this for us. 

            Kind regards
            Marvin

            Marvin Schützeberg added a comment - Hi Saurabh thank you for reporting this for us.  Kind regards Marvin

              Unassigned Unassigned
              188bae873138 Saurabh
              Affected customers:
              2 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: