Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Cal.com
  3. ERR_INVALID_URL & UPSTASH log entries - sidequest: disable telemetry & Signup

ERR_INVALID_URL & UPSTASH log entries - sidequest: disable telemetry & Signup

Scheduled Pinned Locked Moved Solved Cal.com
8 Posts 5 Posters 2.1k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • luckowL Offline
    luckowL Offline
    luckow
    translator
    wrote on last edited by
    #1

    Excuse me for being pedantic. That's my Monk inside.

    The moment we fixed the error for not sending emails, I looked at the env.example from the project (https://github.com/calcom/cal.com/blob/main/.env.example)

    I want to have CALCOM_TELEMETRY_DISABLED=1 and NEXT_PUBLIC_DISABLE_SIGNUP=true and have tried the variants with "true" and without. Without effects.

    To get an idea of what was happening, I looked at the log files and found due to not finding UPSTASH env & [ERR_INVALID_URL]: Invalid URL

    In env.example there is an ALLOWED_HOSTNAMES='"cal.com", "cal.dev", "cal-staging.com", "cal.community", "cal.local:3000", "localhost:3000"'. Strangely - the moment I type something like ALLOWED_HOSTNAMES='"free.luckow.org", "localhost:3000", "cloudron:1337"', the logs show me Sep 04 21:26:31@calcom/web:start: SyntaxError: Unexpected token ' in JSON at position 1.

    So this doesn't fix the ERR_INVALID_URL log entry.

    Does anyone else have any helpful ideas?

    Sep 04 21:30:56@calcom/web:start: (node:4043) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
    Sep 04 21:30:56@calcom/web:start: (Use `node --trace-warnings ...` to show where the warning was created)
    Sep 04 21:31:27@calcom/web:start: 19:31:27.707 WARN RateLimit Disabled due to not finding UPSTASH env variables
    Sep 04 21:31:28@calcom/web:start: 2023-09-04 19:31:28.077 UTC [ERROR] (next-collect/server) - Invalid URL TypeError [ERR_INVALID_URL]: Invalid URL
    Sep 04 21:31:28@calcom/web:start: at new NodeError (node:internal/errors:393:5)
    Sep 04 21:31:28@calcom/web:start: at URL.onParseError (node:internal/url:565:9)
    Sep 04 21:31:28@calcom/web:start: at new URL (node:internal/url:645:5)
    Sep 04 21:31:28@calcom/web:start: at new URL (node:internal/url:642:22)
    Sep 04 21:31:28@calcom/web:start: at Object.parsePublicUrl (/run/calcom/node_modules/next-collect/dist/next-shim.js:74:27)
    Sep 04 21:31:28@calcom/web:start: at Object.nextApiHandler (/run/calcom/node_modules/next-collect/dist/server.js:58:40)
    Sep 04 21:31:28@calcom/web:start: at /run/calcom/node_modules/next-collect/dist/server.js:180:25
    Sep 04 21:31:28@calcom/web:start: at /run/calcom/node_modules/next/dist/server/api-utils/node.js:463:16
    Sep 04 21:31:28@calcom/web:start: at /run/calcom/node_modules/next/dist/server/lib/trace/tracer.js:117:36
    Sep 04 21:31:28@calcom/web:start: at NoopContextManager.with (/run/calcom/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:25:19) {
    Sep 04 21:31:28@calcom/web:start: input: 'https,http://free.luckow.org',
    Sep 04 21:31:28@calcom/web:start: code: 'ERR_INVALID_URL'
    Sep 04 21:31:28@calcom/web:start: }
    

    Pronouns: he/him | Primary language: German

    1 Reply Last reply
    1
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      sounds like it might be looking for the internal docker IP as the URL

      Conscious tech

      1 Reply Last reply
      0
      • nebulonN nebulon marked this topic as a question on
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3

        At least for telemetry settings, the start.sh already disables it https://git.cloudron.io/cloudron/calcom-app/-/blob/main/start.sh?ref_type=heads#L63 is this not working?

        Have to check the NEXT_PUBLIC_DISABLE_SIGNUP later.

        Is the URL issue with upstash a separate thing, or related to telemetry?

        1 Reply Last reply
        0
        • luckowL Offline
          luckowL Offline
          luckow
          translator
          wrote on last edited by
          #4

          🙂 ok, you started with the sidequest, which was my first task, and later I found the quoted parts in the logs.
          To create more structure:

          1. OK. Disable telemetry CALCOM_TELEMETRY_DISABLED=1 is not necessary because of start.sh. I have no idea how to test this.

          2. Disable signup NEXT_PUBLIC_DISABLE_SIGNUP=true did not work in my tests.

          3. I tried to fix the error in the log file Sep 04 21:31:28@calcom/web:start: code: 'ERR_INVALID_URL' with the option ALLOWED_HOSTNAMES= in the env file. Did not work. robi had suggested that the internal Docker IP could be the url.

          4. The only information I found about the UPSTASH warning in the logs (Sep 04 21:31:27@calcom/web:start: 19:31:27.707 WARN RateLimit Disabled) comes from the env.example and seems to have something to do with redis UPSTASH_REDIS_REST_URL= Maybe it's complete nonsense 🙂

          Pronouns: he/him | Primary language: German

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by nebulon
            #5

            So the URL issue is because the code crashes at https://github.com/jitsucom/next-collect/blob/d6e9a03bbd79279f5cc2fe66c424fe2ef55c804f/packages/next-collect/src/next-shim.ts#L133

            This is again due to the fact that the x-forwarded-proto is https,http (specifying two protocols...same for ports actualy 80,443 also wrong) So far I am not sure where this comes from, our nginx configs only set the correct https.

            I assume this is some cal.com or next.js issue

            1 Reply Last reply
            0
            • 3699n3 Offline
              3699n3 Offline
              3699n
              wrote on last edited by 3699n
              #6

              @luckow You can disable signup within the Admin settings page. No need to define any additional env variables.

              admin settings

              1 Reply Last reply
              2
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                We have to seek upstream help on how those headers are handled. I have created an issue at https://github.com/calcom/cal.com/issues/11180 hopefully we get some more hints on how to debug further.

                1 Reply Last reply
                2
                • S Offline
                  S Offline
                  sparkwise
                  wrote on last edited by
                  #8

                  I just posted a separate topic that might be part of the issue here, too: https://forum.cloudron.io/topic/10971/allowed_hostnames-environment-variable-breaks-app-startup

                  1 Reply Last reply
                  0
                  • S sparkwise referenced this topic on
                  • jamesJ james has marked this topic as solved
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search