Sorry, sending the bug report didn't work.

delphi package - automated exception handling
Post Reply
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Sorry, sending the bug report didn't work.

Post by Plumothy »

In Email & Upload Settings I am telling madExcept to send bug reports to my Mantis server.

This works OK provided I leave the Assign To: box empty.

I select a user name from the Assign To: drop-down list then I get this error after sending the bug report:

---------------------------
Error
---------------------------
Sorry, sending the bug report didn't work.
---------------------------
OK
---------------------------

Any idea why this is happening?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Sorry, sending the bug report didn't work.

Post by madshi »

I don't know why. Do your "assign to" users have unicode chars in them? Or simple English chars? You could use something like WireShark to listen to the communication between madExcept and Mantis. Probably Mantis is reporting an error when madExcept tries to assign the user.
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Re: Sorry, sending the bug report didn't work.

Post by Plumothy »

The user name is simple text (I have tried, "administrator", "Steve" and "developer").

Is there some user setting in Mantis that I am not aware of which permits assigning a report to the user?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Sorry, sending the bug report didn't work.

Post by madshi »

I'm not sure, I'm not really a big Mantis expert. But last time I tried, it worked fine for me. First thing to do is to find out what error Mantis is reporting. You can do that either by debugging the madExcept source code, or by using a network listening tool like WireShark. If you want to debug, copy madExcept.pas and mad.inc into your project folder and recompile. Then you can set breakpoints in madExcept.pas. The function you want to debug is "TWinHttp.UploadBugToMantis".

P.S: Make sure mad.inc contains "{$D+}{$L+}".
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Re: Sorry, sending the bug report didn't work.

Post by Plumothy »

I am going to debug - but I don't know my way around your code.

In which method will I actually see the text of the error message back from Mantis?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Sorry, sending the bug report didn't work.

Post by madshi »

You can set a breakpoint on "MantisCall('mc_issue_add', ...)". Internally it calls FinishMantisCall(), and that again calls "SetLastErrorStr()". You can set another breakpoint on "SetLastErrorStr()". Hopefully you'll get there and get a useful error string.
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Re: Sorry, sending the bug report didn't work.

Post by Plumothy »

It never gets to SetLastErrorStr because
SendData(s1 + '</SOAP-ENV:Body></SOAP-ENV:Envelope>') and ReceiveResponse(reply) and (reply <> '') evaluates to FALSE
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Re: Sorry, sending the bug report didn't work.

Post by Plumothy »

I tried harder.

It entered SetLastErrorStr two times, but each time the variable str was empty, so no useful error message.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Sorry, sending the bug report didn't work.

Post by madshi »

Ok, does "reply" contain anything?
Plumothy
Posts: 11
Joined: Tue Mar 06, 2018 7:07 pm

Re: Sorry, sending the bug report didn't work.

Post by Plumothy »

I set a breakpoint at the end of FinishMantisCall. It stopped there many times and reply always had a lot of XML in it, but nothing that looked like an error message.

I have worked around this issue now by configuring madExcept to leave AssignTo empty and configuring Mantis itself to assign ALL reports to the same user.

This works for me (because I am the only user), but it will not be suitable for everyone.

I have another issue with screenshots and will file a separate report for that.
Post Reply