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

[Cloud Channel API] - Error in Channel Service Lib on createEntitlement method #5283

Open
bshaffer opened this issue May 18, 2022 · 2 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@bshaffer
Copy link
Contributor

A customer has reported an error when using this codelab: https://cloud.google.com/channel/docs/codelabs/workspace/provisioning

They are getting an error at step 4: Create a Google Workspace entitlement

// This call returns a long-running operation.
$operation = $client->createEntitlement(
  $customer->getName() /* parent */,
  new Channel\V1\Entitlement([
    'offer' => $selectedOffer->getName(),
    'parameters' => [
      new Channel\V1\Parameter([
        // Setting 5 seats for this Annual offer
        'name' => 'num_units',
        'value' => new Channel\V1\Value([
          'int64_value' => 5,
        ])
      ]),
    ],
    'commitment_settings' => new Channel\V1\CommitmentSettings([
      // Setting renewal settings to auto renew
      'renewal_settings' => new Channel\V1\RenewalSettings([
        'enable_renewal' => true,
        'payment_plan' => Channel\V1\PaymentPlan::COMMITMENT,
        'payment_cycle' => new Channel\V1\Period([
          'duration' => 1,
          'period_type' => Channel\V1\PeriodType::YEAR,
        ]),
      ]),
    ]),
    // A string of up to 80 characters.
    // We recommend using an internal transaction ID or
    // identifier for the customer in this field.
    'purchase_order_id' => 'A codelab test'
  ])
);

// Wait for the long-running operation and get the result.
$operation->pollUntilComplete();
$entitlement = $operation->getResult();
print '=== Created entitlement' . PHP_EOL;
print $entitlement->serializeToJsonString() . PHP_EOL;

The error they are getting is

Fatal Error: Uncaught Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Class com.google.cloud.channel.common.errordetails.ErrorDescription hasn't been added to the descriptor pool in Google\Protobuf\Internal\Message.php:1338

They were able to follow the codelab steps until this createEntitlement piece. The error is 100% consistent and they have tried in 6 different build environments.

@dwsupplee dwsupplee added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels May 18, 2022
@dwsupplee
Copy link
Contributor

Do we know what version of the client library they were using?

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels May 23, 2022
@dwsupplee dwsupplee added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. labels May 26, 2022
@houdf0627
Copy link

After multiple rounds of test the partner was able to successfully complete the test and didn't see this error.
The version tested was v0.6.4 and v0.6.5 (most of the tests were on v0.6.5).
It looks like the exception happens when the plan is invalid for the customer and there isn't a proper error handling for the case then this exception was thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
4 participants