Getting Agent unreachable error

Getting Agent unreachable error

Feature(s) impacted

Many users are not able to to load the forest admin due to this error. Some users are able to login the FA successfully.

Observed behavior

In the network tab getting CORS error in the authentication request

Expected behavior

All user should be able to login the FA and able to see the data.

Failure Logs

Getting CORS error

Context

Project name: Curator
Team name: Developer
Environment name: ALL (Staging, Development, Production)
Agent type & version:
Package Version: 9.3.5 (forest-express-sequelize)
Express Version: 4.20.0
Sequelize Version: 6.30.0
Database Dialect: MySql

  • Project name: …
  • Team name: …
  • Environment name: …
  • Database type: …
  • Recent changes made on your end if any: …

And, if you are self-hosting your agent:

  • Agent technology: (nodejs, php, ruby, python)
  • Agent (forest package) name & version (from your .lock file): …

Hello @Naresh and welcome to the community !

Could you please share the following:

  • the logs from your agent as you are trying to connect on forest
  • in the network tab does the CORS preflight request receive a response?

Additionally can you try running a curl to your agent ?
curl -v [your-agent-endpoint]/forest

The issue is most likely happening upstream of your agent.
Could you check your nginx/reverse proxy configuration to ensure that:

  • OPTIONS requests are properly allowed
  • CORS headers (Access-Control-*) are not being filtered

Could you check your proxy logs to see if the OPTIONS requests are reaching the proxy and what’s happening to them?

@Matthv This is even happening for local environment where is it trying to reach localhost:.

Request is not reaching to server and even preflight request is failing.

1 Like

Hello @Nilesh, thanks for the update.

Recent Chrome/Chromium versions require explicit user permission for a remote site.
Can you look if you have given the local network access permission to app.forestadmin.com ? New permission prompt for Local Network Access  |  Blog  |  Chrome for Developers

Please also try loading Forest Admin:

  • in private navigation with all extension disabled
  • on another browser

To definitively check if your agent is reachable locally and responding correctly, could you try to execute the following command
curl -i -X OPTIONS -H "Origin: https://app.forestadmin.com" -H "Access-Control-Request-Method: GET" http://127.0.0.1:PORT/forest

@matthv Thank you. Permissioning local area connection helped resolve issue with Local Environment. @Naresh Can you verify if this resolved issue with other environments as well.

HI @Nilesh @matthv I have confirm with the users who were facing the issue. After granting the permission to local network, all envs are working as expected. Thanks.

1 Like