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

Admin 的 localstorage 缓存导致重装 Halo 无法进入后台 #1877

Closed
3 tasks done
Ljfanny opened this issue Apr 22, 2022 · 14 comments · Fixed by halo-dev/console#558
Closed
3 tasks done

Admin 的 localstorage 缓存导致重装 Halo 无法进入后台 #1877

Ljfanny opened this issue Apr 22, 2022 · 14 comments · Fixed by halo-dev/console#558
Labels
area/console Issues or PRs related to the Halo Console good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@Ljfanny
Copy link

Ljfanny commented Apr 22, 2022

检查清单

是什么版本出现了此问题?

1.5.2

使用的什么数据库?

H2

使用的哪种方式部署?

Fat Jar

在线站点地址

无,本地windows11系统测试

发生了什么?

正常启动后,安装向导界面为空。控制台没有任何报错信息。使用H2和Mysql数据库都有这个问题(貌似是数据库切换了之后就会出现),下面贴一下启动记录:

相关日志输出

13:42:08.889 [Thread-0] DEBUG org.springframework.boot.devtools.restart.classloader.RestartClassLoader - Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@1558fea5

    __  __      __
   / / / /___ _/ /___
  / /_/ / __ `/ / __ \
 / __  / /_/ / / /_/ /
/_/ /_/\__,_/_/\____/

Version: 
2022-04-22 13:42:09.109  INFO 3920 --- [  restartedMain] run.halo.app.Application                 : Starting Application using Java 17.0.2 on LAPTOP-5MV5L5N6 with PID 3920 (D:\LearningMaterial\halo\build\classes\java\main started by Ljfanny in D:\LearningMaterial\halo)
2022-04-22 13:42:09.110  INFO 3920 --- [  restartedMain] run.halo.app.Application                 : No active profile set, falling back to 1 default profile: "default"
2022-04-22 13:42:09.132  INFO 3920 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-04-22 13:42:09.132  INFO 3920 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-04-22 13:42:09.584  INFO 3920 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-04-22 13:42:09.584  INFO 3920 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-04-22 13:42:09.658  INFO 3920 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 70 ms. Found 24 JPA repository interfaces.
2022-04-22 13:42:10.085  INFO 3920 --- [  restartedMain] org.eclipse.jetty.util.log               : Logging initialized @1687ms to org.eclipse.jetty.util.log.Slf4jLog
2022-04-22 13:42:10.296  INFO 3920 --- [  restartedMain] o.s.b.w.e.j.JettyServletWebServerFactory : Server initialized with port: 8090
2022-04-22 13:42:10.301  INFO 3920 --- [  restartedMain] org.eclipse.jetty.server.Server          : jetty-9.4.45.v20220203; built: 2022-02-03T09:14:34.105Z; git: 4a0c91c0be53805e3fcffdcdcc9587d5301863db; jvm 17.0.2+8-LTS-86
2022-04-22 13:42:10.314  INFO 3920 --- [  restartedMain] o.e.j.s.h.ContextHandler.application     : Initializing Spring embedded WebApplicationContext
2022-04-22 13:42:10.314  INFO 3920 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1181 ms
2022-04-22 13:42:10.402  INFO 3920 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2022-04-22 13:42:10.474  INFO 3920 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2022-04-22 13:42:10.477  INFO 3920 --- [  restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2-console'. Database available at 'jdbc:h2:file:C:\Users\Ljfanny/.halo//db/halo'
2022-04-22 13:42:10.637  INFO 3920 --- [  restartedMain] run.halo.app.config.HaloConfiguration    : Halo cache store load impl : [class run.halo.app.cache.InMemoryCacheStore]
2022-04-22 13:42:10.950  INFO 3920 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-04-22 13:42:10.970  INFO 3920 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.33
2022-04-22 13:42:10.989  INFO 3920 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-04-22 13:42:11.041  INFO 3920 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2022-04-22 13:42:11.451  INFO 3920 --- [  restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-04-22 13:42:11.456  INFO 3920 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-04-22 13:42:11.764  INFO 3920 --- [  restartedMain] org.eclipse.jetty.server.session         : DefaultSessionIdManager workerName=node0
2022-04-22 13:42:11.764  INFO 3920 --- [  restartedMain] org.eclipse.jetty.server.session         : No SessionScavenger set, using defaults
2022-04-22 13:42:11.764  INFO 3920 --- [  restartedMain] org.eclipse.jetty.server.session         : node0 Scavenging every 660000ms
2022-04-22 13:42:11.769  INFO 3920 --- [  restartedMain] o.e.jetty.server.handler.ContextHandler  : Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@1e02b40d{application,/,[file:///C:/Users/Ljfanny/AppData/Local/Temp/jetty-docbase.8090.3456406872370189592/, jar:file:/C:/Users/Ljfanny/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-swagger-ui/3.0.0/1e665fbe22148f7c36fa8a08e515a0047cd4390b/springfox-swagger-ui-3.0.0.jar!/META-INF/resources],AVAILABLE}
2022-04-22 13:42:11.770  INFO 3920 --- [  restartedMain] org.eclipse.jetty.server.Server          : Started @3372ms
2022-04-22 13:42:12.016  INFO 3920 --- [  restartedMain] run.halo.app.handler.file.FileHandlers   : Registered 9 file handler(s)
2022-04-22 13:42:13.604  INFO 3920 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2022-04-22 13:42:13.610  INFO 3920 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 4 endpoint(s) beneath base path '/api/admin/actuator'
2022-04-22 13:42:13.653  INFO 3920 --- [  restartedMain] o.e.j.s.h.ContextHandler.application     : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-04-22 13:42:13.653  INFO 3920 --- [  restartedMain] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2022-04-22 13:42:13.654  INFO 3920 --- [  restartedMain] o.s.web.servlet.DispatcherServlet        : Completed initialization in 0 ms
2022-04-22 13:42:13.666  INFO 3920 --- [  restartedMain] o.e.jetty.server.AbstractConnector       : Started ServerConnector@309997b8{HTTP/1.1, (http/1.1)}{0.0.0.0:8090}
2022-04-22 13:42:13.666  INFO 3920 --- [  restartedMain] o.s.b.web.embedded.jetty.JettyWebServer  : Jetty started on port(s) 8090 (http/1.1) with context path '/'
2022-04-22 13:42:13.679  INFO 3920 --- [  restartedMain] run.halo.app.Application                 : Started Application in 4.784 seconds (JVM running for 5.281)
2022-04-22 13:42:13.680  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Starting migrate database...
2022-04-22 13:42:13.698  INFO 3920 --- [  restartedMain] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 7.15.0 by Redgate
2022-04-22 13:42:13.698  INFO 3920 --- [  restartedMain] o.f.c.i.database.base.BaseDatabaseType   : Database: jdbc:h2:file:C:\Users\Ljfanny/.halo//db/halo (H2 1.4)
2022-04-22 13:42:13.710  INFO 3920 --- [  restartedMain] o.f.c.i.s.JdbcTableSchemaHistory         : Repair of failed migration in Schema History table "PUBLIC"."flyway_schema_history" not necessary. No failed migration detected.
2022-04-22 13:42:13.717  INFO 3920 --- [  restartedMain] o.f.core.internal.command.DbRepair       : Successfully repaired schema history table "PUBLIC"."flyway_schema_history" (execution time 00:00.010s).
2022-04-22 13:42:13.719  INFO 3920 --- [  restartedMain] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 7.15.0 by Redgate
2022-04-22 13:42:13.725  INFO 3920 --- [  restartedMain] o.f.core.internal.command.DbValidate     : Successfully validated 6 migrations (execution time 00:00.004s)
2022-04-22 13:42:13.731  INFO 3920 --- [  restartedMain] o.f.core.internal.command.DbMigrate      : Current version of schema "PUBLIC": 6
2022-04-22 13:42:13.733  INFO 3920 --- [  restartedMain] o.f.core.internal.command.DbMigrate      : Schema "PUBLIC" is up to date. No migration necessary.
2022-04-22 13:42:13.733  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Migrate database succeed.
2022-04-22 13:42:13.772  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Copied theme folder from [D:\LearningMaterial\halo\build\resources\main\templates\themes] to [C:\Users\Ljfanny\.halo\templates\themes\caicai_anatole]
2022-04-22 13:42:13.784  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Halo started at         http://127.0.0.1:8090
2022-04-22 13:42:13.784  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Halo admin started at   http://127.0.0.1:8090/admin
2022-04-22 13:42:13.784  INFO 3920 --- [  restartedMain] run.halo.app.listener.StartedListener    : Halo has started successfully!

附加信息

image

@ruibaby
Copy link
Member

ruibaby commented Apr 22, 2022

提供一下浏览器日志。

@Ljfanny
Copy link
Author

Ljfanny commented Apr 22, 2022

/add

提供一下浏览器日志。

是这个控制台日志嘛:
image
8
Uncaught (in promise) RangeError: Maximum call stack size exceeded
chunk-vendors. a8aac3e6
at Generator._invoke (chunk-vendors.a8aac3e6.js:310:27582)
at Generator.c.forEach.e. [as next] (chunk-vendors.a8aac3e6.js:310:26789
at r (chunk-vendors.a8aac3e6.js:351:51995)
at s (chunk-vendors.a8aac3e6.js:351:52198
at chunk-vendors.a8aac3e6.js:351:52257
at new Promise ()
at chunk-vendors.a8aac3e6.js:351:52138
at .
app.8eac304f.js:1:43052
at f (chunk-vendors.a8aac3e6.js:339:21755)
at r (chunk-vendors.a8aac3e6.js:339:17174)
®Uncaught(in promise)RangeError:Maximum call stack size exceeded
chunk-vendors.a8aac3e6.js:310

at z.abrupt (chunk-vendors.a8aac3e6.js:310:25674)
at app.8eac304f.js:1:42783
at M (chunk-vendors.a8aac3e6.js:310:26609)
at Generator._invoke (chunk-vendors.a8aac3e6.js:310:27667)
at Generator.c.forEach.e. [as next] (chunk-vendors.a8aac3e6.js:310:26789)
at r (chunk-vendors.a8aac3e6.js:351:51995)
at s (chunk-vendors.a8aac3e6.js:351:52198
at chunk-vendors.a8aac3e6.js:351:52257
at new Promise ()
at chunk-vendors.a8aac3e6.js:351:52138

@guqing
Copy link
Member

guqing commented Apr 22, 2022

/add

提供一下浏览器日志。

是这个控制台日志嘛: image 8 Uncaught (in promise) RangeError: Maximum call stack size exceeded chunk-vendors. a8aac3e6 at Generator._invoke (chunk-vendors.a8aac3e6.js:310:27582) at Generator.c.forEach.e. [as next] (chunk-vendors.a8aac3e6.js:310:26789 at r (chunk-vendors.a8aac3e6.js:351:51995) at s (chunk-vendors.a8aac3e6.js:351:52198 at chunk-vendors.a8aac3e6.js:351:52257 at new Promise () at chunk-vendors.a8aac3e6.js:351:52138 at . app.8eac304f.js:1:43052 at f (chunk-vendors.a8aac3e6.js:339:21755) at r (chunk-vendors.a8aac3e6.js:339:17174) ®Uncaught(in promise)RangeError:Maximum call stack size exceeded chunk-vendors.a8aac3e6.js:310 ○ at z.abrupt (chunk-vendors.a8aac3e6.js:310:25674) at app.8eac304f.js:1:42783 at M (chunk-vendors.a8aac3e6.js:310:26609) at Generator._invoke (chunk-vendors.a8aac3e6.js:310:27667) at Generator.c.forEach.e. [as next] (chunk-vendors.a8aac3e6.js:310:26789) at r (chunk-vendors.a8aac3e6.js:351:51995) at s (chunk-vendors.a8aac3e6.js:351:52198 at chunk-vendors.a8aac3e6.js:351:52257 at new Promise () at chunk-vendors.a8aac3e6.js:351:52138

打开浏览器console找到 Application下的 Local Storage 然后清空下面对应你博客域名的项的 storage,重试

@JohnNiang
Copy link
Member

/kind support

@f2c-ci-robot f2c-ci-robot bot added the kind/support Categorizes issue or PR as a support question. label Apr 22, 2022
@guqing
Copy link
Member

guqing commented Apr 22, 2022

主要原因大概率是 token 污染导致 路由守卫入法进去

@Ljfanny
Copy link
Author

Ljfanny commented Apr 22, 2022

主要原因大概率是 token 污染导致 路由守卫入法进去

蟹蟹,清空这个之后可以正常显示了。

@guqing
Copy link
Member

guqing commented Apr 22, 2022

主要原因大概率是 token 污染导致 路由守卫入法进去

蟹蟹,清空这个之后可以正常显示了。

不客气的 🙆‍♀️

@ruibaby
Copy link
Member

ruibaby commented Apr 22, 2022

/kind bug

@f2c-ci-robot f2c-ci-robot bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 22, 2022
@ruibaby
Copy link
Member

ruibaby commented Apr 22, 2022

/area admin

@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Apr 22, 2022
@ruibaby
Copy link
Member

ruibaby commented Apr 22, 2022

/retitle Admin 的 localstorage 缓存导致重装 Halo 无法进入后台

@f2c-ci-robot f2c-ci-robot bot changed the title 安装向导无法显示 Admin 的 localstorage 缓存导致重装 Halo 无法进入后台 Apr 22, 2022
@JohnNiang
Copy link
Member

/remove-kind bug
/kind support

@f2c-ci-robot f2c-ci-robot bot removed the kind/bug Categorizes issue or PR as related to a bug. label Apr 22, 2022
@ruibaby
Copy link
Member

ruibaby commented Apr 22, 2022

/remove-kind support
/kind bug

这个实际上确实是个 bug,但只有在重装 Halo 的时候才有可能复现。可能是 admin 的路由守卫判断 Halo 是否已经初始化的时候出的问题,导致循环进入路由。

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. and removed kind/support Categorizes issue or PR as a support question. labels Apr 22, 2022
@ruibaby
Copy link
Member

ruibaby commented Apr 23, 2022

/good-first-issue

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Apr 23, 2022

@ruibaby:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@f2c-ci-robot f2c-ci-robot bot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants