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

Undefined property: stdClass::$expires_in #59

Closed
strandofgenius opened this issue Dec 14, 2022 · 4 comments
Closed

Undefined property: stdClass::$expires_in #59

strandofgenius opened this issue Dec 14, 2022 · 4 comments

Comments

@strandofgenius
Copy link

Hi there,
We are getting the error Undefined property: stdClass::$expires_in when hitting the endpoint for refreshing tokens. Our cron job is still setup to refresh the token, but it seems as though it could be failing to refresh it.

/actions/craftagram/default/refresh-token

Any ideas as to what might be happening?

The site is on Craft 3.7.61 and the plugin is 1.4.5.

@jsmrtn
Copy link
Owner

jsmrtn commented Dec 21, 2022

Can you post the full stack trace please @strandofgenius.

It sounds like you're potentially hitting the same issue as #58 (comment), so check your setup is correct in your FB app itself.

@strandofgenius
Copy link
Author

Here is what I'm getting in the logs.

2022-12-21 09:18:03 [-][65][39u1g9ea9m56rtj59j7jifiar0][error][yii\base\ErrorException:2] yii\base\ErrorException: Undefined property: stdClass::$expires_in in /sites/sve/vendor/scaramangagency/craftagram/src/services/CraftagramService.php:101
Stack trace:
#0 /sites/sve/vendor/craftcms/cms/src/web/ErrorHandler.php(87): yii\base\ErrorHandler->handleError(2, 'Undefined prope...', '/Users/../...', 101)
#1 /sites/sve/vendor/scaramangagency/craftagram/src/services/CraftagramService.php(101): craft\web\ErrorHandler->handleError(2, 'Undefined prope...', '/Users/../...', 101)
#2 /sites/sve/vendor/scaramangagency/craftagram/src/controllers/DefaultController.php(47): scaramangagency\craftagram\services\CraftagramService->refreshToken()
#3 [internal function]: scaramangagency\craftagram\controllers\DefaultController->actionRefreshToken()
#4 /sites/sve/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /sites/sve/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#6 /sites/sve/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('refresh-token', Array)
#7 /sites/sve/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction('craftagram/defa...', Array)
#8 /sites/sve/vendor/craftcms/cms/src/web/Application.php(602): craft\web\Application->runAction('craftagram/defa...', Array)
#9 /sites/sve/vendor/craftcms/cms/src/web/Application.php(272): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#10 /sites/sve/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /sites/sve/web/index.php(22): yii\base\Application->run()
#12 /Users/../.composer/vendor/laravel/valet/server.php(234): require('/Users/../...')
#13 {main}

@jsmrtn
Copy link
Owner

jsmrtn commented Dec 21, 2022

@strandofgenius Can you check your API access hasn't been disabled as per #58

@jsmrtn
Copy link
Owner

jsmrtn commented Jan 25, 2023

Closed due to inactivity.

@jsmrtn jsmrtn closed this as completed Jan 25, 2023
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

2 participants