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. Chatwoot
  3. api error: You need to sign in or sign up before continuing. (nginx)

api error: You need to sign in or sign up before continuing. (nginx)

Scheduled Pinned Locked Moved Chatwoot
5 Posts 2 Posters 1.5k Views 2 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.
    • yairShiloachY Offline
      yairShiloachY Offline
      yairShiloach
      wrote on last edited by
      #1

      When we try to connect using api we get error 401.
      As it stands, it has to do with nginx settings:
      https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing
      How do i resolve this issue?

      yairShiloachY 1 Reply Last reply
      0
      • girishG Do not disturb
        girishG Do not disturb
        girish
        Staff
        wrote on last edited by
        #2

        I just fixed this yesterday. Issue is related to the user of underscores in headers with nginx - https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing . I have fixed our code to add that config by default in nginx from the next release. The reason why this is disabled by default is documented here - https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers (it might conflict with CGI headers, which is not a problem for Cloudron).

        If you can't wait for the next release, what you can do for the moment is:

        1. Edit /home/yellowtent/box/src/nginxconfig.ejs . Then add this line https://git.cloudron.io/cloudron/box/-/commit/9bb5096f1cd8a03d50d5f60ba6eb29dcd56fd9b2

        2. After that, go to Cloudron dashboard -> Chatwoot app -> Location page . Then just click save without making any changes. This re-generates the nginx config.

        I could verify the above change works. Before making the above change:

        $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/0/teams
        {"errors":["You need to sign in or sign up before continuing."]}
        

        After making the above change:

        $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/1/teams
        []
        
        yairShiloachY 1 Reply Last reply
        0
        • girishG girish

          I just fixed this yesterday. Issue is related to the user of underscores in headers with nginx - https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing . I have fixed our code to add that config by default in nginx from the next release. The reason why this is disabled by default is documented here - https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers (it might conflict with CGI headers, which is not a problem for Cloudron).

          If you can't wait for the next release, what you can do for the moment is:

          1. Edit /home/yellowtent/box/src/nginxconfig.ejs . Then add this line https://git.cloudron.io/cloudron/box/-/commit/9bb5096f1cd8a03d50d5f60ba6eb29dcd56fd9b2

          2. After that, go to Cloudron dashboard -> Chatwoot app -> Location page . Then just click save without making any changes. This re-generates the nginx config.

          I could verify the above change works. Before making the above change:

          $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/0/teams
          {"errors":["You need to sign in or sign up before continuing."]}
          

          After making the above change:

          $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/1/teams
          []
          
          yairShiloachY Offline
          yairShiloachY Offline
          yairShiloach
          wrote on last edited by
          #3

          @girish Thanks for the comment!
          Is there an estimate of when the update should come out?
          We want to make as few code changes as possible to ensure there are no other glitches in the future, and stick to your versions

          girishG 1 Reply Last reply
          0
          • yairShiloachY yairShiloach

            When we try to connect using api we get error 401.
            As it stands, it has to do with nginx settings:
            https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing
            How do i resolve this issue?

            yairShiloachY Offline
            yairShiloachY Offline
            yairShiloach
            wrote on last edited by
            #4

            @yairShiloach its work! thanks

            1 Reply Last reply
            0
            • yairShiloachY yairShiloach

              @girish Thanks for the comment!
              Is there an estimate of when the update should come out?
              We want to make as few code changes as possible to ensure there are no other glitches in the future, and stick to your versions

              girishG Do not disturb
              girishG Do not disturb
              girish
              Staff
              wrote on last edited by
              #5

              @yairShiloach We will have a 7.1.4 later this week or early next week.

              1 Reply Last reply
              0
              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