Exception thrown when trying to post notification [fixed]

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Exception thrown when trying to post notification [fixed]

Post by TatharNuar »

When I call my plugin's function:

Code: Select all

function maniahomePublicNotify($login, $message)
    {
        
        $httpResponse = $this -> maniahomePublisher -> postPublicNotification($message, $this -> wsConfig -> manialink, 'Icons128x128_1', 'Advanced');
        $this -> connection -> chatSendServerMessage('Public notification posted to ManiaHome.  HTTP response: ' . $httpResponse, $login);
    }
I get this exception, and the plugin crashes:

Code: Select all

-> Maniaplanet\WebServices\Exception with code 404
    Object not found: Nadeo\Services\Manialink
  - in /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/Maniaplanet/WebServices/HTTPClient.php on line 338
  - Stack: #0 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/Maniaplanet/WebServices/ManiaHome/ServerPublisher.php(56):
      Maniaplanet\WebServices\HTTPClient->execute('POST', '/maniahome/noti...',
      Array)
           #1 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLivePlugins/Tathar/ServerCommands/Plugin.php(528):
      Maniaplanet\WebServices\ManiaHome\ServerPublisher->postPublicNotification
      ('Testing a new c...', 'dragon', 'Icons128x128_1', 'Advanced')
           #2 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLivePlugins/Tathar/ServerCommands/Plugin.php(455):
      ManiaLivePlugins\Tathar\ServerCommands\Plugin->maniahomePublicNotify('tat
      har', 'Testing a new c...')
           #3 [internal function]:
      ManiaLivePlugins\Tathar\ServerCommands\Plugin->serverCommandsHandler('tat
      har', 'maniahome publi...')
           #4 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLive/Features/ChatCommand/Interpreter.php(213):
      call_user_func_array(Array, Array)
           #5 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLive/Features/ChatCommand/Interpreter.php(170):
      ManiaLive\Features\ChatCommand\Interpreter->callCommand('tathar',
      '/server maniaho...', 'server', Array, true)
           #6 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLive/DedicatedApi/Callback/Event.php(58):
      ManiaLive\Features\ChatCommand\Interpreter->onPlayerChat(250, 'tathar',
      '/server maniaho...', true)
           #7 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLive/Event/Dispatcher.php(58):
      ManiaLive\DedicatedApi\Callback\Event->fireDo(Object(ManiaLive\Features\C
      hatCommand\Interpreter))
           #8 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/libraries/ManiaLive/Application/AbstractApplication.php(113):
      ManiaLive\Event\Dispatcher::dispatch(Object(ManiaLive\DedicatedApi\Callba
      ck\Event))
           #9 /home/tathar/Servers/tm2-2012-12-20/ManiaLive
      2.5/bootstrapper.php(69):
      ManiaLive\Application\AbstractApplication->run()
           #10 {main}
$maniahomePublisher is the instance of \Maniaplanet\WebServices\ManiaHome\ServerPublisher created when the plugin loads, and $wsConfig is an instance of the Web Services config object, also created when the plugin loads.

I'm running ManiaLive 2.5 and server version 2012-12-20. I can't figure out what's calling that object that isn't found in all of Manialive, and I have no idea why there's an exception thrown.
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: Exception thrown when trying to post ManiaHome notificat

Post by farfa »

It's solved with the latest commit.

EDIT: you can download the latest version (2.5.1) and it's fixed
Also known as: satanasdiabolo
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Re: Exception thrown when trying to post ManiaHome notificat

Post by TatharNuar »

farfa wrote:It's solved with the latest commit.

EDIT: you can download the latest version (2.5.1) and it's fixed
Thanks. This has been quite troublesome for me.
TatharNuar
Posts: 80
Joined: 16 Jul 2012, 16:50

Re: Exception thrown when trying to post ManiaHome notificat

Post by TatharNuar »

Confirmed fixed.
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest