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.

Error: marker was not found

See original GitHub issue

Expected Behavior

Image processing successfully

Current Behavior

Error: marker was not found

Failure Information (for bugs)

bug

Steps to Reproduce

try {
    let img = await jimp.read(imagePath)
    await img.cover(300, 300)
    await img.quality(80)
    await img.rgba(false)
    await img.background(0xffffffff)

    await img.writeAsync(savePath + imgName)

    console.log('success')
  } catch (e) {
    console.log(e)
  }

Context

its not happening all the time. sometime the error occur, sometime not with the same image.

  • Jimp Version: 0.16.1
  • Operating System: ubuntu 20.04
  • Node version: 12.18.3

Failure Logs

Error: marker was not found at decodeScan (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:344:15) at constructor.parse (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:804:29) at Object.decode [as image/jpeg] (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/jpeg-js/lib/decoder.js:1096:11) at Jimp.call (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/utils/image-bitmap.js:165:21) at Jimp.parseBitmap (/mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/index.js:400:17) at /mnt/KrishnaTorque/Projects/NodeJS/02/dxtrez/src/node_modules/@jimp/core/src/index.js:344:14 at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) { methodName: ‘constructor’ }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ajayKomirishettycommented, Feb 24, 2021

I am facing the same issue

0reactions
stefanleoussiscommented, Jan 20, 2022

Same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

marker was not found · Issue #102 · oliver-moran/jimp - GitHub
when I use the following code with a corrupt image I get the error "marker was not found" but I can not capture...
Read more >
Fix “An Unknown or Invalid JPEG Marker type is Found”
Modify the file extension. One of the prime reasons for “An unknown or invalid JPEG marker type is found” is an incorrect file...
Read more >
Fix Photoshop Error: Invalid JPEG Marker Type is Found
Even though you can see the correct preview and thumbnail of a certain JPEG, often the image will not be able to open...
Read more >
How to Fix “An Unknown or Invalid JPEG Marker Type is ...
Methods to fix ?Unknown or Invalid JPEG marker? error · Change the image file extension · Rename the image file · Convert the...
Read more >
Invalid JPEG Marker error | Opening images - Adobe Support
Invalid JPEG Marker error | Opening images · Issue · Solutions · Solution 1: Make sure that the filename extension matches the actual...
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