question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<PDFDownloadLink> issue with Firefox 62.0.3 and IE 11.0.85

See original GitHub issue

OS:

Windows 10, but using WSL Ubuntu 18.04

React-pdf version:

1.0.0-alpha.18

Description:

Sorry to bother while you are on vacation. again. Super basic projects work fine in every browser except Firefox and IE 11.

FIrefox, you click on the “Download Now!” button and nothing happens. Nothing in console. Doesn’t download the file. Just nada.

I can go the link in the HTML inspector and there the file is though.

IE 11, after getting past the polyfill issues, gives an error of:

Unhandled promise rejection TypeError: Object expected

Unfortunately, nothing more descriptive than that to try and narrow down the issue. Read somewhere it could be due to trailing , in one of my components, but checked them all.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
moffsugitacommented, Nov 30, 2018

I found the good sample for PDFDownloadLink.

https://andrewsempere.org/blog/2018/10/30/react-render-pdf.html

I hope put more good sample on official document. or I pullrequest ;>

3reactions
moffsugitacommented, Nov 30, 2018

However, sample of README didn’t work fine. PDFDownloadLink is not component? just object?

import React from 'react';
import ReactDOM from 'react-dom';
import PDFDownloadLink, {
  Text,
  Document,
  Font,
  Page,
  StyleSheet,
  Image,
  View,
} from '@react-pdf/renderer';

import { PDFDownloadLink, Document, Page } from '@react-pdf/renderer'

const App = () => (
  <div>
    <PDFDownloadLink document={MyDoc} fileName="somename.pdf">
      {({ blob, url, loading, error }) => (loading ? 'Loading document...' : 'Download now!')}
    </PDFDownloadLink>
  </div>
)

ReactDOM.render(<App />, document.getElementById('root'));

error

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `App`.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox 62.0.3, See All New Features, Updates and Fixes
Fixed hangs on macOS Mojave (10.14) when various dialog windows (upload, download, print, etc) are activated (bug 1489785).
Read more >
Security vulnerabilities fixed in Firefox 62.0.3 and ... - Mozilla
A vulnerability in register allocation in JavaScript can lead to type confusion, allowing for an arbitrary read and write. This leads to remote ......
Read more >
Firefox vs. Internet Explorer: Which is the better browser for you?
Compare Internet Explorer to the Firefox Browser to find out which is the better browser for you.
Read more >
Firefox 62.0, See All New Features, Updates and Fixes - Mozilla
Firefox Home (the default New Tab) now allows users to display up to 4 rows of top sites, Pocket stories, and highlights.
Read more >
[SOLVED] Can not login to CapitolOne.com website with ...
[SOLVED] Can not login to CapitolOne.com website with Firefox 62.0.3. 9 replies; 1 has this problem; 191 views; Last reply by James.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found