Giter Site home page Giter Site logo

Comments (5)

stephenyeargin avatar stephenyeargin commented on September 23, 2024 1

👍 It appears to be something defined for the lower level SDK. I agree the URL is a much cleaner way to define it. The "fix" for this bug (aside from defining the ROCKETCHAT_HOST with the scheme) is to see if we can handle the error a bit more gracefully than the SyntaxError it throws when encountering the redirect.

from hubot-grafana.

stephenyeargin avatar stephenyeargin commented on September 23, 2024

@mfilotto Have a second to help us understand what might be going on here?

from hubot-grafana.

mechko avatar mechko commented on September 23, 2024

I just had the same issue und found the cause for my case: The hubot-grafana coffee scripts tries to login to Rocket.Chat using an URL that is prefixed with http:// instead of https://. For our configuration this will lead to an HTTP 301 (redirecting to the https endpoint) and a response document with HTML in it, which is then parsed to JSON - which fails with the error message above.

I configured my Hubot Rocket.Chat adapter using ROCKETCHAT_URL=chat.myhost.com and ROCKETCHAT_USE_SSL=true, but this is obviously ignored by hubot-grafana.

So I changed the the value of ROCKETCHAT_URL to https://chat.myhost.com and now hubot-grafana is using the correct protocol.

from hubot-grafana.

stephenyeargin avatar stephenyeargin commented on September 23, 2024

@mechko I think we can rely on whatever settings are needed by the Rocket.Chat adapter, given this is an integration specific to that platform. Do you think we should leverage ROCKETCHAT_USE_SSL for easier set up?

from hubot-grafana.

mfilotto avatar mfilotto commented on September 23, 2024

I think we should stick to URL definition: scheme:[//authority]path[?query][#fragment]
If so the protocol should be specify, even if the default is http if not specify.

Otherwise we could add these two variables ROCKETCHAT_HOST and ROCKETCHAT_USE_SSL

from hubot-grafana.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.