marp-team / marp-vscode

Marp for VS Code: Create slide deck written in Marp Markdown on VS Code
https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode
MIT License
1.56k stars 73 forks source link

Exporting Marp Document fails with error code "Failure to export: [TypeError] Cannot read properties of undefined (reading 'encrypted')" #407

Closed ValenTranshuman closed 1 year ago

ValenTranshuman commented 1 year ago

Version of Marp Tool

MARP for VSCode v2.4.1

Operating System

Windows

Environment

How to reproduce

  1. Create Marp file with css styling
  2. Use the "Export Slide Deck" Feature in Marp for VSCode
  3. Choose the export option (the choice here does not matter, pdf doesn't work, html doesn't work, etc.)
  4. Get Error Message "Failure to export: [TypeError] Cannot read properties of undefined (reading 'encrypted')"

Notes:

  1. Setting a custom path to my current version of Chrome doesn't change the behaviour
  2. The browser doesn't open, I have set the path to Edge's.exe and Opera's.exe as well as Chrome Canary's.exe to test whether this changes things and it does not
  3. The document also does not export without the browser opening, I have confirmed by checking the export location for any new files

Expected behavior

  1. The Slide Deck should export after showing Export Options
  2. The browser should open during this process

Actual behavior

  1. The Slide Deck asks whether to export as PDF or PNG, HTML, etc.
  2. No matter which option is chosen, it always fails with the error message "Failure to export: [TypeError] Cannot read properties of undefined (reading 'encrypted')"
  3. It does not open any browser.
  4. Copy/Pasting the exact same code into the Web Version of MARP and printing as PDF works as expected and is my current workaround.

Additional information

Here is the code stripped of all confidential information, I have also tried exporting this exact version and it does not work in Marp for VSC, but it does work with my workaround as detailed in "Actual Behavior"

`---

marp: true

theme: uncover


companyLogo

Department Notes / Handout

Department

by Author

Feedback:

Exampletext Lorem Ipsum Test `

ValenTranshuman commented 1 year ago

I have now confirmed that whether or not CSS styling is used does not matter.

The use of images via URLs or file locations also doesn't matter.

The code I used to test this was:

marp: true

theme: uncover


Department Notes / Handout

Department

by Author

Feedback:

Exampletext Lorem Ipsum Test

Result:

  1. This code does not export and fails with the same error message as code with CSS styling and images
  2. The error message is the same ("Failure to export: [TypeError] Cannot read properties of undefined (reading 'encrypted')")
yhatt commented 1 year ago

🚚 Transferred issue from Marpit framework to Marp for VS Code. A reported problem is the issue of VS Code extension, not Marpit framework.

Duplicated: #402 and marp-team/marp#391. Please report and truck the problem at #402.

ValenTranshuman commented 1 year ago

Since this was closed and it seems to fit better into linked issue #402, I have added my own Stack Trace to the issue and added a permanent fix.

However, I also want to add this here if someone finds this issue instead and wants a quick resolution: In Issue #402 it was found that having either Azurite or Swagger Viewer installed causes the same issue I had.

I had neither of these two installed but I had vscode-spotify installed and that caused the issue.

Uninstalling the extension fixed my problem so it might do the same for anyone else with the same problem.

I will close this issue again now since it's been resolved.