bubblewrap icon indicating copy to clipboard operation
bubblewrap copied to clipboard

Receiving a session destroyed error while running bubblewrap init

Open amanganelloaltimetrik opened this issue 3 years ago • 9 comments

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:

  1. Try to run bubblewrap init --manifest=https://www.citivelocity.com/worthi/eppublic/helloworthi/manifest.json
  2. add the requested data (urls are in the manifest)
  3. See error

Expected behavior The command should run without any issue

Screenshots image

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.

amanganelloaltimetrik avatar Jun 02 '22 19:06 amanganelloaltimetrik

I am also facing same error while running below command from Angular CLI

bubblewrap init --manifest=https://appname.1.azurestaticapps.net/manifest.webmanifest

sagar2503 avatar Jun 28 '22 18:06 sagar2503

i have same error also. is there any solution? my os :windows 10.

sundy19 avatar Jul 16 '22 02:07 sundy19

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 avatar Jul 18 '22 09:07 andreban

@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

sundy19 avatar Jul 18 '22 15:07 sundy19

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.

alfreema avatar Sep 27 '22 15:09 alfreema

@amanganelloaltimetrik Please change directory for running bubblewrap init and try again.

smarteye520 avatar Apr 26 '23 05:04 smarteye520

Same problem on Windows 11. Changing folder "solved" the problem.

hervehobbes avatar Mar 15 '24 14:03 hervehobbes