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

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

Closed
beeman opened this issue Dec 24, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@beeman
Copy link
Contributor

beeman commented Dec 24, 2019

🐞 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




@beeman beeman added the bug Something isn't working label Dec 24, 2019
@Splaktar
Copy link
Contributor

I had a similar issue (reported in #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.

@beeman
Copy link
Contributor Author

beeman commented Dec 27, 2019

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

beeman added a commit to beeman/scully-starter that referenced this issue Dec 28, 2019
@SanderElias
Copy link
Contributor

Closing to focus discussion in #31

@Arman-91
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants