Request Error on :api/v1/channel/me
Hello,
We have configured the Mobile native app for android. However we are getting this error while signing in to one of our accounts.
"Request Error on :api/v2/Oauth/token"
Getting the same error on Emulator as well as Physical device. Also the website is hosted on a separate server.
Here is the error logs from Website server
" 2019/10/22 10:44:40 [error] 6#6: *4834 FastCGI sent in stderr: "PHP message: Exception #1571741080: LogicException: Key path "file:///var/secure/oauth-priv.key" does not exist or is not readable in /var/www/ Minds/engine/vendor/league/oauth2-server/src/CryptKey.php:45 Stack trace: #0 /var/www/Minds/engine/vendor/league/oauth2-server/src/AuthorizationServer.php(104): League\OAuth2\Server\CryptKey->__construct('file:///var/sec...') #1 /var/www/Minds/engine/Core/OAuth/OAuthProvider.php(36): League\OAuth2\Server\AuthorizationServer->__construct(Object(Minds\Core\OAuth\Repositories\ClientRepository), Object(Minds\Core\OAuth\Repositories\A ccessTokenRepository), Object(Minds\Core\OAuth\Repositories\ScopeRepository), '/var/secure/oau...', '{{ jwt-secret }...') #2 (closed) [internal function]: Minds\Core\OAuth\OAuthProvider->Minds\Core\OAuth{closure}(Object(Minds\Core\Di\Di)) #3 (closed) /var/www/Minds/engine/Core/Di/Di.php(25): call_user_func(Object(Closure), Object(Minds\Core\Di\Di)) #4 (closed) /var/www/Minds/engine/Controllers/api/v2/oauth/token.php(30): Minds\Core\Di\Di->get('OAuth\Server\Au...')" while reading response header from upstream, client: 172.18.0.3, server: _, request: "POST /api /v2/oauth/token?cb=1571741078980 HTTP/1.1", upstream: "fastcgi://172.26.0.9:9000", host: "ABC.XYZ.in"
"
- changed the description 
- DeveloperCCing @msantang78 for you 
- @msantang78 Hello, - Waiting to hear from your end.Kindly revert soon please. 
- DeveloperYou likely need to generate a private key and public key (named oauth-priv.key & oauth-pub.key) and place them in the directory it's expecting ( secure- in the root directory)
- @benhayward.ben Did that. Now we are getting a Request error on: "api/v1/channel/me" while logging in and signing up a new account. 
- @benhayward.ben Awaiting. 
- @msantang78 Awaiting. 
- DeveloperHave you made sure you are using an up to date version of the app? 
- Hey ben,Yes....the latest version.Sent from my Samsung Galaxy smartphone. 
- @benhayward.ben awaiting your response. 
- DeveloperI'm unable to be of any further help on this unfortunately, the mobile app is not my domain. Will have to pass to @msantang78. First thing I'd suggest is including the error. 
- Hi @msantang78, I am getting the following error when trying to login or signup from the app (localhost) : Request error on: "api/v1/channel/me". The minds website is setup on google cloud(development mode), and the corresponding domain name has been replaced in the app. As for the detailed error log, do i get one from website nginx/php-fpm or android studio ? 
- Hi @msantang78 Awaiting. 
- @benhayward.ben Could you kindly request @msantang78 to communicate please. We are waiting since quite some time. 
- changed title from Request Error on :api/v to Request Error on :api/v 
- Maintainer@movingisliving2019 did you fix the backend error? ("file:///var/secure/oauth-priv.key" does not exist or is not readable) 
- @msantang78 yeah fixed the backend error. 
- @msantang78. what can we do now ? 
- MaintainerI had once a problem with that endpoint because of the cookies. The mobile app uses token-based auth, so it should not send the cookies. That is why I added this workaround to clean the cookies sent by the server https://gitlab.com/minds/mobile-native/blob/master/src/auth/AuthService.js#L23 Please check if for some reason you are sending the session cookies to the backend. 
- @msantang78 I checked and AuthService.js seems to have the line you mentioned. As for checking if session cookies are being sent to backend, any ideas on where or how to check. 
- @msantang78 waiting furthur steps 
