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

导出图片和PDF报错 #1798

Closed
hds1999 opened this issue Aug 3, 2022 · 2 comments
Closed

导出图片和PDF报错 #1798

hds1999 opened this issue Aug 3, 2022 · 2 comments
Assignees

Comments

@hds1999
Copy link

hds1999 commented Aug 3, 2022

Datart版本号
版本: 1.0.0-rc.0

错误描述

022-08-03 16:34:49.621 [pool-2-thread-5] ERROR datart.server.service.impl.DownloadServiceImpl : Download Task execute error
datart.core.base.exception.BaseException: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for all conditions to be valid: presence of element located by: By.id: headlessBrowserRenderSign && presence of element located by: By.id: width && presence of element located by: By.id: height (tried for 60 second(s) with 500 millis econds interval)
at datart.core.base.exception.Exceptions.e(Exceptions.java:44)
at datart.core.common.WebUtils.screenShot(WebUtils.java:94)
at datart.core.common.WebUtils.screenShot2File(WebUtils.java:103)
at datart.server.service.impl.AttachmentPdfServiceImpl.getFile(AttachmentPdfServiceImpl.java:65)
at datart.server.service.impl.DownloadServiceImpl.lambda$submitDownloadTask$0(DownloadServiceImpl.java:95)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for all conditions to be valid: presence of element located by: By.id: headlessBrowserRend erSign && presence of element located by: By.id: width && presence of element located by: By.id: height (tried for 60 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
at datart.core.common.WebUtils.screenShot(WebUtils.java:72)
... 8 common frames omitted
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#headlessBrowserRenderSign"}
(Session info: headless chrome=103.0.5060.114)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'

如何重现

导出图表为图片或者PDF的时候就报导出"已失败"的错误,在升级前beta4版本导出服务是正常的

期望结果

截图
image
image

运行环境详情:(可选,取决于错误发生的具体位置)
os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-862.el7.x86_64', java.version: '11.0.15.1'

其他内容

@KANLON
Copy link
Contributor

KANLON commented Aug 4, 2022

+1,我这边也是这样,我看代码,好像是share 表的 创建用户create_by 错误了,之前create_by 都是user表的id,但是现在create_by 都是 SCHEDULER ,然后获取的时候找不到用户了

http://datart-demo.retech.cc/organizations/b14ac7aed7f54ad986f5644f06f4a77d/vizs/3edd246b2c1c46f5a766f79bfd70d4fa

例如这个demo 链接:

image

这里导出图片错误了
image

@hds1999
Copy link
Author

hds1999 commented Aug 5, 2022

+1,我这边也是这样,我看代码,好像是share 表的 创建用户create_by 错误了,之前create_by 都是user表的id,但是现在create_by 都是 SCHEDULER ,然后获取的时候找不到用户了

http://datart-demo.retech.cc/organizations/b14ac7aed7f54ad986f5644f06f4a77d/vizs/3edd246b2c1c46f5a766f79bfd70d4fa

例如这个demo 链接:

image

这里导出图片错误了 image

参考你的问题和原因,我新增了一个 SCHEDULER 用户,暂时解决了这个问题,具体如下:
在系统中新增一个"SCHEDULER"用户,赋权所有的视图、图表和数据源,然后在数据库库修改user表的id为"SCHEDULER",同时 也要修改rel_role_user和rel_user_organization中相关记录的user_id字段为"SCHEDULER"。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants