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: Nothing to fetch

See original GitHub issue

When i search for mails inside my outlook sent box i always get no results, although i am sure that this mail has sent me an email.

if (req.service == "Outlook") {
    folder = "Sent";
  } else {
    folder = "[Gmail]/Sent Mail";
  }
  var messages = req.messages;
  imap.once("ready", function() {
    imap.openBox(folder, true, function(err, box) {
      imap.search(["ALL", ["TO", req.body.client]], function(err, results) {
        if (err) {
          res.status(400).json({
            msg: "Bad Request",
            errors: [
              {
                msg: "Something went wrong while fetching mail."
              }
            ]
          });
        }
        console.log("RESULTS:", results);
        console.log(folder);
        if (results.length == 0) {
          res.status(400).json({
            msg: "Bad Request",
            errors: [
              {
                msg: "No messages found."
              }
            ]
          });
        }
        var f = imap.fetch(results, {
          bodies: [""],
          struct: true
        });

this is a snippet from my code. It works fine with Gmail tho.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mscdexcommented, Nov 9, 2017

It wouldn’t surprise me if the server is trying to match the criteria in some unexpected way (I have seen gmail do that kind of thing).

Have you tried using the 'HEADER' criteria instead, like ['HEADER', 'TO', 'foo@example.org']?

0reactions
HazemElAgatycommented, Nov 10, 2017

Well for some reason the ‘HEADER’ criteria worked. I have no clue why tho. Thank you for the help 😃 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Nothing to fetch · Issue #745 · mscdex/node-imap - GitHub
I used imap.search(['ALL', ['FROM', 'no_reply@email.apple.com']], function( err, result ) {}) or imap.search( ['ALL', ['HEADER', 'FROM', ...
Read more >
EGit says "Nothing to fetch" when I try to fetch from Origin
With Spring Tool Suite, created a java project, put it under version control with EGIT plugin and pushed it to my account on...
Read more >
463357 – Catch "Nothing to Fetch" Exception - Bugs - Eclipse
I went to re-add it and during a fetch, I got an eclipse error dialog with "Nothing to fetch" exception. After playing around,...
Read more >
EGit showing 'Nothing to fetch'
This makes Git fetch all refs from your remote server starting at refs/heads/ and store them under refs/remotes/origin/ locally. It does so with ......
Read more >
org.eclipse.jgit.errors.TransportException: Nothing to fetch. in ...
To me it seems this error is triggered, because the fetch line is missing from the config in the remote section. This is...
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