Receiving a session destroyed error while running bubblewrap init
Describe the bug While running bubblewrap init --manifest=https://www.citivelocity.com/worthi/eppublic/helloworthi/manifest.json I am receiving a non descriptive error saying Cli Error the session has been destroyed.
I already validated jdk and androidSdk. Is there a way to see logs to have a better understanding what is going wrong?
To Reproduce Steps to reproduce the behavior:
- Try to run bubblewrap init --manifest=https://www.citivelocity.com/worthi/eppublic/helloworthi/manifest.json
- add the requested data (urls are in the manifest)
- See error
Expected behavior The command should run without any issue
Screenshots

Desktop (please complete the following information):
- OS: macOS Monterrey v 12.2.1
- MacBook Pro, 2 Ghz Quad-Core Intel Core i5, 16 GB LPDDR4X
Additional context Add any other context about the problem here.
I am also facing same error while running below command from Angular CLI
bubblewrap init --manifest=https://appname.1.azurestaticapps.net/manifest.webmanifest
i have same error also. is there any solution? my os :windows 10.
On @amanganelloaltimetrik error:
The error I'm getting is:
cli ERROR Unsupported MIME type: image/webp
It seems that when fetching a PNG image, the server is returning a WebP image instead, which is not supported. Notice Bubblewrap is using the Firefox user-agent header for compatibility:
curl -v -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" https://www.citivelocity.com/worthi/eppublic/helloworthi/images/pwaIcons/iOS_1024x1024.png
Shouldn't the server return the request PNG here instead of a Webp image?
On @sagar2503 error, the manifest is returning a 404, so I can't repro.
@sundy19 , if you share the Web Manifest URL, I may try to repro (in general, adding a reaction like a "thumbs up" to the issue is preferable over a "me too" comment).
@andreban thanks. when tried "bubblewrap init --manifest=https://www.airbnb.com/manifest.json" on both Ubuntu 22.04 LTS and Windows 10 pro(19044.1766), i had same failure. "Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed\n at new NodeError (node:internal/errors:372:5)\n at ClientHttp2Session.request (node:internal/http2/core:1721:13)\n at doFetch (c:\Users\dsun2\AppData\Roaming\npm\node_modules\@bubblewrap\cli\node_modules\fetch-h2\dist\lib\fetch-http2.js:51:32)"
line#350 of TwaGenerator.js, it seems to be the culprit and this line seems not necessary . so i commented it. and all work well. await this.writeWebManifest(twaManifest, targetDirectory);
look forward to your comment. thanks
I am also on Ubuntu 22.04 LTS under Windows 11, and per @sundy19's instructions can confirm commenting out line 350 of TwaGenerator.js got me past the problem.
For me, the path to the file is horrificly long:
/home/[username]/.nvm/versions/node/v14.18.1/lib/node_modules/@bubblewrap/cli/node_modules/@bubblewrap/core/dist/lib/TwaGenerator.js
But #350 was the same as described by @sundy19.
@amanganelloaltimetrik Please change directory for running bubblewrap init and try again.
Same problem on Windows 11. Changing folder "solved" the problem.