Skip to content

Unknown version #2734

Description

@wymanchung

Describe the bug
I'm using Image component to render from URL object
The URL is an application/octet-stream response of a JPG file and it could be saved and opened if downloaded.
Console gives Warning: "Unknown version". I've got different version number with different JPG

To Reproduce
When the following component is saved as blob

<Image
  src={{
	uri: `/api/frs/fileInfo/${doc.id}`,
	method: "GET",
	headers: {
	  ...getAuthHeader().headers,
	},
	body: "",
  }}
/>

Expected behavior
The JPG should be embedded in PDF

Error Log
Error: Unknown version 47178
at VersionedStruct.decode (http://localhost:3000/static/js/bundle.js:358332:13)
at ArrayT.decode (http://localhost:3000/static/js/bundle.js:357070:28)
at ArrayT.fromBuffer (http://localhost:3000/static/js/bundle.js:357144:17)
at Object.decode (http://localhost:3000/static/js/bundle.js:356206:24)
at new JPEG (http://localhost:3000/static/js/bundle.js:298158:65)
at getImage (http://localhost:3000/static/js/bundle.js:298253:14)
at _callee3$ (http://localhost:3000/static/js/bundle.js:298376:45)
at tryCatch (http://localhost:3000/static/js/bundle.js:295263:16)
at Generator.<anonymous> (http://localhost:3000/static/js/bundle.js:295351:17)
at Generator.next (http://localhost:3000/static/js/bundle.js:295292:21)

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • React-pdf version: v3.4.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions