SpartaSystems / holdmail

HoldMail is a Java Application for proxying SMTP mail, providing a browsable viewer for captured emails.
Apache License 2.0
32 stars 15 forks source link

Intermittent Exception seen in logs #63

Closed johnament closed 6 years ago

johnament commented 6 years ago
Question/Issue Overview

Tell us briefly what this ticket is about.

While running Holdmail, I see the below logs periodically

holdmail                 | 2018-01-16 21:31:30.005  WARN 22 --- [0.0-8080-exec-3] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: "undefined"
holdmail                 | 2018-01-16 21:32:23.013  INFO 22 --- [72.19.0.3:45652] c.s.holdmail.smtp.SMTPHandler            : Stored SMTP message '<1572497660.3.1516138342982@0434138d75a4>' parse keycloak@stratas.com to: test@test.com
holdmail                 | 2018-01-16 21:32:30.049  INFO 22 --- [72.19.0.3:45654] c.s.holdmail.smtp.SMTPHandler            : Stored SMTP message '<1784164534.5.1516138350011@0434138d75a4>' parse keycloak@stratas.com to: test@test.com
holdmail                 | 2018-01-16 21:32:35.106  WARN 22 --- [0.0-8080-exec-7] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: "undefined"
holdmail                 | 2018-01-16 21:34:53.635  INFO 22 --- [72.19.0.3:45658] c.s.holdmail.smtp.SMTPHandler            : Stored SMTP message '<691594591.7.1516138493596@0434138d75a4>' parse keycloak@stratas.com to: test@test.com
holdmail                 | 2018-01-16 21:34:59.883  WARN 22 --- [0.0-8080-exec-9] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: "undefined"

With the browser console open, I can see the following requests made:

Expected Behavior

What you think the system should be doing

Not making the second API call

Current Behavior

What its actually doing, and why this doesn't match your expectations

Making an extra API call

Reproducible Sequence
  1. Open up the message list
  2. Click on one of the messages
barryoneill commented 6 years ago

The new UI is causing this. When you load message details view, initially the message data hasn't been set, so the URI that gets built for each tab iframe is missing the message ID, and an invalid REST request is made.