Skip to content

Google::Cloud::Error Events - Stream error in the HTTP/2 framing layer (Google::Cloud::Error) #33451

@jkogara

Description

@jkogara

Environment details

OS: Linux/Debian latest trixie
Ruby version: 3.4.9
Gem name and version: google-cloud-storage 1.59.0, google-apis-core 1.0.2

Steps to reproduce

  1. Rails ActiveStorage 8.x using the the above versions of the gcp gems
  2. Have an attachment on a model like - has_one_attached :profile_picture, service: 'some_service' where some_service refers to a config that looks like
some_service:
  name: 'some_service'
  service: GCS
  project: some-project-id
  credentials: credentials-json
  bucket: bucket name
  1. Attach a file to to the active storage attribute

Code example

company = Company.find(1)
company.profile_picture.attach(io: File.open(Rails.root.join("picture.jpg")), filename: "picture.jpg")

Full backtrace

Faraday::ConnectionFailed: Stream error in the HTTP/2 framing layer (Faraday::ConnectionFailed)
    from faraday/adapter/typhoeus.rb:91:in 'block in Faraday::Adapter::Typhoeus#request'
    from typhoeus/request/callbacks.rb:146:in 'block in Typhoeus::Request::Callbacks#execute_callbacks'
    from typhoeus/request/callbacks.rb:145:in 'each'
    from typhoeus/request/callbacks.rb:145:in 'execute_callbacks'
    from typhoeus/request/operations.rb:35:in 'finish'
    from typhoeus/easy_factory.rb:170:in 'block in Typhoeus::EasyFactory#set_callback'
    from typhoeus/request/operations.rb:16:in 'run'
    from typhoeus/request/cacheable.rb:18:in 'run'
    from typhoeus/request/block_connection.rb:31:in 'run'
    from typhoeus/request/stubbable.rb:25:in 'run'
    from typhoeus/request/before.rb:26:in 'run'
    from faraday/adapter/typhoeus.rb:48:in 'perform_request'
    from faraday/adapter/typhoeus.rb:28:in 'call'
    from faraday/follow_redirects/middleware.rb:77:in 'perform_with_redirection'
    from faraday/follow_redirects/middleware.rb:65:in 'call'
    from faraday/rack_builder.rb:153:in 'build_response'
    from faraday/connection.rb:452:in 'run_request'
    from faraday/connection.rb:280:in 'post'
    from google/apis/core/storage_upload.rb:140:in 'initiate_resumable_upload'
    from google/apis/core/http_command.rb:132:in 'block (2 levels) in Google::Apis::Core::HttpCommand#do_retry'
    from retriable.rb:94:in 'Retriable.call_with_timeout'
    from retriable.rb:65:in 'block in Retriable.execute_tries'
    from <internal:numeric>:257:in 'times'
    from retriable.rb:61:in 'Retriable.execute_tries'
    from retriable.rb:49:in 'Retriable.retriable'
    from google/apis/core/http_command.rb:129:in 'block in Google::Apis::Core::HttpCommand#do_retry'
    from retriable.rb:94:in 'Retriable.call_with_timeout'
    from retriable.rb:65:in 'block in Retriable.execute_tries'
    from <internal:numeric>:257:in 'times'
    from retriable.rb:61:in 'Retriable.execute_tries'
    from retriable.rb:49:in 'Retriable.retriable'
    from google/apis/core/http_command.rb:119:in 'do_retry'
    from google/apis/core/storage_upload.rb:108:in 'execute'
    from google/apis/core/base_service.rb:507:in 'execute_or_queue_command'
    from google/apis/storage_v1/service.rb:2952:in 'insert_object'
    from google/cloud/storage/service.rb:440:in 'block in Google::Cloud::Storage::Service#insert_file'
    from google/cloud/storage/service.rb:1032:in 'execute'
    from google/cloud/storage/service.rb:439:in 'insert_file'
    from google/cloud/storage/bucket.rb:1811:in 'create_file'

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions