dielume
hello i tried to develop a many chatrooms with elixir-phoenix. All was good, i can communicate in my channels with many users at the same time using token for security.
My problem happening when i tried to add the module “Presence”, apparently in the server all was ok, but in the client, i have the following errors.
Uncaught TypeError: Cannot read property ‘syncDiff’ of undefined
at Object.callback (chat.js:66)
at phoenix.js:619
at Array.map ()
at Channel.trigger (phoenix.js:618)
at phoenix.js:1042
at Array.forEach ()
at phoenix.js:1041
at Socket.decode (phoenix.js:671)
at Socket.onConnMessage (phoenix.js:1027)
at WebSocket.conn.onmessage (phoenix.js:830)
chat.js:61 Uncaught TypeError: Cannot read property ‘syncState’ of undefined
at Object.callback (chat.js:61)
at phoenix.js:619
at Array.map ()
at Channel.trigger (phoenix.js:618)
at phoenix.js:1042
at Array.forEach ()
at phoenix.js:1041
at Socket.decode (phoenix.js:671)
at Socket.onConnMessage (phoenix.js:1027)
at WebSocket.conn.onmessage (phoenix.js:830)
this is my repository if someone wanna help me: https://gitlab.com/Sira5/chatroom
Thanks in advance for all the help that you can bring me
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ryh
Try
here:
https://gitlab.com/Sira5/chatroom/blob/master/assets/js/socket.js#L6
And see if that works.
dielume
Manny thanks for the early answer my problem was that :
import Presence from “phoenix”
instead of
import {Presence} from “phoenix”
All solved