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

Handle errors more gracefully #43

Open
fregante opened this issue Jun 10, 2020 · 7 comments
Open

Handle errors more gracefully #43

fregante opened this issue Jun 10, 2020 · 7 comments

Comments

@fregante
Copy link
Owner

fregante commented Jun 10, 2020

Known errors should be parsed and displayed more cleanly

Publish condition not met

Now

Response code 400 (Bad Request)
{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "badRequest",
                "message": "Publish condition not met: To publish your item, you must provide mandatory privacy information in the new Developer Dashboard: https://chrome.google.com/webstore/devconsole. Click on your item from the home page and enter this information on the Privacy tab."
            }
        ],
        "code": 400,
        "message": "Publish condition not met: To publish your item, you must provide mandatory privacy information in the new Developer Dashboard: https://chrome.google.com/webstore/devconsole. Click on your item from the home page and enter this information on the Privacy tab."
    }
}

Ideal

Publish condition not met: To publish your item, you must provide mandatory privacy information in the new Developer Dashboard: https://chrome.google.com/webstore/devconsole. Click on your item from the home page and enter this information on the Privacy tab.

invalid_grant

#36

Now

Response code 400 (Bad Request)
{
    "error": "invalid_grant",
    "error_description": "Bad Request"
}

Ideal

Response code 400 (Bad Request)
invalid_grant: Bad Request
Probably the supplied keys are invalid. Make sure to trim any extra spaces.
@fregante
Copy link
Owner Author

{
  "error": {
    "code": 400,
    "message": "Publish condition not met: You must provide a contact email before you can publish any item. Enter your contact email on the Account tab.; To publish your item, you must certify that your data usage complies with our Developer Program Policies. You can certify this on the Privacy practices tab of the item edit page.",
    "errors": [
      {
        "message": "Publish condition not met: You must provide a contact email before you can publish any item. Enter your contact email on the Account tab.; To publish your item, you must certify that your data usage complies with our Developer Program Policies. You can certify this on the Privacy practices tab of the item edit page.",
        "domain": "chromewebstore.access",
        "reason": "badRequest"
      }
    ]
  }
}

@fregante
Copy link
Owner Author

It should also probably include a link to https://chrome.google.com/webstore/devconsole

@fregante fregante mentioned this issue Sep 18, 2021
@fregante
Copy link
Owner Author

{
  kind: 'chromewebstore#item',
  id: 'bdeobgpddfaegbjfinhldnkfeieakdaf',
  uploadState: 'FAILURE',
  itemError: [
    {
      error_code: 'PKG_MANIFEST_PARSE_ERROR',
      error_detail: 'The manifest has an invalid version: 0.0.0. Please format the version as defined \n' +
        '      <a href="https://developer.chrome.com/extensions/manifest/version" target="_blank"> here</a>.'
    }
  ]
}

@fregante
Copy link
Owner Author

{
  "error": "invalid_request",
  "error_description": "client_secret is missing."
}

@fregante
Copy link
Owner Author

fregante commented Jun 7, 2024

Related fregante/chrome-webstore-upload#83

@fregante
Copy link
Owner Author

There was a regression in v3 I think.

Before

npm WARN exec The following package was not found and will be installed: [email protected]
- Fetching token
{
  "error": "invalid_grant",
  "error_description": "Bad Request"
}
Probably the provided refresh token is not valid. Try following the guide again
https://github.com/fregante/chrome-webstore-upload/blob/main/How%20to%20generate%20Google%20API%20keys.md
{
  clientId: '***',
  refreshToken: '***'
}

After

npm warn exec The following package was not found and will be installed: [email protected]
- Fetching token
Error: Bad Request
    at throwIfNotOk (file:///home/runner/.npm/_npx/da388c0a4eab99e8/node_modules/chrome-webstore-upload/index.js:27:23)
    at APIClient.fetchToken (file:///home/runner/.npm/_npx/da388c0a4eab99e8/node_modules/chrome-webstore-upload/index.js:123:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async doAutoPublish (file:///home/runner/.npm/_npx/da388c0a4eab99e8/node_modules/chrome-webstore-upload-cli/cli.js:75:19)
    at async init (file:///home/runner/.npm/_npx/da388c0a4eab99e8/node_modules/chrome-webstore-upload-cli/cli.js:173:9)
    at async file:///home/runner/.npm/_npx/da388c0a4eab99e8/node_modules/chrome-webstore-upload-cli/cli.js:182:5 {
  response: undefined
}

@appurist
Copy link

appurist commented Aug 2, 2024

@fregante your comment that it should probably provide a link to https://chrome.google.com/webstore/devconsole resolved this problem for me. Thank you soooo much for mentioning that. The help explaining why can't I submit only mentioned the missing contact address and "the Account tab" (with no link) that doesn't seem to exist anywhere in the UI. If I go to the Google account settings, I see I already have three contact email addresses defined. But when I went to the webstore/devconsole, I could see there was no contact email there and everything made sense. A very minor tweak (like making "Account tab" a link to the dev console) would completely resolve this. Thanks again for mentioning it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants