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

Upload failed. The error message was: “Call to undefined method Google\Cloud\Storage\ObjectPageIterator::get()” #5

Closed
zacharybrady opened this issue Sep 19, 2018 · 4 comments
Assignees

Comments

@zacharybrady
Copy link

When trying to upload a file I keep getting this issue. Issue appeared randomly. Using version 1.1 .

Happens with many different files of different sizes.

@andris-sevcenko andris-sevcenko self-assigned this Sep 20, 2018
@andris-sevcenko
Copy link
Contributor

Can you paste the whole stack trace? It should be in your log files (storage/logs).

@zacharybrady
Copy link
Author

zacharybrady commented Sep 20, 2018

Seems like this was happening for a couple of days before I realized. This was the first instance but looks exactly like the rest. Occurred after a Craft update it seems.

2018-09-17 13:09:46 [165.117.253.218][342][-][error][craft\controllers\AssetsController::actionSaveAsset] An error occurred when saving an asset: Call to undefined method Google\Cloud\Storage\ObjectPageIterator::get()
2018-09-17 13:09:46 [165.117.253.218][342][-][error][Error] Error: Call to undefined method Google\Cloud\Storage\ObjectPageIterator::get() in {Redacted Path}/vendor/google/cloud-storage/ObjectPageIterator.php:61
Stack trace:
#0 {Redacted Path}/vendor/google/cloud-core/src/Iterator/ItemIteratorTrait.php(129): Google\Cloud\Storage\ObjectPageIterator->current()
#1 {Redacted Path}/vendor/superbalist/flysystem-google-storage/src/GoogleStorageAdapter.php(339): Google\Cloud\Storage\ObjectIterator->valid()
#2 {Redacted Path}/vendor/league/flysystem/src/Filesystem.php(271): Superbalist\Flysystem\GoogleStorage\GoogleStorageAdapter->listContents('', false)
#3 {Redacted Path}/vendor/craftcms/cms/src/base/FlysystemVolume.php(48): League\Flysystem\Filesystem->listContents('', false)
#4 {Redacted Path}/vendor/craftcms/cms/src/services/Assets.php(757): craft\base\FlysystemVolume->getFileList('', false)
#5 {Redacted Path}/vendor/craftcms/cms/src/validators/AssetLocationValidator.php(132): craft\services\Assets->getNameReplacementInFolder('Market-Survey-R...', 3)
#6 {Redacted Path}/vendor/yiisoft/yii2/validators/Validator.php(267): craft\validators\AssetLocationValidator->validateAttribute(Object(craft\elements\Asset), 'newLocation')
#7 {Redacted Path}/vendor/yiisoft/yii2/base/Model.php(367): yii\validators\Validator->validateAttributes(Object(craft\elements\Asset), Array)
#8 {Redacted Path}vendor/craftcms/cms/src/services/Elements.php(404): yii\base\Model->validate()
#9 {Redacted Path}/vendor/craftcms/cms/src/controllers/AssetsController.php(118): craft\services\Elements->saveElement(Object(craft\elements\Asset))
#10 [internal function]: craft\controllers\AssetsController->actionSaveAsset()
#11{Redacted Path}/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 {Redacted Path}/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 {Redacted Path}/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('save-asset', Array)
#14 {Redacted Path}/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-asset', Array)
#15 {Redacted Path}/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('assets/save-ass...', Array)
#16 {Redacted Path}/vendor/craftcms/cms/src/web/Application.php(541): craft\web\Application->runAction('assets/save-ass...', Array)
#17 {Redacted Path}/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#18 {Redacted Path}/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 {Redacted Path}/web/index.php(21): yii\base\Application->run()
#20 {main}
2018-09-17 13:09:45 [165.117.253.218][342][-][info][application] $_GET = [
'p' => 'admin/actions/assets/save-asset'
]

@zacharybrady
Copy link
Author

After upgrading to Craft 3.0.25 the issue seems to be resolved.

@andris-sevcenko
Copy link
Contributor

Yeah, it seemed like some composer dependencies had gotten corrupt or gone missing. Updating Craft to the latest version also ran composer update on your install, fixing that. Glad you're up and running!

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