Error when testing the latest changes to the Reset Password functionality that was worked on in GSOC 2018

core
community
Tags: #<Tag:0x00007fbad49e3090> #<Tag:0x00007fbad49e2e88>

(Tendonge Awo-Nasako Ryan) #1

Hi Guys. My name is Ryan Tendonge and I’ve been having some issues trying to test the work that was done in the Gsoc 2018 Password Reset project.

I have tried setting up my system in a couple of ways. First I set up a new Reference application, version 2.8.1 using the openmrs SDK, but I was advised to set up an Openmrs Platform instead, version 2.2.0-beta(which is the latest version). After configuring my system as specified here( and running the test specified), I got the error specified in the screenshot below.

When I check my server logs, I notice this error keeps repeating

Caused by: org.openmrs.notification.MessageException: java.lang.ClassCastException: com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler

I then tried to set my system up using jetty. I cloned openmrs-core from github, ran mvn clean install then I navigated to the webapp folder of the repo and ran mvn jetty:run. I still could not get the Password Reset test to work. Am I doing something wrong?

cc @dkayiwa @harisu


(Daniel Kayiwa) #2

Can you share the full server side error log at pastebin.com?


(Tendonge Awo-Nasako Ryan) #3

Here it is https://pastebin.com/EYydf9yT . Daniel may I mention that during the uberconference call, the problem wasn’t indeed solved. I just got that success because I had not yet configured my system yet. I had not even created a user with the email i used to test. So when I ran it, it showed a success and we both concluded that the problem had gone away. But later when I checked my console, there was an error which stated that there was no user with that particular email I used to test. When I created the user, added the email, and did the other configurations, the error in the screenshot returned


(Daniel Kayiwa) #4

From where we left at uberconference, can you list the exact steps one by one, that i need to continue with, in order to reproduce the problem that you are facing?


(Tendonge Awo-Nasako Ryan) #5

@dkayiwa So where we ended was after I created the new platform server, loaded the legacy ui and the rest web services omod files, then restarted. After that we ran the test for password reset and it showed a success( which turns out was just a formality).

After the call, I checked the log file and I noticed an error stating that the email I used in the test did not exist for any user( because I had not added the email yet. I just started the server, and ran the test as I had been running with previous servers, forgetting to add the email to the user in this case)

So these are the steps I took after the call


(Daniel Kayiwa) #6

Can you take me through this on uberconference? That is from where we left, where it is working, up to the point where you configure and get the error.


(Tendonge Awo-Nasako Ryan) #7

Yes I can. Sorry I am only seeing this now. Any chance we could go through this in the morning? What time works for you?


(Daniel Kayiwa) #8

Ping me publicly on IRC whenever you are ready.


(Tendonge Awo-Nasako Ryan) #9

Hi @dkayiwa, did you have any luck testing the stuff I pointed out during our previous call?


(Daniel Kayiwa) #10

@harisu did you get a chance to look into this?


(Tendonge Awo-Nasako Ryan) #11

@dkayiwa Were you able to reproduce the error?


(harisu fanyui) #12

Well getting a success when there was no email that exists in the system is deliberate as it was meant such that on a post request just return a success rather than give you a clue on whether the user exists or not so you don’t need to continue brute forces with other users(if that was the intentions) so typically what will happen is when that success is received you tell the user to check their email. As for why it fails for you when there is an email I really need to verify further.


(harisu fanyui) #13

I can’t reproduce This error. Are you available for debugging? in like an hours time?


(Tendonge Awo-Nasako Ryan) #14

I can’t reproduce This error. Are you available for debugging? in like an hours time?

Is this meant for me? If so, yes I’ll be available


(harisu fanyui) #15

Rendez-vous in 1 hour time at Uberconf for debugging. I will ping you on irc