404 Responses from Squidex

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

Since upgrading to the latest Squidex commit on master from 6.3.0 we are receiving a 404 response when accessing Squidex via the main base URL. Hosting locally via Docker I have the same problem too.

{
traceId: "00-e93184d2523abf5411d1448b20963c68-35fcefa4bbf1c23a-01",
type: "https://tools.ietf.org/html/rfc7231#section-6.5.4",
statusCode: 404
}

We can still access the login page via the known URL of

http://localhost:5002/identity-server/Account/Login

However all other requests appear to return a 404. The appsettings configuration for Urls I am using is shown below

	"urls": {
		"baseUrl": "http://localhost/",
		"basePath": "/",
		"enforceHttps": false,
		"enforceHost": false,
		"knownProxies": [],
		"enableForwardHeaders": true,
		"trustedHosted": []
	},

Expected behavior

Returns the default login screen or the apps screen when navigating to the base URL.

Minimal reproduction of the problem

Environment

App Name:

  • [x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: 6.4.0(Latest master commit)

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
I’ve tested this hosting via IIS and Kestrel and get the same result

Can you try to unset the basePath setting?

Hi Sebastian, I’ve unset the basePath setting and still receive a 404.

We have since moved to the tagged version 6.4.0 and can confirm it’s working.

I just tested it out and it works fine for me.

https://dev4.squidex.io/app,

Username: mail2stehle@gmail.com
Password: 1q2w3e$R

Hi Sebastian, we have been testing internally and believe we have identified the commit that is causing us issues.

Currently we generate multiple different appsettings.{environment}.json files for each environment that we deploy to for example

  • appsettings.environment1.json
  • appsettings.local_gb.json
  • appsettings.staging_gb.json
  • appsettings.live_gb.json

we then pass the ASPNETCORE_ENVIRONMENT={environment} into the container via environment variables.

From this commit onwards we have been been receiving a 404 when trying to use Squidex. There are some changes in the Frontend startup.cs that where the code doesn’t flow through the correct paths as our environment is not Development, Staging or Production.

Makes sense, because Squidex expects only Development and Production. It could be probably changed by changing every

if (IsProduction())

to

if (!IsDevelopment())