MicrosoftEdge / magic-mirror-demo

A :zap:Magic Mirror:zap: powered by a UWP Hosted Web App :rocket:
Other
1.23k stars 225 forks source link

Step 2/2 submit issue #48

Closed afreeland closed 3 years ago

afreeland commented 8 years ago

After filling out the form and getting a 'success' on the face recognition on step 2/2...the submit button never seems to fully go through. I did notice multiple XHR request to /addFace and did get some 500 responses back.

Error output:

HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.
(XHR)POST - http://webreflections.azurewebsites.net/face/addFace

Tried to run the Pi version locally on desktop to check and see if it would the webcam could still identify me but it just gives the "Hello, is that you?" message. I really enjoy the idea of using the web stack for this particular project but a little bummed things seem to be kind of flaky.

afreeland commented 7 years ago

@andypavia or @melanierichards I am having difficulty getting the /addFace to successfully register an image. It goes through the process and says that it is successful and the post gets a 200 back...but not confident the image was captured and is actually registered.

Anyway, could we check the db to see if the email actually has an image associated with it....it would be my ${username}@gmail.com

Seem to have everything else going well but cant seem to troubleshoot the rest of this without more access or a little help =) mirror1 addface mirror2

melanierichards commented 7 years ago

@afreeland I contributed design/front-end to this project, so for the more functional bits that would be a question for @andypavia or maybe @jdalton

afreeland commented 7 years ago

@melanierichards Thank you for responding!! Very fun project to work on and excited to keep progress moving along on it =)

@andypavia if you dont mind just taking a quick run through it to see, I would really appreciate it.

afreeland commented 7 years ago

Alright, here is an update so far...

I ended getting the environment running locally so I could try to figure out what all was happening. Also, was a little creeped out when it was recognizing my 6 yr old son as someone else...so figured I would get my own setup going. Made a quick joke to the girlfriend that he might have a brother somewhere named Austin, she didnt laugh -_- ... but how cool would that of been lol

After getting everything running I found that I was getting an { code: 'unspecified', error: 'Internal Server Error', }

So started to look into the Face API and found that there was a thing called a facelist . Facelists also have a maximum of 1000 faces, not sure if the public one hit the limit or doesnt have a cap...but a potential issue. I also thought it would be beneficial to have my own FaceList to keep things somewhat private. Strange thought that Microsoft has a giant catalog of faces though.

So I created a new Facelist for myself using their nice Create Face List API Console.

Once I did that it appeared to actually send the data and get a proper 200 response. Also, when the error originally happened it got consoled but never sent a response back so I fixed that in my code....will try to do a pull request later.

I will continue to work through this code and get it working. I will continue to update thread with any findings in case anyone else gets hung up.

nsvgit commented 7 years ago

@afreeland Thanks for your organized updates and progress.

I am wondering if you have further progress on this? I am stuck on the same stage. I got through step 2/2 but the mirror doesn't seem to recognize me :(

I am not running locally tho.

Thanks.

afreeland commented 7 years ago

@nsvgit I do have this successfully up and running =)

I was going to respond to your Issue but am not in front of my code to give a response with 100% confidence.

If I remember correctly the JavaScript code that 'registered' the profile was getting a 200 response so it 'appeared' that it was registering my profile pic but never was...and if it did, which I doubt, I probably have a bunch of profiles. Even though it was a 200 response it was really a message stating the issue and since there was no error handling and slightly trickier debugging I assume most people were unsuspecting of it failing..it kind of gives the illusion of success.

You may be able to open up devtools or use Fiddlr to see the XHR and what the response is from the API. That should help you identify if the list is full. I would encourage you to run locally as there are a few things that needed 'adjusted'.

If I could free up time, I would love to help contribute to this project, so others could get this mirror up and running.

Feel free to check out my Fork and see what changes I made...it may or may not help speed things up.