lowcoder-org / lowcoder

🔥 🔥 🔥 The Open Source Retool, Tooljet and Appsmith Alternative
https://www.lowcoder.cloud/
GNU Affero General Public License v3.0
937 stars 193 forks source link

[Bug]: Enterprise Mode is not working after Version 2.3.1 #1258

Open devapplicationbuilder opened 4 weeks ago

devapplicationbuilder commented 4 weeks ago

Is there an existing issue for this?

Current Behavior

If I start the application in enterprise mode and try to create an account (which I expect to be an administrator account later), I receive the following error in the logs:

2024-10-25 16:33:58.865 ERROR o.l.a.f.exception.CustomErrorWebExceptionHandler#render:92 [nioEventLoopGroup-3-4]: oops class java.lang.NullPointerException, Cannot invoke "org.lowcoder.domain.user.model.ConnectionAuthToken." getExpireAt()" because the return value of "org.lowcoder.domain.user.model.Connection.getAuthConnectionAuthToken()" is null 2024-10-25 16:33:58.896 ERROR org.springframework.core.log.CompositeLog#error:102 [nioEventLoopGroup-3-4]: [ea703a0c-4] 500 Server Error for HTTP GET "/api/users/me " java.lang.NullPointerException: Cannot invoke "org.lowcoder.domain.user.model.ConnectionAuthToken.getExpireAt()" because the return value of "org.lowcoder.domain.user.model.Connection.getAuthConnectionAuthToken()" is null at org.lowcoder.api.framework.filter.UserSessionPersistenceFilter.lambda$filter$1(UserSessionPersistenceFilter.java:83) Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Assembly trace from producer [reactor.core.publisher.MonoMapFuseable] : reactor.core.publisher.Mono.map org.lowcoder.api.framework.filter.UserSessionPersistenceFilter.filter(UserSessionPersistenceFilter.java:66)

Expected Behavior

I expect that when I want to start the application in enterprise mode, I can create an account in the application, and the first account I log in with will be an administrator account. As it happens in version 2.3.1

Steps to reproduce

  1. docker pull lowcoderorg/lowcoder-ce
  2. start container using ENV_VARIABLE: LOWCODER_WORKSPACE_MODE = ENTERPRISE
  3. sign up with an user

Environment

I tried both on version 2.4.10 and on the latest version from docker hub

Additional Information

No response

FalkWolsky commented 1 week ago

For the upcoming v2.5 we introduce a major change about this general issue - the Login Flow. Aside of better control for the login by workspace, we also introduce the /admin/login path - where a Super Admin can login and create the settings for the Auth Providers. Based on the ENV Variables we also allow then to effectively disable eMail as Auth Provider. Also, you can make use of the SuperAdmin ENV Variables to control the user credentials.