microsoft / microsoft/powerbi-visuals-webpack-plugin

assets/status returns empty mime type, fills console with "XML Parsing Error: syntax error" when auto-reload turned on.

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Operating System: macOS 10.15.7
Browser: Firefox 88.0.1 (64-bit)
Node Version: v12.18.1
powerbi-visuals-tools Version: 3.1.19
powerbi-visuals-webpack-plugin Version: 2.2.6

webpack-dev-server is unable to determine the correct mime type for the status file since there is no extension.

It returns the content header with no mime type: Content-Type: ; charset=UTF-8. By default, the browser treats this as text/html and tries to parse the content as HTML. This results in an "XML Parsing Error: syntax error" in the console.

When auto-reload is enabled the console gets filled with these errors, making it unusable for debugging/development.

image

I had a look at how webpack-dev-server determines the mime type and it doesn't seem possible to override it without an extension. The best option would probably be to just give the filename an extension e.g. status.txt it would then be served as text/plain and shouldn't trigger the XML parser error.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the webpack-dev-server status endpoint is named and served when auto-reload is enabled; the issue does not identify a source file or test. Confirm the status response has a non-empty text MIME type and that repeated auto-reload checks no longer produce browser parsing errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.