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

DomException: The object can be cloned when failing to fetch the PDF #11490

Closed
taihuuho opened this issue Jan 8, 2020 · 6 comments · Fixed by rollbar/rollbar.js#868
Closed

Comments

@taihuuho
Copy link

taihuuho commented Jan 8, 2020

Attach (recommended) or Link to PDF file here: NO PDF

Configuration:

  • Web browser and its version: Desktop Sarafi 13.0.4
  • Operating system and its version: MAC 10.14.6
  • PDF.js version: "pdfjs-dist": "2.2.228"
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Use PDFJS to load a dummy URL that the PDF doesn't exist, such as http://google.com
  2. Use Safari on desktop or iPhone.
  3. You would see the error The object can be cloned in the console
    Screen Shot 2020-01-08 at 3 22 12 PM

What is the expected behavior? (add screenshot)

  • Posting something more meaningful instead of this generic error

What went wrong? (add screenshot)
Screen Shot 2020-01-08 at 3 22 12 PM

Stack trace
Screen Shot 2020-01-08 at 3 26 54 PM

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@Snuffleupagus
Copy link
Collaborator

Please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem.

@taihuuho taihuuho changed the title The object can be cloned when failing to fetch the PDF DomException: The object can be cloned when failing to fetch the PDF Jan 8, 2020
@Snuffleupagus
Copy link
Collaborator

Given the lack of a runnable example, there's very little that anyone can do here; hence 4-information-requested is probably a better label here!?

Also, this issue may be similar to issues such as #9166 and #9840, where a JS framework was interfering with native Promise objects; in any case this issue is unfortunately INVALID without a test-case.

@taihuuho
Copy link
Author

taihuuho commented Jan 9, 2020

I just wanted to report the issue. If you guys think this is INVALID, feel free to close it.

It doesn’t make sense that I have to share the runnable code, as it’s my company assets and I DO NOT have permission to share.

Closing

@taihuuho taihuuho closed this as completed Jan 9, 2020
@Snuffleupagus
Copy link
Collaborator

It doesn’t make sense that I have to share the runnable code,

Yes it most certainly does, since this is an open-source project (which you're able to use for free) where development is mostly done by unpaid volunteers.
Hence in order for anyone to help debug an issue, it's generally necessary that they are able to (easily) run the exact same code as you and observe the same issue.

as it’s my company assets and I DO NOT have permission to share.

Note that you were asked to provide a reduced test-case (and not direct access to production code).

@taihuuho
Copy link
Author

taihuuho commented Jan 9, 2020

I got your point. I am not arguing but reporter is also a QA for the open source project. If making it hard to report the bug, I am pretty sure many of them would just close the issue, and the issue remains.

As to give a runner example, I would have to request the permission from my company,
And need to get it hosted somewhere... that process is gonna take days, and given that was done, how you guys will test the fix?...

Anyway, would be great to have some shared environments for reporting bugs and testing the changes.

That’s my personal point but yeah, that’s not the case here

@Snuffleupagus
Copy link
Collaborator

Please note that there's a fairly good chance that your problem isn't with the PDF.js library, but rather that you're using some other framework/library in your application which is interfering with native Error/Promise objects in such a way that they become un-clonable.

As mentioned in #11490 (comment), we've seen similar problems before and in that case it turned out to be caused by a bug in the Angular framework (it was adding un-clonable data to Errors, which have since been fixed in Angular itself).

Based on your screen-shots you're using something called "rollbar", and a quick Google search points me to https://rollbar.com/, which based on its description sound exactly like something that may be able to interfere with Error/Promise objects in a way which breaks the PDF.js library. Hence my suggestion would be that you do further investigation into how "rollbar" works.

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

Successfully merging a pull request may close this issue.

3 participants