Scully: Invalid content-type. Expected application/json but received text/html; charset=UTF-8

Created on 24 Dec 2019  ·  3Comments  ·  Source: scullyio/scully

🐞 Bug report

Description

I'm running into an issue where I can't get Scully to run in my project.

It looks like it can't connect to Puppeteer, though that's a wild guess.

A repro can be found in this repo. In order to make sure it's not something on my local machine I've added a Docker configuration that shows the issue.

🔬 Minimal Reproduction

In order to get this error:

git clone https://github.com/beeman/scully-starter
cd scully-starter
yarn docker:build

.....DOCKER BUILD OUTPUT HERE.....
$ scully
The option outFolder isn't configures, we are using "/workspace/dist/static/ by default now"
Cleaned up /workspace/dist/static/ folder.
 ☺   new Angular build imported
started servers in background
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Invalid content-type.
Expected application/json but received text/html; charset=UTF-8
Could not connect to server

💻Your Environment

Angular Version:



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 9.0.0-rc.7
Node: 12.12.0
OS: darwin x64

Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.7
@angular-devkit/build-angular     0.900.0-rc.7
@angular-devkit/build-optimizer   0.900.0-rc.7
@angular-devkit/build-webpack     0.900.0-rc.7
@angular-devkit/core              9.0.0-rc.7
@angular-devkit/schematics        9.0.0-rc.7
@angular/cdk                      8.2.3
@ngtools/webpack                  9.0.0-rc.7
@schematics/angular               9.0.0-rc.7
@schematics/update                0.900.0-rc.7
rxjs                              6.5.3
typescript                        3.6.4
webpack                           4.41.2

Scully Version:


    "@scullyio/init": "0.0.9",
    "@scullyio/ng-lib": "0.0.7",
    "@scullyio/scully": "0.0.46",

🔥 Exception or Error




bug

Most helpful comment

I had a similar issue (reported in https://github.com/scullyio/scully/issues/31), but the root cause turned out to be a lack of support for catch all routes (mine went to a PageNotFoundComponent).

Since you don't have any catch all routes, it's likely something to do with how you have your root component and child component configured with the '' path.

All 3 comments

I had a similar issue (reported in https://github.com/scullyio/scully/issues/31), but the root cause turned out to be a lack of support for catch all routes (mine went to a PageNotFoundComponent).

Since you don't have any catch all routes, it's likely something to do with how you have your root component and child component configured with the '' path.

That's a good point @Splaktar, I will check to see if changing that fixes it.

Closing to focus discussion in #31

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pierresigwalt picture pierresigwalt  ·  4Comments

xmlking picture xmlking  ·  3Comments

pjlamb12 picture pjlamb12  ·  6Comments

puku0x picture puku0x  ·  4Comments

Gyrosh picture Gyrosh  ·  5Comments