reactjs 错误NaN:未定义原因:未定义:1分钟后出现错误

watbbzwu  于 2023-03-17  发布在  React
关注(0)|答案(1)|浏览(204)

我开发了一个Sping Boot 应用程序,使用React作为前端。我正在将一个PDF文件流回浏览器。但是,当一个请求转到控制器,并且处理时间超过1分钟时,我在屏幕上看到一个错误Error NaN:未定义原因:未定义
我试过增加前端和后端的超时,但是没有成功。我不确定这是否与超时有关。有人能帮忙吗?下面是堆栈跟踪。

2023-03-06 12:22:33.678 DEBUG 13380 --- [-nio-443-exec-2] o.s.web.servlet.DispatcherServlet        : GET "/print/error?error=undefined&message=undefined&reason=undefined", parameters={masked}
2023-03-06 12:22:33.680 DEBUG 13380 --- [-nio-443-exec-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.jcrew.labelprintbackend.controllers.FrontendController#print()
2023-03-06 12:22:33.682 DEBUG 13380 --- [-nio-443-exec-2] o.s.w.s.v.ContentNegotiatingViewResolver : Selected 'text/html' given [text/html, application/xhtml+xml, image/avif, image/webp, image/apng, application/xml;q=0.9, application/signed-exchange;v=b3;q=0.7, */*;q=0.8]
2023-03-06 12:22:33.682 DEBUG 13380 --- [-nio-443-exec-2] o.s.w.servlet.view.InternalResourceView  : View name 'forward:', model {}
2023-03-06 12:22:33.682 DEBUG 13380 --- [-nio-443-exec-2] o.s.w.servlet.view.InternalResourceView  : Forwarding to [/index.html]
2023-03-06 12:22:33.682 DEBUG 13380 --- [-nio-443-exec-2] o.s.web.servlet.DispatcherServlet        : "FORWARD" dispatch for GET "/index.html?error=undefined&message=undefined&reason=undefined", parameters={masked}
2023-03-06 12:22:33.684 DEBUG 13380 --- [-nio-443-exec-2] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [Classpath [META-INF/resources/], Classpath [resources/], Classpath [static/], Classpath [public/], ServletContext [/]]
2023-03-06 12:22:33.687 DEBUG 13380 --- [-nio-443-exec-2] o.s.web.servlet.DispatcherServlet        : Exiting from "FORWARD" dispatch, status 200
2023-03-06 12:22:33.687 DEBUG 13380 --- [-nio-443-exec-2] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2023-03-06 12:22:33.723 DEBUG 13380 --- [-nio-443-exec-1] o.s.web.servlet.DispatcherServlet        : GET "/static/css/2.eefd091c.chunk.css", parameters={}
2023-03-06 12:22:33.726 DEBUG 13380 --- [-nio-443-exec-1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [Classpath [META-INF/resources/], Classpath [resources/], Classpath [static/], Classpath [public/], ServletContext [/]]
2023-03-06 12:22:33.766 DEBUG 13380 --- [-nio-443-exec-4] o.s.web.servlet.DispatcherServlet        : GET "/static/js/2.7df57dd0.chunk.js", parameters={}
2023-03-06 12:22:33.767 DEBUG 13380 --- [-nio-443-exec-4] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [Classpath [META-INF/resources/], Classpath [resources/], Classpath [static/], Classpath [public/], ServletContext [/]]
2023-03-06 12:22:33.768 DEBUG 13380 --- [-nio-443-exec-1] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2023-03-06 12:22:33.774 DEBUG 13380 --- [nio-443-exec-10] o.s.web.servlet.DispatcherServlet        : GET "/static/js/main.2f79f0d9.chunk.js", parameters={}
2023-03-06 12:22:33.776 DEBUG 13380 --- [nio-443-exec-10] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [Classpath [META-INF/resources/], Classpath [resources/], Classpath [static/], Classpath [public/], ServletContext [/]]
2023-03-06 12:22:33.777 DEBUG 13380 --- [-nio-443-exec-1] o.s.web.servlet.DispatcherServlet        : GET "/static/css/main.bc6778fd.chunk.css", parameters={}
2023-03-06 12:22:33.778 DEBUG 13380 --- [-nio-443-exec-1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped to ResourceHttpRequestHandler [Classpath [META-INF/resources/], Classpath [resources/], Classpath [static/], Classpath [public/], ServletContext [/]]
2023-03-06 12:22:33.805 DEBUG 13380 --- [nio-443-exec-10] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2023-03-06 12:22:33.832 DEBUG 13380 --- [-nio-443-exec-1] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2023-03-06 12:22:33.859 DEBUG 13380 --- [-nio-443-exec-4] o.s.web.servlet.DispatcherServlet        : Completed 200 OK
2023-03-06 12:22:33.927 DEBUG 13380 --- [-nio-443-exec-9] o.s.web.servlet.DispatcherServlet        : GET "/favicon.ico", parameters={}
eni9jsuy

eni9jsuy1#

已解决:问题出在负载平衡器的超时值上。它被设置为1分钟。一旦这个值增加,超时问题就解决了。

相关问题