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

installPlugin with resource set to git:directory and path fail with "Invalid PACK header" #1999

Open
ocean90 opened this issue Nov 18, 2024 · 0 comments

Comments

@ocean90
Copy link
Member

ocean90 commented Nov 18, 2024

I tried the example from here to install my plugin via a git checkout but it failed to load:

[17-Nov-2024 16:54:27 UTC] JavaScript Error: An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid PACK header ''
InternalError: An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid PACK header ''
    at il (https://playground.wordpress.net/assets/config-cbfee45e.js:701:49891)
    at async Et.fromPack (https://playground.wordpress.net/assets/config-cbfee45e.js:706:29949)
    at async jl (https://playground.wordpress.net/assets/config-cbfee45e.js:719:288)
    at async Rl (https://playground.wordpress.net/assets/config-cbfee45e.js:706:35578)
    at async Zl.resolve (https://playground.wordpress.net/assets/config-cbfee45e.js:743:1093)
    at async du (https://playground.wordpress.net/assets/config-cbfee45e.js:750:147396)
    at async o (https://playground.wordpress.net/assets/config-cbfee45e.js:750:147012)
    at async Object.run (https://playground.wordpress.net/assets/config-cbfee45e.js:750:145889)
    at async hu (https://playground.wordpress.net/assets/config-cbfee45e.js:750:147453)
    at async Vu (https://playground.wordpress.net/assets/config-cbfee45e.js:754:16954)
[17-Nov-2024 16:54:27 UTC] JavaScript Error: Error when executing the blueprint step #1 ({"step":"installPlugin","pluginData":{"resource":"git:directory","url":"https://github.com/ocean90/public-post-preview.git","ref":"HEAD","path":"wp-content/plugins/public-post-preview"},"options":{"activate":true}}) : An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid PACK header ''
Error: Error when executing the blueprint step #1 ({"step":"installPlugin","pluginData":{"resource":"git:directory","url":"https://github.com/ocean90/public-post-preview.git","ref":"HEAD","path":"wp-content/plugins/public-post-preview"},"options":{"activate":true}}) : An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid PACK header ''
    at Object.run (https://playground.wordpress.net/assets/config-cbfee45e.js:750:145934)
    at async hu (https://playground.wordpress.net/assets/config-cbfee45e.js:750:147453)
    at async Vu (https://playground.wordpress.net/assets/config-cbfee45e.js:754:16954)
    at async https://playground.wordpress.net/assets/main-2ed6f775.js:173:2459
Url
https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fraw.githubusercontent.com%2Focean90%2Fpublic-post-preview%2Frefs%2Fheads%2Fmaster%2F.wordpress-org%2Fblueprints%2Fblueprint-development.json
Context
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","window":{"width":1490,"height":758}}
Blueprint
{}

This was the version: ocean90/public-post-preview@e6106fb

After searching a bit I found this comment by @adamziel and also set the path to /, see ocean90/public-post-preview@fab7d28. Now the installation went through (Playground link) but I get a 404 error for the assets in the block editor:

GET https://playground.wordpress.net/scope:energetic-cozy-park/wp-content/plugins/js/dist/gutenberg-integration.js?ver=6.7 net::ERR_ABORTED 404 (Not Found)

So in ocean90/public-post-preview@8ed2a8e I tried path set to /public-post-preview and now I get the "Invalid PACK header" error again.

What value do I have to use for path?

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

No branches or pull requests

1 participant