Cannot reach production environment!

Expected behavior

Accessible production environment

Actual behavior

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.

“dependencies”: {

"chalk": "~1.1.3",

"cookie-parser": "1.4.4",

"cors": "2.8.5",

"debug": "~4.0.1",

"dotenv": "~6.1.0",

"express": "~4.16.3",

"express-jwt": "5.3.1",

"forest-express-sequelize": "^5.7.0",

"morgan": "1.9.1",

"require-all": "^3.0.0",

"sequelize": "~5.15.1",

"pg": "~6.1.0"

}

  • Project Name: pwure-forest-oms

Redirecting traffic to previous deployments fails as well

thought it is different - nope, 2 browsers, its broken in 1 or another one from time to time.

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

Hi @pwurer,

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…)?

Best regards,

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

Hello @pwurer !

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.

Thanks in advance.
Morgan.

Yep the problem looks different. But when I had the issue (originally reported) and was trying to fix it - the fix was the same - use another browser.


errors in chrome (after i click sign in with google acc):

https://pwure-oms-backend.appspot.com/forest/users?fields%5Busers%5D=createdAt%2Cemail%2Cfirstname%2Cid%2Cpassword%2Cphone%2Crole%2CseCustomerId%2CupdatedAt&page%5Bnumber%5D=1&page%5Bsize%5D=15&searchExtended=0&sort=-id&timezone=Europe%2FKiev

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)

and

https://pwure-oms-backend.appspot.com/forest/users/count?fields%5Busers%5D=createdAt%2Cemail%2Cfirstname%2Cid%2Cpassword%2Cphone%2Crole%2CseCustomerId%2CupdatedAt&searchExtended=0&timezone=Europe%2FKiev

They result in 403 error

It loaded in Brave perfectly.

Seems right now development works in chrome, and prod / staging - in Brave.

Hi @pwurer,

Your admin backend is responding a 403 sometimes.
Could you please share the log matching this error that should be displayed on this server?

Additionally, do you log in with the same account from one browser to the other? Are you logged out from the 1st one where logging in the 2nd one?

Finally, can you try to deactivate all your browser extensions and see if it solves your issue?

Thanks.

updated liana in all environments as email came about chrome → issue resolved.