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

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

Closed
ValenTranshuman opened this issue Feb 16, 2023 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@ValenTranshuman
Copy link

Version of Marp Tool

MARP for VSCode v2.4.1

Operating System

Windows

Environment

  • OS version: Windows 11 Insider Preview 25300.1000
  • Node.js version v20.0.0-nightly202302151b87cb6f39
  • VS Code version 1.76.0-insider
  • MARP for VSCode version: 2.4.1

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

<style> h4 { color: #2596be; text-align: center; } h6 { color: #2596be; text-align: center; } </style>
<style> h5 { color: #2596be; text-align: center; } h6 { color: gray; text-align: center; } h2 { font-size: 30px; color: #2596be; } h3 { text-align: center; } h4 { text-align: center; } section { font-size: 25px; border-radius: 55px; outline: 2px solid #2596be; outline-offset:-10px; padding:220px; text-align: center; } img[src*="#thumbnail"] { width:150px; height:80px; } </style>

companyLogo

Department Notes / Handout

Department

by Author

Feedback:

Exampletext Lorem Ipsum Test
`

@ValenTranshuman ValenTranshuman added the bug Something isn't working label Feb 16, 2023
@ValenTranshuman
Copy link
Author

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 yhatt transferred this issue from marp-team/marpit Feb 16, 2023
@yhatt
Copy link
Member

yhatt commented Feb 16, 2023

🚚 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.

@yhatt yhatt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@yhatt yhatt added the duplicate This issue or pull request already exists label Feb 17, 2023
@ValenTranshuman
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants