Open BhavinGupta opened 6 years ago
You need to change Config.API.Server.name
in AppConfig.swift, and the COMMON_NAME
variable in cert_gen.sh to match the local address of your machine (either local IP or mDNS .local domain are fine).
After doing that what should i do to start the server which i followed but then it gives me that could not connet to server
see this i have done with below images
What about AuthServerAPI.swift file is there any changes to be made ?
Pretty sure nothing needs to be changed there. I just tried cloning this and reconfiguring from scratch on another machine, you just need changes to the local name. Did you launch the server via start.sh
? What's the server output on the CLI?
This is what i get after making configurations as below:
am i doing correct to start this server please help me ?
That's fine. I just noticed you changed the port in AppConfig.swift. Try reverting it to 5000 and it should work fine. If you really need the server to run on port 9090, you also need to edit API.Server.port
in server/face_auth/config.py.
See this images i am getting that "cancelled"
after changing everything properly
That's likely an issue with SSL. Did you by chance edit the App Transport Security
setting in the app's Info.plist? It should have an Allow arbitrary loads
key set to YES
(of course this means you're breaking ATS, but the whole project is experimental).
Please also ensure the server and client-side certificates (cert.der
) are exactly the same.
No i didnt change that
i am still facing the same error with cancelled status
How you generated the cert.der? please help me out with this my configurations are correct then why it is not registering the example properly ?
It is generated by cert_gen.sh
. Try deleting everything in the server/res/certs folder, delete the app from your device, then run start.sh
again (to regenerate certificates and start the server) and finally build and deploy the app to your device via Xcode. This will ensure the certificates are fresh and in sync.
i have tried that @IvanoBilenchi now its working fine but i am not able to register nor i am able to login even after deleting the application and running on my local machine server see this below
See this as well @IvanoBilenchi
I am getting these above invalid request :( i have now set up with scratch example and need to run this successfully the whole integration is done properly but still i am not able to register and login in example of your @IvanoBilenchi
please guide me for near misses if any
Do we need to save the cert.der in the keychain and make the ssl certificate trusted ?
is that to be done or not as i have tried doing that to but the error is still the same i am getting the invalid request with this error below:
[BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library.
Last login: Wed Jun 20 12:28:15 on console BhavinGupta:~ bhavingupta$ cd /Users/bhavingupta/Downloads/FaceAuth/server BhavinGupta:server bhavingupta$ source venv/bin/activate (venv) BhavinGupta:server bhavingupta$ python3 start.py
please help me with this @IvanoBilenchi
Sorry, I am not able to follow up a lot with this. You should debug the Python code and see why it's returning 400 bad request. It should be pretty straightforward as I am explicitly failing when the request does not match what the server expects. I'd recommend debugging server/face_auth/server.py, which contains the register, login, update and delete handlers.
In particular, from one of your earlier screenshots it looks like the server cannot find the encrypted face model when logging in with a previously registered user. Upon registration, you should make sure the server creates a new directory for the user in server/res/users containing a .yml.aes file (the encrypted face model). I'd recommend deleting the existing database (server/res/users/users.db) and starting fresh.
Debugging with these above files which you have mentioned is already done by me and i am actually having least knowledge regarding python file as i have no expertise on python so please let me know is there any other way to debug this python file. I got your point and i personally feel that there is definitely some issue regarding the erver/face_auth/server.py file i have deleted the (server/res/users/users.db) and started with fresh demo as well but still there is only one error with below
192.168.10.189 - - [20/Jun/2018 12:51:10] "POST /register HTTP/1.1" 400 -
server/res/users containing a .yml.aes
no such file is created by server in the above path when i make a hit towards register URL
why is it so any idea @IvanoBilenchi ?
See this screenshot while hitting the register URL and video as well for proper error i am facing right now @IvanoBilenchi below:
See this video in zip file and let me know what exactly the problem in server python file with proper credentials with min 8 length
@IvanoBilenchi where are you please sort this out as it is taking too long to integrate i am still getting the bad request 400 even after debugging the server.py file
As I already stated, I don't have time to follow up on this nor to sort it out, since this is just a POC that works fine on my machines and that I don't intend to support. The only way you'll get this to work is finding out why the server is failing on your specific configuration, which means you should debug the python code and fix it. If you find out the code is faulty, feel free to submit a pull request and I'll merge it in.
ok @IvanoBilenchi
but i think there i something in send the request which containing the invlaid json request and i dont have that much knowledge regading the python i told you before
so what should i do now ?
you have to export FLASK_APP=face_auth/server.py then python start.py and run the app on iphone.It works fine. Thank you @IvanoBilenchi great work. Just add these commands in readme.txt file.
Can you explain in detail how to set the local server name? need this on urgent bases as i have to integrate in my live projects