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

Uncaught SyntaxError: Unexpected token '<' (http://localhost:8080/[object%20Module]:1:1) #6

Open
allenvpn312 opened this issue Dec 27, 2021 · 6 comments

Comments

@allenvpn312
Copy link

Receiving error when opening pdfviewer. This only happens on the first call. Subsequent calls does not receive this error. Below is the sample code.

`pdfReport.generate(); // Generate report

var is = new ByteArrayInputStream(pdfReport.getOutputStream().toByteArray());

resource = new StreamResource(filing.getTaxReport().getCode(), () -> is);
resource.setContentType("application/pdf");
resource.setCacheTime(0);`

Screenshot

@paodb
Copy link
Collaborator

paodb commented Jan 21, 2022

Hello @allenvpn312, what version of the component are you using?

@allenvpn312
Copy link
Author

allenvpn312 commented Jan 21, 2022 via email

@paodb
Copy link
Collaborator

paodb commented Jan 21, 2022

My question was about which version of vcf-pdf-viewer-flow are you using, is it 2.0.0 (for Vaadin 22) or 1.0.1 (for Vaadin 14)? Thanks.

@allenvpn312
Copy link
Author

allenvpn312 commented Jan 21, 2022 via email

@paodb
Copy link
Collaborator

paodb commented Jan 28, 2022

Hi again, I wasn't able to reproduce your issue. There's a new version out, see https://vaadin.com/directory/component/pdf-viewer/1.0.2. Can you tell me if the issue remains with this new version? If so, can you share a small example so I can reproduce the issue?

Regards

@allenvpn312
Copy link
Author

allenvpn312 commented Jan 28, 2022 via email

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

2 participants