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

Error client_secret is missing #44

Closed
jviney opened this issue Jan 29, 2021 · 18 comments
Closed

Error client_secret is missing #44

jviney opened this issue Jan 29, 2021 · 18 comments
Assignees
Labels

Comments

@jviney
Copy link

jviney commented Jan 29, 2021

Started to get this error after upgrading to 1.2.1 today:

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

Reverting back to 1.2.0 fixed the issue.

@fregante
Copy link
Owner

Thanks for opening an issue. I posted a simple update (fregante/chrome-webstore-upload@93a0c3a) to test the logic in fregante/chrome-webstore-upload#46, but I thought that the change exclusively avoided checking for the existence of client_secret before being sent to the API.

I didn't see that it was actually just a list of parameters, all of which were required:

fregante/chrome-webstore-upload@93a0c3a

I'll push 0.4.4 soon

@fregante fregante self-assigned this Jan 29, 2021
@fregante fregante added the bug label Jan 29, 2021
@fregante
Copy link
Owner

fregante commented Jan 29, 2021

@fregante
Copy link
Owner

Since you're using that module through chrome-webstore-upload-cli, you'll have to reinstall it and make sure it downloaded chrome-webstore-upload v0.4.4 instead of v0.4.3

@fregante
Copy link
Owner

fregante commented Sep 18, 2021

Changes in v2.0+ 👈 👈

The secret is no longer required as long as you create a Chrome App. If you're seeing this message again, please follow the new guide to create new keys: https://github.com/fregante/chrome-webstore-upload/blob/main/How%20to%20generate%20Google%20API%20keys.md

The existing keys should keep working for the foreseeable future though.

@khuzama98
Copy link

Hey @fregante, I'm having some confusion. I'm trying to implement the github actions for chrome webstore but almost every action I came across asks for the client-secret. Only your cli tool seems to be following the latest updates. So I think I have to implement your cli tool in my workflow. Also let me know one thing that whenever I want to upload the extension the tool will be handling the access token expiration, correct me if I'm wrong.

@fregante
Copy link
Owner

fregante commented Oct 3, 2021

Yes that's the idea. I have not personally used this new key to publish real extensions, but another user reported it was still working months later I think.

To ensure it works, you have to follow the latest guide because your old keys will still require the secret.

I'm also about to release an action so maybe you won't have to 😉

@khuzama98
Copy link

So if I omit the client-secret it should still work as I'm using the latest guide?
https://github.com/fregante/ghatemplates/blob/main/webext/release.yml
Here in this action there exist secret I'm gonna skip the secret and try it out.

@fregante
Copy link
Owner

fregante commented Oct 3, 2021

That workflow still uses v1, which needs the secret. You can replace v1 with v2 in your workflow and omit the secret (which does not exist in the new guide)

@khuzama98
Copy link

Thanks for heads up, but after using the v2 it's showing me this error.

error-chrome-web-ext

Can you check it and let me know what's causing the issue?

@AprilSylph
Copy link
Contributor

What node version is that workflow running? v2 needs 14+ (noted here)

@khuzama98
Copy link

Ohh thanks @AprilSylph , I'll check it with the node 14.

@fregante
Copy link
Owner

fregante commented Oct 4, 2021

Here an extension release I did today with the current version, without secret:

@stefanbuck
Copy link
Contributor

I had a pretty old setup from 2016 and it broke as expected. However following the steps to re-create a new oauth app was super smooth.

@fregante
Copy link
Owner

fregante commented Nov 1, 2021

it broke as expected

That wasn't expected 🤭

v2 was released as a breaking release as a precaution but the old code is supposedly still there and working, if the secret is still available.

Anyway glad that the steps were working, 👌 they might be a little different if one is using a pre-existing Google API project

@stefanbuck
Copy link
Contributor

If you created the APIs before version 2.0.0 (September 2021) ...

Therefore I thought it is expected. From my observation and memories the application type Chrome app was not available back then and I think I used Web app as recommend back then. Maybe this is the reason why.

@fregante
Copy link
Owner

fregante commented Nov 1, 2021

I mean that after the update, your existing config should have kept working, as noted in the release notes:

https://github.com/fregante/chrome-webstore-upload-cli/releases/tag/v2.0.0

But if you updated it and also delete the client_secret, then yes, the failure was expected.

The suggestion was to keep the keys untouched

@stefanbuck
Copy link
Contributor

I mean that after the update, your existing config should have kept working

This was not the case. I re-created and update the client_seccret after it was failing.

@fregante
Copy link
Owner

fregante commented Nov 1, 2021

Ouch. Thanks for the report

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

No branches or pull requests

5 participants