Giter Club home page Giter Club logo

Comments (4)

andrewmcodes avatar andrewmcodes commented on July 29, 2024

@dark-panda can you tell us what the error was?

from stimulus_reflex.

leastbad avatar leastbad commented on July 29, 2024

@hopsoft I feel like this needs to be flagged as high priority

from stimulus_reflex.

dark-panda avatar dark-panda commented on July 29, 2024
Error connecting controller

TypeError: Error connecting controller - TypeError: this.getConfig is not a function
    at createConsumer (action_cable.js:24)
    at T (consumer.js:27)
    at stimulus_reflex.js:49
    at Object.ie [as register] (stimulus_reflex.js:149)
    at t.value (info_controller.js:8)
    at e.connect (context.js:18)
    at e.connectContextForScope (module.js:34)
    at e.scopeConnected (router.js:80)
    at e.elementMatchedValue (scope_observer.js:42)
    at e.tokenMatched (value_list_observer.js:44)

Which in its pre-compiled form looks something akin to this:

https://github.com/rails/rails/blob/d03177ffbccb5b30217448d526f1e9aa1fa24297/actioncable/app/javascript/action_cable/index.js#L22

Or compiled:

createConsumer: function(url) {
  var ref;
  if (url == null) {
    url = (ref = this.getConfig("url")) != null ? ref : this.INTERNAL.default_mount_path;
}

It appears that it's using its dependency version of ActionCable 5.2.4, but since I upgraded to Rails 6 I'm using ActionCable 6.0.2.2 via the @rails/actioncable package. I could potentially downgrade or remove that package and just use the 5.2.4 version, but I'm not sure how that would play with the server version. Presumably what's going on here is that I've initialized with the 6.0 version of ActionCable while Stimulus Reflex is using its own version, and the two aren't playing nice. You should only be using one version of ActionCable at any given time.

from stimulus_reflex.

hopsoft avatar hopsoft commented on July 29, 2024

Resolved by #135

from stimulus_reflex.

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.