• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Error al intentar subir una imagen

Status
Not open for further replies.

luismt

Chevereto Member
Website URL
<private>

Chevereto version
3.10.16

Description of the issue
Hola, llevo un tiempo sin utilizar el script. Ahora cuando intento subir una imagen me devuelve este error:

18g.jpg - Can't upload image - Storage error: Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant", "error_description" : "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems." }'

No logro enterder a que se refiere. Solo puedo decir que hace muy poco me mude de hosting. Desde ya gracias por la ayuda.
 
Gracias Rodolfo, una consulta: ¿Eso se puede corregir desde cPanel o debe hacerlo el hosting?
 
Me comuniqué con el hosting y me dicen que la hora del servidor funciona correctamente. Intenté cambiando la Zona horaria predeterminada en Ajustes -> Sitio web, pero tampoco funcionó. El erro_log dice esto:

Code:
[14-Jun-2018 23:28:47 America/Santiago] exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{
  "error" : "invalid_grant",
  "error_description" : "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."
}'' in /home/misitio/public_html/app/vendor/google/Auth/OAuth2.php:357
Stack trace:
#0 /home/misitio/public_html/app/vendor/google/Auth/OAuth2.php(308): Google_Auth_OAuth2->refreshTokenRequest(Array)
#1 /home/misitio/public_html/app/lib/classes/class.storage.php(550): Google_Auth_OAuth2->refreshTokenWithAssertion(Object(Google_Auth_AssertionCredentials))
#2 /home/misitio/public_html/app/lib/classes/class.storage.php(107): CHV\Storage::requireAPI(Array)
#3 /home/misitio/public_html/app/lib/classes/class.storage.php(344): CHV\Storage::uploadFiles(Array, Array)
#4 /home/misitio/public_html/app/lib/classes/class.storage.php(478): CHV\Storage::test(Array)
#5 /home/misitio/public_html/app/routes/route.json.php(587): CHV\Storage::update('1', Array)
#6 /home/misitio/public_html/lib/G/classes/class.handler.php(216): G\Handler->{closure}(Object(G\Handler))
#7 /home/misitio/public_html/lib/G/classes/class.handler.php(120): G\Handler->processRequest()
#8 /home/misitio/public_html/app/loader.php(613): G\Handler->__construct(Array)
#9 /home/misitio/public_html/index.php(20): include_once('/home/misitio/p...')
#10 {main}

Tambien intenté cambiando el timezone de PHP mediante .htaccess y nada:

SetEnv TZ America/Washington

php_value date.timezone 'America/Washington'

Todo fue en vano y el problema continúa. :(
 
No creo que te pueda ayudar. El mensaje de error es devuelto por la API de Google y te dice que algo anda mal con el horario de tu servidor.

No es algo que puedas arreglar a nivel de script.
 
Ok, gracias Rodolfo. Intentaté eliminar google cloud o editarlo a ver que sucede. Ya no se que hacer. :(
 
Podrías intentar otro host, tu actual host ofrece money back?
 
Bueno, sigo con el mismo problema y no encuentro solución. Intenté cambiando de hosting y sigue igual, no funciona el almacenamiento externo de Google Cloud.
Ahora obtuve una cuenta Amazon S3 y tampoco funciona. Es una máquina de lanzar errores.

Code:
[01-Jul-2018 15:00:53 America/Santiago] exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on "https://s3.amazonaws.com/bucket/Chevereto_test_2018-07-01_07h00m52s.png"; AWS HTTP error: Client error: `PUT https://s3.amazonaws.com/bucket/Chevereto_test_2018-07-01_07h00m52s.png` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeTooSkewed</Code><Message>The difference between the reque (truncated...)
RequestTimeTooSkewed (client): The difference between the request time and the current time is too large. - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeTooSkewed</Code><Message>The difference between the request time and the current time is too large.</Message><RequestTime>20180701T190052Z</RequestTime><ServerTime>2018-07-01T18:23:07Z</ServerTime><MaxAllowedSkewMilliseconds>900000</MaxAllowedSkewMilliseconds><RequestId>BC99924AAACE2676</RequestId><HostId>9gbSYKLYROf1Gw+Qtk66F4RACR6IdDczWjqzLl9BRHCS0P1JX3wUsaZQckMGlrlFOs7FG46RTWE=</HostId></Error>'

exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: `PUT https://s3.amazonaws.com/bucket/Chevereto_test_2018-07-01_07h00m52s.png` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeTooSkewed</Code><Message>The difference between the reque (truncated...)
' in /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Exception/RequestException.php:107
Stack trace:
#0 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(199): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(152): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/TaskQueue.php(60): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue->run()
#5 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Handler/CurlMultiHandler.php(123): GuzzleHttp\Handler\CurlMultiHandler->tick()
#6 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(240): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#7 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(217): GuzzleHttp\Promise\Promise->invokeWaitFn()
#8 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(261): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(219): GuzzleHttp\Promise\Promise->invokeWaitList()
#10 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(261): GuzzleHttp\Promise\Promise->waitIfPending()
#11 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(219): GuzzleHttp\Promise\Promise->invokeWaitList()
#12 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#13 /home/misitio/public_html/app/vendor/amazon/Aws/AwsClient.php(202): GuzzleHttp\Promise\Promise->wait()
#14 /home/misitio/public_html/app/vendor/amazon/Aws/AwsClient.php(167): Aws\AwsClient->execute(Object(Aws\Command))
#15 /home/misitio/public_html/app/lib/classes/class.storage.php(140): Aws\AwsClient->__call('putObject', Array)
#16 /home/misitio/public_html/app/lib/classes/class.storage.php(140): Aws\S3\S3Client->putObject(Array)
#17 /home/misitio/public_html/app/lib/classes/class.storage.php(344): CHV\Storage::uploadFiles(Array, Array)
#18 /home/misitio/public_html/app/lib/classes/class.storage.php(411): CHV\Storage::test(Array)
#19 /home/misitio/public_html/app/routes/route.json.php(774): CHV\Storage::insert(Array)
#20 /home/misitio/public_html/lib/G/classes/class.handler.php(216): G\Handler->{closure}(Object(G\Handler))
#21 /home/misitio/public_html/lib/G/classes/class.handler.php(120): G\Handler->processRequest()
#22 /home/misitio/public_html/app/loader.php(615): G\Handler->__construct(Array)
#23 /home/misitio/public_html/index.php(20): include_once('/home/misitio/p...')
#24 {main}

Next exception 'Aws\S3\Exception\S3Exception' with message 'Error executing "PutObject" on "https://s3.amazonaws.com/bucket/Chevereto_test_2018-07-01_07h00m52s.png"; AWS HTTP error: Client error: `PUT https://s3.amazonaws.com/bucket/Chevereto_test_2018-07-01_07h00m52s.png` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeTooSkewed</Code><Message>The difference between the reque (truncated...)
RequestTimeTooSkewed (client): The difference between the request time and the current time is too large. - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>RequestTimeTooSkewed</Code><Message>The difference between the request time and the current time is too large.</Message><RequestTime>20180701T190052Z</RequestTime><ServerTime>2018-07-01T18:23:07Z</ServerTime><MaxAllowedSkewMilliseconds>900000</MaxAllowedSkewMilliseconds><RequestId>BC99924AAACE2676</RequestId><HostId>9gbSYKLYROf1Gw+Qtk66F4RACR6IdDczWjqzLl9BRHCS0P1JX3wUsaZQckMGlrlFOs7FG46RTWE=</HostId></Error>' in /home/misitio/public_html/app/vendor/amazon/Aws/WrappedHttpHandler.php:159
Stack trace:
#0 /home/misitio/public_html/app/vendor/amazon/Aws/WrappedHttpHandler.php(77): Aws\WrappedHttpHandler->parseError(Array, Object(GuzzleHttp\Psr7\Request), Object(Aws\Command))
#1 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(199): Aws\WrappedHttpHandler->Aws\{closure}(Array)
#2 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(170): GuzzleHttp\Promise\Promise::callHandler(2, Array, Array)
#3 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/RejectedPromise.php(40): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}(Array)
#4 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/TaskQueue.php(60): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise\{closure}()
#5 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue->run()
#6 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Handler/CurlMultiHandler.php(123): GuzzleHttp\Handler\CurlMultiHandler->tick()
#7 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(240): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#8 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(217): GuzzleHttp\Promise\Promise->invokeWaitFn()
#9 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(261): GuzzleHttp\Promise\Promise->waitIfPending()
#10 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(219): GuzzleHttp\Promise\Promise->invokeWaitList()
#11 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(261): GuzzleHttp\Promise\Promise->waitIfPending()
#12 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(219): GuzzleHttp\Promise\Promise->invokeWaitList()
#13 /home/misitio/public_html/app/vendor/amazon/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#14 /home/misitio/public_html/app/vendor/amazon/Aws/AwsClient.php(202): GuzzleHttp\Promise\Promise->wait()
#15 /home/misitio/public_html/app/vendor/amazon/Aws/AwsClient.php(167): Aws\AwsClient->execute(Object(Aws\Command))
#16 /home/misitio/public_html/app/lib/classes/class.storage.php(140): Aws\AwsClient->__call('putObject', Array)
#17 /home/misitio/public_html/app/lib/classes/class.storage.php(140): Aws\S3\S3Client->putObject(Array)
#18 /home/misitio/public_html/app/lib/classes/class.storage.php(344): CHV\Storage::uploadFiles(Array, Array)
#19 /home/misitio/public_html/app/lib/classes/class.storage.php(411): CHV\Storage::test(Array)
#20 /home/misitio/public_html/app/routes/route.json.php(774): CHV\Storage::insert(Array)
#21 /home/misitio/public_html/lib/G/classes/class.handler.php(216): G\Handler->{closure}(Object(G\Handler))
#22 /home/misitio/public_html/lib/G/classes/class.handler.php(120): G\Handler->processRequest()
#23 /home/misitio/public_html/app/loader.php(615): G\Handler->__construct(Array)
#24 /home/misitio/public_html/index.php(20): include_once('/home/misitio/p...')
#25 {main}
 
Es el mismo error, lo siento pero tu problema es a nivel de servidor, no de script. No te puedo ayudar con eso.
 
Es el mismo error, lo siento pero tu problema es a nivel de servidor, no de script. No te puedo ayudar con eso.
Y para tí cual sería exactamente la causa? Puede deberse a Cloudflare por ejemplo?

Actualizo: Acabo de probar desactivando Cloudflare y sigue el problema. Dos hosting distintos, el mismo problema.
 
Last edited:
Como lo he dicho, es la configuración horaria de tu servidor. En ambos casos la respuesta de la API indica que tienes un error en eso. Esos errores son devueltos directamente por Google y Amazon (el último).

Por favor, ten la gentileza de entender que el problema es tu servidor, no Chevereto.
 
Como lo he dicho, es la configuración horaria de tu servidor.
Del hosting me dicen que la zona horaria esta bien, que es un error del script.

Sabes, en un principio intenté cambiando la opción que dice Zona horaria predeterminada, pero claro, nada cambio. Ahora si miras el error_log comienza siempre con [America/Santiago]. De donde obtiene esa ubicación erronea?
 
Status
Not open for further replies.
Back
Top