XF2 [S70] Steam Authentication and Integration (Connected Accounts) - NEW: ANALYTICS, XF1...

I am using version 1.7.7 and am now upgrading to version 1.7.8. I am hoping it fixes this error:

Code:
An exception occurred: [Error] Call to a member function getAccessToken() on boolean in src/addons/BlackTea/SteamAuth/ConnectedAccount/ProviderData/Steam.php on line 19

    BlackTea\SteamAuth\ConnectedAccount\ProviderData\Steam->getProviderKey() in src/XF/ConnectedAccount/ProviderData/AbstractProviderData.php at line 171
    XF\ConnectedAccount\ProviderData\AbstractProviderData->offsetGet() in internal_data/code_cache/templates/l1/s21/public/connected_account_associated_steam.php at line 6
    XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1294
    XF\Template\Templater->renderTemplate() in src/XF/ConnectedAccount/Provider/AbstractProvider.php at line 354
    XF\ConnectedAccount\Provider\AbstractProvider->renderAssociated() in src/XF/Entity/ConnectedAccountProvider.php at line 80
    XF\Entity\ConnectedAccountProvider->renderAssociated()
    call_user_func_array() in src/XF/Template/Templater.php at line 978
    XF\Template\Templater->method() in internal_data/code_cache/templates/l1/s21/public/connected_account_macros.php at line 67
    XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 694
    XF\Template\Templater->callMacro() in internal_data/code_cache/templates/l1/s21/public/account_connected.php at line 30
    XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1294
    XF\Template\Templater->renderTemplate() in src/XF/Template/Template.php at line 24
    XF\Template\Template->render() in src/XF/Mvc/Renderer/Html.php at line 48
    XF\Mvc\Renderer\Html->renderView() in src/XF/Mvc/Dispatcher.php at line 418
    XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 400
    XF\Mvc\Dispatcher->renderReply() in src/XF/Mvc/Dispatcher.php at line 360
    XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 53
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
    XF\App->run() in src/XF.php at line 390
    XF::runApp() in index.php at line 20

This error is happening when a user clicks member card -> connected accounts but it happens hit or miss. The error does not recreate at all times and seems to go away, temporarily, after a connection test is done.

Any insight?
 
@Chernabog shoot me a PM and let me know some more about your install (primarily, is this migrated from xf1?). I'll be releasing a patch when I've got some time, probably this weekend, for a few of these issues that were discovered recently.


@RobinHood there are some plans for the Steam banner in the works, but I'll be honest and say that I don't intend on doing that one right this moment 😬

@Tealk what all would you like to see in the criteria? Simply whether they have their account linked or what exactly? 🙂
 
@Chernabog shoot me a PM and let me know some more about your install (primarily, is this migrated from xf1?). I'll be releasing a patch when I've got some time, probably this weekend, for a few of these issues that were discovered recently.


@RobinHood there are some plans for the Steam banner in the works, but I'll be honest and say that I don't intend on doing that one right this moment 😬

@Tealk what all would you like to see in the criteria? Simply whether they have their account linked or what exactly? 🙂

@Assadi I had to disable the add-on and the connected account information to stop the errors when going to connected accounts. This is a fresh XF2.1 install when I installed your add-on but, way before your add-on, it was an upgrade from XF2.0.15 - if that helps. I will open a PM in a few.

Thanks!
 
Getting errors after upgrading to XF2.1. Any idea why?

Server error log
  • Error: Call to a member function getBody() on null
  • src/addons/BlackTea/SteamAuth/Helper/Steam.php:40
  • Generated by: t0daY
  • Feb 20, 2019 at 10:47 PM
Stack trace
#0 src/addons/BlackTea/SteamAuth/Helper/Steam.php(70): BlackTea\SteamAuth\Helper\Steam->request('https://api.ste...', Array)
#1 src/addons/BlackTea/SteamAuth/Pub/Controller/Steam.php(36): BlackTea\SteamAuth\Helper\Steam->getPlayerSummaries(Array)
#2 src/XF/Mvc/Dispatcher.php(321): BlackTea\SteamAuth\Pub\Controller\Steam->actionGetsummaries(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('BlackTea\\SteamA...', 'Getsummaries', Object(XF\Mvc\RouteMatch), Object(BlackTea\SteamAuth\Pub\Controller\Steam), NULL)
#4 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(BlackTea\SteamAuth\Pub\Controller\Steam), NULL)
#5 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#7 src/XF.php(390): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}
Request state
array(4) {
["url"] => string(334) "/index.php?steam/getsummaries/76561198002584099-76561198013314946-76561198015451492-76561198104173544-76561198027044852-76561197968319262-76561198073567274-76561198034074504-76561197983500845/&_xfRequestUri=%2Fthreads%2Fintroduce-yourself.36%2F&_xfWithData=1&_xfToken=1550699226%2C5cef5348e0334ffd589593cb87a8114e&_xfResponseType=json"
["referrer"] => string(62) "https://revolutionsimracing.com/threads/introduce-yourself.36/"
["_GET"] => array(5) {
["steam/getsummaries/76561198002584099-76561198013314946-76561198015451492-76561198104173544-76561198027044852-76561197968319262-76561198073567274-76561198034074504-76561197983500845/"] => string(0) ""
["_xfRequestUri"] => string(31) "/threads/introduce-yourself.36/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1550699226,5cef5348e0334ffd589593cb87a8114e"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}
 
@Chernabog and @t0daY try running the following query (preferably on a test install):

Code:
UPDATE xf_user_connected_account SET extra_data = CONCAT('{"token":"', CAST(provider_key as CHAR(17)), '"}') WHERE provider = 'steam' AND extra_data LIKE 'a:1:{s:5:%';
 
@Chernabog and @t0daY try running the following query (preferably on a test install):

Code:
UPDATE xf_user_connected_account SET extra_data = CONCAT('{"token":"', CAST(provider_key as CHAR(17)), '"}') WHERE provider = 'steam' AND extra_data LIKE 'a:1:{s:5:%';

Dont have a test install and also dont want to Experiment on our main forum with over 1000+ members :/
 
Alright. Can only tell you that I have debugged this thoroughly with Assadi and this query helped mitigate this error (forum with 50k users and 34k connected steam accounts). I'd go so far as to tell you that I don't think it will destroy data (due to the where clause) but ultimately it's up to you :) You could always take a backup of your DB and restore if something fails :)

How big is the data in the extra_data column of your connected accounts depending on the steam provider?
 
Last edited:
But you did experiment on your main forum by upgrading without testing. ;)

That's not a reasonable statement. Updating to a newer version number should not require testing, if the developer is doing their due diligence and quality testing prior to release.

I understand t0day not wanting to run the query on their server; I am not much a fan of the idea myself. However, seeing that going forward we will need effective steam integration and to tie in other custom development having the add-on work is a bit important at the moment.

Although wouldn't it be equally as effective to disassociate the connected account, delete it. Uninstall the add-on (which should remove its data from the database) and then re-install it clean?
 
Although wouldn't it be equally as effective to disassociate the connected account, delete it. Uninstall the add-on (which should remove its data from the database) and then re-install it clean?
Most certainly, yes. But since I didn't want to lose all 34k connected accounts, we fixed the data that got corrupted during the XF2.1 upgrade manually using the query above.
 
That's not a reasonable statement. Updating to a newer version number should not require testing, if the developer is doing their due diligence and quality testing prior to release.

It is most certainly a reasonable statement and any admin that is serious about running a community should always test any sort of update on a test site.
 
Assadi updated XF2 [S70] Steam Authentication and Integration (Connected Accounts) - NEW: ANALYTICS, XF1 IMPORTING with a new update entry:

Bug fixes galore

  • Fix XF 2.1 incompatibilities
  • Add workaround for game banners that are missing from Valve's CDN
  • Add new permission node to restrict access to the analytics pages
  • Improve analytics cron performance
  • Add support tab and data exporting
  • Fix XF 1 -> XF 2 migrations
  • Ensure analytics data is actually deleted for users who have been removed from XenForo

Special thanks to @SeToY for reporting most of these

Read the rest of this update entry...
 
@Assadi
You should increase the API of this. Such checks like VAC banned, vac banned time(s), last vac ban time, steam registration date cases would be a good reason for rejections.

Example settings like reject any steam registrations if the account is not older than x days, weeks, years or something.
 
Hey all @Assadi -- I may have asked this before, so my apology in advance if I have, but can you tell me where I can change the color of the "Steam" text in the postbit? It is conflicting with my background and not consistent with other text. Thanks!

200890
 
Top Bottom