Page 1 of 1

Sorry, sending the bug report didn't work.

Posted: Wed Mar 14, 2018 10:42 am
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?

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

Posted: Wed Mar 14, 2018 10:46 am
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.

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

Posted: Wed Mar 14, 2018 10:57 am
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?

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

Posted: Wed Mar 14, 2018 10:59 am
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+}".

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

Posted: Wed Mar 14, 2018 11:43 am
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?

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

Posted: Wed Mar 14, 2018 11:46 am
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.

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

Posted: Wed Mar 14, 2018 12:02 pm
by Plumothy
It never gets to SetLastErrorStr because
SendData(s1 + '</SOAP-ENV:Body></SOAP-ENV:Envelope>') and ReceiveResponse(reply) and (reply <> '') evaluates to FALSE

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

Posted: Wed Mar 14, 2018 12:30 pm
by Plumothy
I tried harder.

It entered SetLastErrorStr two times, but each time the variable str was empty, so no useful error message.

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

Posted: Wed Mar 14, 2018 2:01 pm
by madshi
Ok, does "reply" contain anything?

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

Posted: Wed Mar 14, 2018 2:08 pm
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.