This is a template you can use to report issues. You can also drag images, videos and include Preformatted text
Hello :)
We cannot authenticate on our forestadmin project since upgrade to v7 .
Everything working fine in dev mod
I guess we are doing something wrong ... :(
Access to fetch at 'https://admin.production.panopli.co/forest/authentication' from origin 'https://app.forestadmin.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Request URL: https://admin.production.panopli.co/forest/authentication
Referrer Policy: strict-origin-when-cross-origin
Provisional headers are shown
Content-Type: application/json; charset=utf-8
Referer: https://app.forestadmin.com/
sec-ch-ua: " Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Request URL: https://admin.production.panopli.co/forest/authentication
Request Method: OPTIONS
Status Code: 502
Remote Address: 34.95.84.11:443
Referrer Policy: strict-origin-when-cross-origin
alt-svc: clear
content-length: 332
content-type: text/html; charset=UTF-8
date: Mon, 12 Jul 2021 09:09:47 GMT
referrer-policy: no-referrer
:authority: admin.production.panopli.co
:method: OPTIONS
:path: /forest/authentication
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
access-control-request-headers: content-type
access-control-request-method: POST
origin: https://app.forestadmin.com
referer: https://app.forestadmin.com/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Expected behavior
Please describe here the behavior you are expecting.
Actual behavior
What is the current behavior?
Failure Logs
Please include any relevant log snippets, if necessary.
Context
Please provide any relevant information about your setup.
Your browser is getting a 502 error for the request that it’s sending OPTIONS https://admin.production.panopli.co/forest/authentication
This request is the first one that is launched to your agent before anything else.
The 502 error indicates a “Bad gateway error”, meaning that your reverse proxy cannot access to your agent to redirect the request.
Can you first test if you can access this agent from your browser, at the addess https://admin.production.panopli.com? You should see " Your application is running!`. If it’s not the case, then I guess that something is wrong with your configuration.
Well i got errors on my gcp container logs
first i get flooded by
PM2 error: (node:1) Warning: Accessing non-existent property ‘to’ of module exports inside circular dependency
then
2021-07-12T09:56:30: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The “data” argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1)
then i get the normal forestadmin logs
EDIT : well nevermind those logs also appears after we rolled back the migration , we can correctly log after rolled back
I rolled back to v5 to make it work ( we have a very old project )
The agent in v7 seems to init correctly as we get the welcome logs " Your admin panel is available here: https://app.forestadmin.com/projects" on my container logger.
Then i get 404 everytime i try to authenticate
Ok, then the error is no more a 502 as it was at the beginning.
Now, I suppose that the OPTIONS request receives a valid response, but you get a 404 on /forest/session?
As you are modifying a production environment, you have to copy the file forestadmin-schema from the dev environment that you already migrated and that you validated.
This file contains a declaration of the version that is being used by the server, and this version is used to determine which endpoint to use when logging in (it changed in v7).
The 502 from admin.production.panopli.co is from our load balancer ( it cannot find any healthy pod ).
I have no clue on what is going on . The V7 upgrade works fine on localhost, no error message and i can use the app.
Ok, then the route / is probably not defined on the backend. As you get a 404 error, it means that a backend is correctly responding.
Now, let’s move on to the next topic: authentication.
Can you please open the right environment on your project, in your browser, open the developer tools and identify the requests that are failing during the authentication?
Hello again Sorry for late response . Thank you for your help @GuillaumeGautreau , it was actually an healtcheck issue , we were trying on / and we get no reponses ( as it wasn’t define on the backend) . Changing the healtcheck url on our side solve the problem
Have a nice day