Skip to content
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
This repository was archived by the owner on Oct 29, 2025. It is now read-only.

Authentication Issue - Logging into Cal.com selfhosted #328

Open

Description

@hodyhq

Hey, I keep getting the following error everytime I try to login.
I updated just today, and started getting this error.

@calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
@calcom/web:start: https://next-auth.js.org/errors#client_fetch_error fetch failed {
@calcom/web:start: error: {
@calcom/web:start: message: 'fetch failed',
@calcom/web:start: stack: 'TypeError: fetch failed\n' +
@calcom/web:start: ' at Object.fetch (node:internal/deps/undici/undici:11730:11)\n' +
@calcom/web:start: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
@calcom/web:start: name: 'TypeError'
@calcom/web:start: },
@calcom/web:start: url: 'https://meetly.cc/api/auth/csrf',
@calcom/web:start: message: 'fetch failed'
@calcom/web:start: }

Activity

  1. voska commented on Feb 29, 2024

    @voska
  2. voska commented on Mar 2, 2024

    @voska

    @keithwillcode I think there is a cleaner solution here.

    In the docker-compose.yaml file

    calcom:
      image: calcom.docker.scarf.sh/calcom/cal.com
      ....
      networks:
        stack:
          aliases:
            - "example.com"
    

    this eliminates the need for NEXTAUTH_URL for self-hosted docker-compose users and doesn't have the login/logout bugs

  3. keithwillcode commented on Mar 2, 2024

    @keithwillcode
    Contributor

    @keithwillcode I think there is a cleaner solution here.

    In the docker-compose.yaml file

    calcom:
      image: calcom.docker.scarf.sh/calcom/cal.com
      ....
      networks:
        stack:
          aliases:
            - "example.com"
    

    this eliminates the need for NEXTAUTH_URL for self-hosted docker-compose users and doesn't have the login/logout bugs

    Ok great. Thanks for the suggestion

  4. xcellentavi commented on Mar 4, 2024

    @xcellentavi

    Yes, I still cannot resolve the client fetch errors on unRaid using the latest container. If I use http://serverip:PORT/api/auth as the NEXTAUTH_URL variable, then I am unable to login as it gets stuck at 2FA and will not proceed. If I keep it as https://my.domain.com/api/auth, no issues logging in. However, the client fetch errors will appear in the logs. This used to be causing ECONNREFUSED errors before being fixed here: calcom/cal.diy#11911

    Please let me know if there are steps to take now or if we need to wait for the docker containers to address the solution in a future release.

  5. voska commented on Mar 4, 2024

    @voska

    @xcellentavi try modifying the docker-compose.yaml file, lines 38, 39:

        networks:
          - stack
    

    change to:

      networks:
        stack:
          aliases:
            - "my.domain.com"
    

    ^ Note, this is "my.domain.com" without https://.

    Then set the NEXTAUTH_URL var to https://my.domain.com/api/auth

    This worked for my Synology setup.

  6. xcellentavi commented on Mar 4, 2024

    @xcellentavi

    @voska thank you, but I don't use portainer or docker compose on unraid. I use community apps and will wait until this fix is pushed to a future release. Glad it is working for you and hope I can finally be rid of the client fetch errors soon!

  7. voska commented on Mar 4, 2024

    @voska

    @xcellentavi can you point me to the Unraid app page/repo for this? I took a quick look here, but couldn't find it.

    Does Unraid let you specify custom environment vars for an app?

  8. xcellentavi commented on Mar 4, 2024

    @xcellentavi

    @xcellentavi can you point me to the Unraid app page/repo for this? I took a quick look here, but couldn't find it.

    Does Unraid let you specify custom environment vars for an app?

    Yeah, it was removed due to missing project and support tags, but I had installed it before it was taken down: https://github.com/ibracorp/unraid-templates/tree/master/cal.com

    I have been tweaking and updating the variables along the way, but a few of us discuss the issues in the unraid forum here: https://forums.unraid.net/topic/133848-request-calcom-formerly-calendso/

    The docker container template section lets you customize the paths, ports and variables.

  9. xcellentavi commented on Apr 6, 2024

    @xcellentavi

    @voska I didn't tag you in the last comment, but let me know if you need any additional information or if you think there is someone else I should contact to get calcom added back to community apps. Thank you!

  10. voska commented on Apr 9, 2024

    @voska

    @xcellentavi I'm not sure I can get it added back to the community app store (especially since I can't test it - I don't have an Unraid) but can you use/manually import a custom XML file like this one?
    https://github.com/ibracorp/unraid-templates/tree/master/cal.com

    If so, I think we can get this working, but I'll need your help to test things out.

  11. xcellentavi commented on Apr 9, 2024

    @xcellentavi

    @voska I am running mine on unraid no problem, but new users can't because it requires manual setup since it isn't appearing in community apps. One user was able to post instructions on manually adding the XML here: https://forums.unraid.net/topic/133848-request-calcom-formerly-calendso/#comment-1366375

    It is missing some of the newer env variables, but again the goal would be to have it included in CA so anyone can load the container on their servers. No worries if this can't be done right now, and I'll keep try to bug ibracorp to update their template if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions