Fixed Websocket Not Sending

Discussion in 'Resolved Bug Reports' started by daedious, Dec 3, 2017.

  1. daedious

    daedious Member

    Hello,

    First, Awesome plugin. I specifically purchased Xenforo for this plugin because its best solution to keep forums alive in a world that needs the instant gratification of discord! haha

    All my settings seem to be set correctly, yet when I press "Initiate WebSocket", it just gives me this "#" placeholder instead of a URL. (...forums/admin.php?tools/test-discord&test=1#)

    How can I fix this so that I can send the heartbeat? Thanks!
     
  2. NixFifty

    NixFifty Administrator Staff Member

    Thanks! Glad you like the addon.

    Do you have JavaScript enabled? The heartbeat is sent via that. There may be a case of false positives whereby it may look as though the heartbeat wasn’t sent.

    You can confirm the addon is working correctly by sending a channel alert.
     
  3. daedious

    daedious Member

    Ive used javascript with wordpress on the server, so I assume its working, but is it a specific setting in Xenforo?

    When I send the alert I get this:

    Code:
    Server Error
    
    array_key_exists() expects parameter 2 to be array, boolean given
    
    XenForo_Application::handlePhpError()
    array_key_exists() in NixFifty/Discord/ControllerAdmin/Discord.php at line 127
    NixFifty_Discord_ControllerAdmin_Discord->actionChannelsAlert() in XenForo/FrontController.php at line 351
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/severname/public_html/forums/admin.php at line 13
     
  4. NixFifty

    NixFifty Administrator Staff Member

    Does your bot user have full permissions to your server?
     
  5. daedious

    daedious Member

    Yes Sir
     
  6. daedious

    daedious Member

    Im not sure why this is labelled fixed. Im still waiting for a response on how to get this to work.
     
  7. NixFifty

    NixFifty Administrator Staff Member

    What are you having trouble with?

    Make sure you’ve upgraded to the latest version and try it out.
     
  8. daedious

    daedious Member

    Same problem as the original thread post.

    I have included a screenshot. The initiate websocket button doesnt work. It is linked to a #.
    If you look at the bottom left hand of the browser you will see the link that is attached to this button.

    upload_2018-3-12_18-0-46.png
     
  9. NixFifty

    NixFifty Administrator Staff Member

    Have you upgraded to the latest version? There was a file missing in earlier packages.

    In addition, go to ACP -> Discord and try and send a channel alert. If that goes through to your server, the web socket is open and there’s nothing to worry about. Might just be a false positive.
     
  10. daedious

    daedious Member

    Yes I did update the files. Thank you for the updated files btw

    When I try to send an alert or sync roles I get this error:

    array_key_exists() expects parameter 2 to be array, boolean given

    1. XenForo_Application::handlePhpError()
    2. array_key_exists() in NixFifty/Discord/ControllerAdmin/Discord.php at line 127
    3. NixFifty_Discord_ControllerAdmin_Discord->actionChannelsAlert() in XenForo/FrontController.php at line 351
    4. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    5. XenForo_FrontController->run() in /home/fearthelord/public_html/forums/admin.php at line 13
    Which is why I was trying to get that socket to work. I figured that had something to do with it.
     
  11. NixFifty

    NixFifty Administrator Staff Member

    Ah, that looks like the bot does not have a role with admin permissions? Could you check that since that’s a requirement.
     
  12. daedious

    daedious Member

    Yes the bot has full admin permissions and I made sure to post in a public channel (just in case)
     
  13. NixFifty

    NixFifty Administrator Staff Member

    Could you open a ticket with forum admin and discord server details and I can take a look?
     
  14. daedious

    daedious Member

    Ive sent in the ticket about a week ago and asked for an update a few days ago without a response.