Cannot reach the server. Staging and development environment working fine. Hosted on app engine. (node js 10) - staging hosted same.
Failure Logs
2021-04-29 14:05:21 default[20210429t164942] [forest] ??? Permissions error: Cannot retrieve the data from the Forest server. Can you check that you properly copied the Forest envSecret in the Liana initializer?
2021-04-29 14:05:21 default[20210429t164942] GET /forest/users/count?fields%5Busers%5D=createdAt%2Cemail%2Cfirstname%2Cid%2Cpassword%2Cphone%2Crole%2CseCustomerId%2CupdatedAt&searchExtended=0&timezone=Europe%2FKiev 403 1608 - 996.329 ms
2021-04-29 14:05:21 default[20210429t164942] ForbiddenError: Forbidden
Please include any relevant log snippets, if necessary.
Context
Please provide any relevant information about your setup.
Hello @pwurer and welcome to the Forest Admin community,
Could you please explain what you mean by “broken in 1 or another one from time to time”?
To reiterate on the error message, did you check that the secret key in your production environment matches the one generated by Forest Admin when deploying it?
If unsure, you can redo the deploy process into another new environment with the same endpoint.
Yep I did all of that. Also redirected traffic to old instance . All the environmental variables correct. Then I found it was working in another browser. I use several of them, and sometimes in chrome forest stops working, and I have to use brave.
Dunno how browser is related to forest admin not connecting though
Your browser choice is probably unrelated to the issue you shared in the first place. If you’re still encountering issues with some browsers, would you mind checking the browser logs and share any error that might show up there. Also this browser issue might come with bad display behavior. To help us dig into this, it might be helpful for us to have a screenshare of yourself experiencing the issue (using loom for example).
As for your connection error, it seems that when starting your production server, the logs states that the server is unable to reach the environment. That might be linked to an out of sync between the environment secret stored on our end and the one set on your production server’s env variables.
I just saw that this production environment has been created in February. I do suppose that it was working properly before. Do you recall any changes made on it recently (changing env variables, updating versions…)?
The things is - all my environments have problems with multiple browsers and having now. I use Brave and Chrome. Sometimes it works in one and not works in another one. Like browser is “locking” session or something. Even if I close tab in one browser it keeps failing in another one with errors
Thank you for sharing the loom. It’s not so clear to understand what is going on.
From what I understand the first log you shared with us was not relevant for your problem.
So, on which browser do you get the problem ? Is it in Incognito mode ? (I do the same with Chrome and Safari but I don’t have any problem)
To clearly scope your issue we need more insight. Can you share with us the failing calls Header/Response (from the Network tab of your browser) and also the related logs from your server.
With all those informations we will certainly give you a better answer and maybe find a bug on our side.
ForbiddenError: Forbidden
at /workspace/node_modules/forest-express/dist/middlewares/permissions.js:40:16
at tryCatcher (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/workspace/node_modules/forest-express/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)