ruby / ruby/net-imap

ResponseParseError in `envelope`: unknown token - #{???}

Open
#191 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
118
Forks
43
Avg merge
1d 23h
Merged PRs (30d)
26

Description

Parse errors in envelope fields. I'll add more details about these later. Right now I only have the stacktraces and the error message. These might be bugs in our code, or they might be server errors that we need to handle more gracefully.

Net::IMAP::ResponseParseError: unknown token - ""Fwd:"
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser/parser_utils.rb:224 in parse_error
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:1620 in next_token
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser/parser_utils.rb:96 in NIL?
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:362 in nstring
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:542 in envelope
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:529 in envelope_data
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:502 in msg_att
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:482 in numeric_response
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:416 in response_untagged
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:387 in response
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:33 in parse
Net::IMAP::ResponseParseError: unknown token - "=E2=80=9DStar_Action_Shots""
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser/parser_utils.rb:224 in parse_error
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:1620 in next_token
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser/parser_utils.rb:170 in lookahead
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser/parser_utils.rb:134 in match
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:1468 in address
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:1437 in address_list
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:550 in envelope
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:529 in envelope_data
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:502 in msg_att
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:482 in numeric_response
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:416 in response_untagged
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:387 in response
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:33 in parse
Net::IMAP::ResponseParseError: unexpected token NUMBER (expected SPACE)
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:557 in envelope
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:529 in envelope_data
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:502 in msg_att
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:482 in numeric_response
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:416 in response_untagged
/bundler/gems/net-imap-e76475223002/lib/net/imap/response_parser.rb:387 in response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the envelope parsing paths in response_parser.rb, especially envelope, envelope_data, address_list, and nstring, alongside the parser_utils.rb locations shown in the stack traces. Reproduce the reported inputs if they can be obtained, then define expected handling for each parse error and add regression coverage before considering the issue complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.