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

uploadExisting throwing error: Cannot destructure property 'headers' of 'globalRequest.options' as it is undefined #41

Closed
Baegus opened this issue Sep 3, 2020 · 11 comments
Labels

Comments

@Baegus
Copy link

Baegus commented Sep 3, 2020

For some reason, when I try to upload a ZIP to the Web Store using the "uploadExisting" method, it is now throwing an error:
Cannot destructure property 'headers' of 'globalRequest.options' as it is undefined

The same script worked yesterday... Any ideas?

@fregante
Copy link
Owner

fregante commented Sep 3, 2020

Did you update to the latest version in the meanwhile or are you completely sure it’s the same exact version in both runs?

@Baegus
Copy link
Author

Baegus commented Sep 4, 2020

It's possible that the package version was different, since I'm running it from GitLab CI and it always pulls the latest one.

@darkobits
Copy link

Also ran into this issue when upgrading from 0.2.2 to 0.4.0. Reverted to 0.2.2 and the issue was resolved.

@fregante
Copy link
Owner

fregante commented Sep 4, 2020

Ok, I reverted the got update once again.

chrome-webstore-upload@0.4.1 is now identical to v0.3.1 and v0.2.2.

cc @fire015

@fregante fregante closed this as completed Sep 4, 2020
@fregante
Copy link
Owner

fregante commented Sep 4, 2020

The code on master is unchanged however and the tests need to be fix to mock the HTTP responses instead of got’s.

@fregante fregante reopened this Sep 4, 2020
@fire015
Copy link
Contributor

fire015 commented Sep 4, 2020

@fregante looking at this quickly, if you install 0.4.0 you get a newer version of got (11.6.0 instead of 11.5.2 which is what we based the changes on). I would suggest you either commit a package-lock.json file locking to 11.5.2 or change package.json to "got": "~11.5.2". There is no need to go back to the old library.

@fregante
Copy link
Owner

fregante commented Sep 4, 2020

That'd explain why it apparently worked for @Baegus 2 days ago but not yesterday (right before and after 11.6.0), but minor releases should not be breaking. Is this a got error?

cc @szmarczak I can see that this was changed:

sindresorhus/got@v11.5.2...v11.6.0#diff-6be2971b2bb8dbf48d15ff680dd898b0R191

@szmarczak
Copy link

Good catch! I'll try to fix this on Sunday or Monday. I have just moved to a different flat.

@fregante
Copy link
Owner

fregante commented Sep 4, 2020

I would suggest you either commit a package-lock.json file locking to 11.5.2 or change package.json to "got": "~11.5.2". There is no need to go back to the old library.

We can't publish locks, they're ignored when the module is installed as a dependency. However we can use "got": "11.5.2" in package.json: 0cae205

This has been published as v0.4.2 with the new got. Sorry for the semver mess for 0.4.1

@fregante fregante closed this as completed Sep 4, 2020
@szmarczak
Copy link

@fregante I think for the workaround you can set responseType to json and resolveBodyOnly to true. It should give the same as promise.json().

@fregante
Copy link
Owner

fregante commented Sep 4, 2020

Thank you! I think we're ok at the moment with 11.5.2, I'll just update the dependency when sindresorhus/got#1438 is done. No rush

@fregante fregante added the bug label Sep 4, 2020
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