Mac OSX - Running without docker, login successful but thereafter logging out again

I have…

  • [x ] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

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

Current behavior

After following the https://docs.squidex.io/01-getting-started/contributing-and-developing/developing page, I have got a working login page at https://localhost:5001 (not 5000 as documented), it successfully logins (by debugging) but after redirection it goes back to the login page.

Expected behavior

When I am pulling a fresh code base from github and run the desired commands I would expect at least a working solution.

Minimal reproduction of the problem

git clone https://github.com/Squidex/squidex.git
git clone https://github.com/squidex/squidex-docker
cd squidex-docker/dependencies
docker-compose up -d
(that runs fine)
cd …/…
cd frontend # Go to the frontend
npm i # Install all dependencies, only needed the first time
npm start

Builds and serves normally

Adjust appsettings.json -> insert values for adminEmail and adminPassword

Open another terminal:
cd backend
cd src/Squidex
dotnet restore # Install all dependencies
dotnet run

Builds normally.

Opening https://localhost:5001/ shows the login Page. Opening the popup works as expected, after succesfully logging in the popup closes, the page is loading another page but never completes it.

Console log (chrome):

Network tab:

I can only put one image in this post as new user

So it is interesting to see that userinfo can be called successfully, but then the API doesn’t let me authenticate.

Environment

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

Version: Latest master branch

Browser:

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

Others:
The whole reason why I am actually doing it via this way is because the docker-way was not working out either. After a lot of file permission issues and mismatch in folder structure from linux (because the docker-compose.yml seems to be written for linux and does not support mac by default). In anyway I got further using this method.

Hi, we had to make a few changes to our development process recently, because Chrome enforced as to also use https for development. The docs are not updated yet and we do not have a Mac available. So we basically need your help.

Have you checked the logs?

Hi Sebastian,

Thanks for getting back to me. I’m not a favor in Mac either but unfortunately have to deal with it :).

I have re-cloned the repo with the 4.2.0 Tag. I had to adjust the appsettings.json and change baseUrl to port 5000. That seems to work out fine up until now.

Hi Sebastian,

Im having the same issue with my debian installation.
Trying it on Master rep.

Logging output when I try to login:

{
  "logLevel": "Error",
  "message": "Exception occurred while processing message.",
  "eventId": {
    "id": 3,
    "name": "ProcessingMessageFailed"
  },
  "app": {
    "name": "Squidex",
    "version": "1.0.0.0",
    "sessionId": "c731dd60-0d2b-495a-b03b-8e720ea6c1a9"
  },
  "web": {
    "requestId": "|b31ed5b8-4566e0e701acba64.",
    "requestPath": "/apps",
    "requestMethod": "GET"
  },
  "timestamp": "2020-05-02T20:13:51Z",
  "category": "Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler",
  "exception": {
    "type": "System.InvalidOperationException",
    "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
    "stackTrace": "   at Microsoft.IdentityModel.Protocols.ConfigurationManager\u00601.GetConfigurationAsync(CancellationToken cancel)\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()"
  }
}

{
  "logLevel": "Error",
  "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
  "app": {
    "name": "Squidex",
    "version": "1.0.0.0",
    "sessionId": "c731dd60-0d2b-495a-b03b-8e720ea6c1a9"
  },
  "web": {
    "requestId": "|b31ed5b8-4566e0e701acba64.",
    "requestPath": "/apps",
    "requestMethod": "GET"
  },
  "timestamp": "2020-05-02T20:13:51Z",
  "category": "IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler",
  "exception": {
    "type": "System.InvalidOperationException",
    "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
    "stackTrace": "   at Microsoft.IdentityModel.Protocols.ConfigurationManager\u00601.GetConfigurationAsync(CancellationToken cancel)\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.AuthenticationHandler\u00601.AuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)\n   at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()"
  }
}

{
  "logLevel": "Error",
  "message": "Exception occurred while processing message.",
  "eventId": {
    "id": 3,
    "name": "ProcessingMessageFailed"
  },
  "app": {
    "name": "Squidex",
    "version": "1.0.0.0",
    "sessionId": "c731dd60-0d2b-495a-b03b-8e720ea6c1a9"
  },
  "web": {
    "requestId": "|b31ed5bc-4566e0e701acba64.",
    "requestPath": "/apps",
    "requestMethod": "GET"
  },
  "timestamp": "2020-05-02T20:13:51Z",
  "category": "Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler",
  "exception": {
    "type": "System.InvalidOperationException",
    "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
    "stackTrace": "   at Microsoft.IdentityModel.Protocols.ConfigurationManager\u00601.GetConfigurationAsync(CancellationToken cancel)\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()"
  }
}

{
  "logLevel": "Error",
  "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
  "app": {
    "name": "Squidex",
    "version": "1.0.0.0",
    "sessionId": "c731dd60-0d2b-495a-b03b-8e720ea6c1a9"
  },
  "web": {
    "requestId": "|b31ed5bc-4566e0e701acba64.",
    "requestPath": "/apps",
    "requestMethod": "GET"
  },
  "timestamp": "2020-05-02T20:13:51Z",
  "category": "IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler",
  "exception": {
    "type": "System.InvalidOperationException",
    "message": "IDX20803: Unable to obtain configuration from: \u0027https://127.0.0.1:5001/identity-server/.well-known/openid-configuration\u0027.",
    "stackTrace": "   at Microsoft.IdentityModel.Protocols.ConfigurationManager\u00601.GetConfigurationAsync(CancellationToken cancel)\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.AuthenticationHandler\u00601.AuthenticateAsync()\n   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)\n   at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()"
  }
}

Any idea on how to solve it?

I added a hint to the docs: https://docs.squidex.io/01-getting-started/installation/install-docker#i-see-a-idx-20803-unable-to-obtain-configuration-from-less-than-ip-greater-than-in-the-logs

Hi,

Thanks for the hint, I’m not using docker, just running it by following the development guide like the OP did.

cd frontend # Go to the frontend
npm i # Install all dependencies, only needed the first time
npm start

and

cd backend
cd src/Squidex
dotnet restore # Install all dependencies
dotnet run

Like OP I’m also able to get it to work with the 4.2 tag.
Could it be related to the insecure SSL cert?

Thanks!

Seems to be related to the cert somehow. Probably need to add it to my debian install.

But for now I got it working on the master branch by disabling Https

Program.cs
//listenOptions => listenOptions.UseHttps("../../../dev/squidex-dev.pfx", "password"));

its good enough for now.

Yes, you have to install the dev cert. It is only intended for development usage and is not used when ASPNETCORE_ENVIRONMENT=Production.

Please do not use Development for production usage.

Thanks for the help Sebastian. Also, its really a great piece of software. Good work!

1 Like

Perhaps one more note for VSCode users, add a launchSettings.json file to define Development environment instead of production. Might not be so obvious when running from command.

I forgot to mention that I also changed https to http in the baseUrl.

1 Like

Http will probably not work very long, because chrome has changed increased the security level and redirects from non-https urls are not working anymore in some cases.