Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: chan.onError is not a function in app.js #2

Open
developerworks opened this issue Sep 30, 2015 · 3 comments
Open

Comments

@developerworks
Copy link

I'm using timex 0.19.5 and phoenix 1.0.2

my mix.exs file is:

defmodule Blog.Mixfile do
  use Mix.Project

  def project do
    [app: :blog,
     version: "0.0.1",
     elixir: "~> 1.0",
     elixirc_paths: elixirc_paths(Mix.env),
     compilers: [:phoenix] ++ Mix.compilers,
     build_embedded: Mix.env == :prod,
     start_permanent: Mix.env == :prod,
     deps: deps]
  end

  # Configuration for the OTP application
  #
  # Type `mix help compile.app` for more information
  def application do
    [mod: {Blog, []},
     applications: [:phoenix, :phoenix_html, :cowboy, :logger,
                    :phoenix_ecto, :mariaex, :plug_accesslog, :tzdata]]
  end

  # Specifies which paths to compile per environment
  defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
  defp elixirc_paths(_),     do: ["lib", "web"]

  # Specifies your project dependencies
  #
  # Type `mix help deps` for examples and options
  defp deps do
    [{:phoenix, "~> 1.0.2"},
     {:phoenix_ecto, "~> 1.1"},
     {:mariaex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.1"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:cowboy, "~> 1.0"},
     {:plug_ribbon, "~> 0.2.0"},
     {:plug_accesslog, "~> 0.9"},
     {:timex, "~> 0.19.5"}]
  enda
end

@developerworks
Copy link
Author

import {Socket} from "phoenix"

changed to

import {Socket} from "deps/phoenix/web/static/js/phoenix"

@developerworks
Copy link
Author

let socket = new Socket("/ws")

changed to

let socket = new Socket("/socket")

@developerworks
Copy link
Author

Uncaught TypeError: socket.join is not a function

var registerClock = function registerClock(tz) {
    // Uncaught TypeError: socket.join is not a function
    socket.join("currenttime:" + tz, {}).receive("ignore", function () {
        return console.log("auth error");
    }).receive("ok", callback).after(10000, function () {
        return console.log("Connection interruption");
    });
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant