Closed terumik closed 3 years ago
Hi @terumik I'll need to give it a run with the change of ports like you are, so I can see how to get it working that way. I'll try in the next few days. In the meantime I have some comments:
I'm also stuck on deploying the example project to the remote
You'll probably want to replace the "strapi-connector-firestore": "../../"
local dependency with the actual NPM package "strapi-connector-firestore": "^3.0.0-alpha.38"
. The parent directory isn't available in the Docker build, which will probably be the problem you're encountering?
Changed the port under root/index.ts, root/index.js, and root/firestore.js to 8081
Are you referring to this line below? As you can see the port that it tries to find the emulator on is hard coded.
Have you considered just trying to find what process is blocking port 8080 instead, so that you can just run the setup normally?
I tried to login => 500 error and could not log in
Were there any extra details logged in the console corresponding to this error?
Hi Brett,
Thank you for your reply.
Have you considered just trying to find what process is blocking port 8080 instead, so that you can just run the setup normally?
I asked this question because I could not kill the port, but today I ran windows powershell with admin mode and was able to kill the port and able to run the project locally. Sorry for bothering you.
You can close the question, but I will answer your question for your reference. The port I manually changed was
The error logged in my console was as follows:
[2021-08-10T14:22:46.653Z] debug TRANSACTION (read-only): 2 reads.
[2021-08-10T14:22:46.763Z] error Error: secretOrPrivateKey must have a value at Object.module.exports [as sign] (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\jsonwebtoken\sign.js:107:20)
at Object.createJwtToken (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\strapi-admin\services\token.js:33:14)
at C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\strapi-admin\controllers\authentication.js:43:46
at dispatch (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\koa-compose\index.js:42:32)
at C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\strapi-admin\controllers\authentication.js:35:16
at callback (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\koa-passport\lib\framework\koa.js:93:25)
at Strategy.strategy.success (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\passport\lib\middleware\authenticate.js:219:18)
at verified (C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\passport-local\lib\strategy.js:83:10)
at C:\Users\User\Desktop\strapi-connector-firestore-master\examples\cloud-run-and-hosting\node_modules\strapi-admin\services\passport\local-strategy.js:15:43
[2021-08-10T14:22:46.766Z] debug POST /admin/login (125 ms) 500
@terumik no worries, glad it is resolved. Feel free to ask if you have any other issues.
I'm trying to run examples/cloud-run-and-hosting locally, but stuck on login screen. Any help would be appreciated.
What I did:
GCP_PROJECT: my-firebase-project
ADMIN_JWT_SECRET=jwt-token (created by running node -e "console.log(require('crypto').randomBytes(64).toString('base64'))" # (all users))
Am I missing something? I'm also stuck on deploying the example project to the remote, but I'll try some more and if it doesn't work, I'll ask a separate question later.
Related: https://github.com/arrowheadapps/strapi-connector-firestore/issues/11