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

ProbeError: unrecognized file format #57

Closed
yolpsoftware opened this issue May 26, 2021 · 4 comments
Closed

ProbeError: unrecognized file format #57

yolpsoftware opened this issue May 26, 2021 · 4 comments

Comments

@yolpsoftware
Copy link

yolpsoftware commented May 26, 2021

Environment: node 14.15.1 on Windows 10
probe-image-size: 7.1.0

Stacktrace:

   at ParserStream.parserEnd (my-repo\node_modules\probe-image-size\stream.js:39:28)
    at Object.onceWrapper (events.js:421:28)
    at ParserStream.emit (events.js:315:20)
    at endReadableNT (_stream_readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Code used:

import probeImageSize from 'probe-image-size';

const result = await probeImageSize("https://upload.wikimedia.org/wikipedia/commons/e/e7/Obcine_Slovenija_2007_Sveti_Jurij_v_Slovenskih_goricah.svg");
@puzrin
Copy link
Member

puzrin commented May 26, 2021

More simple way to reproduce:

node ./support/dump.js https://upload.wikimedia.org/wikipedia/commons/e/e7/Obcine_Slovenija_2007_Sveti_Jurij_v_Slovenskih_goricah.svg
ProbeError: unrecognized file format
    at ParserStream.parserEnd (/home/vitaly/Dropbox/Coding/probe-image-size/stream.js:39:28)
    at Object.onceWrapper (events.js:421:28)
    at ParserStream.emit (events.js:315:20)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'ECONTENT'

Probably a bug.

@rlidwka
Copy link
Member

rlidwka commented May 27, 2021

Fixed, thanks for reporting.

The problem was that that svg had byte order mark which we didn't expect.

@puzrin
Copy link
Member

puzrin commented May 27, 2021

Released 7.1.1

@yolpsoftware
Copy link
Author

This is fixed, thank you!

However, please see #61. There are other images which are still not working.

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