How create dev environment?

Hi,

I have forest admin deployed in production and staging, and that works.

However I no longer have access to my local development environment. I’ve tried creating a branch to see if that was needed in order to create a dev environment, however I get this message:

You are not allowed to access this environment

…despite the fact that I’m an admin user.

What do I need to do?

Hello @timothyarmes,

Can you please share to me your project name so I can check that you do have the right to access it?
When this behavior appears for the first time?

Thanks in advance! :slight_smile:

Hi,

The project is called BRXS

Ok thanks, have you been able to connect before? Can you share the request that is failing from your network tab? :slight_smile:

There are no errors in the browser, I just don’t see a dev environment.

From the command shell I can’t create a branch:

macpro:forest Tim$ forest login

Click on “Log in” on the browser tab which opened automatically or open this link: https://app.forestadmin.com/oidc/confirm?user_code=R9UZ-8VC2

Your confirmation code: R9UZ-8VC2

Login successful

macpro:forest Tim$ forest branch new-user-field

× You are not allowed to access this environment.

macpro:forest Tim$

Hello @timothyarmes,

When I look into our data, I can see 3 projects which can match yours: “BRXS”, “BRXSApp” and “Brxs”.

Could you please confirm:

  • the exact name of the project you see in the top left corner of the admin panel, or just after forestadmin.com/ in the URL
  • the ID for this project, found in the Forest-Project-Id header of requests in the network tab of your developper tools
  • the mail you are using to connect to Forest Admin (either xxx@tixxxxx.com or xxx@thexxx.com)
  • the first few character of the FOREST_ENV_SECRET variable found in the .env file in your Forest Agent directory

There may be a mixup between the Forest Agent setup and the user actually logged into Forest Admin.

If both email mentioned above are yours, you can also try to logout from Forest Admin, login with the other email, and redo the forest login procedure.

Let me know if this helps

Thank you

Hi @anon79585656,

Effectively, it’s confusing :slight_smile:

The Project is Brxs (https://app.forestadmin.com/Brxs)

The others were temporary while I was waiting for access to the official one (which the client could only invite me to after we moved to production, which was the cause of many headaches). It’s associated with the xxx@thexxx.com address, and that’s the one that I’m logging into using forest login. I’d like to delete the other ones but I can’t easily find a way.

@timothyarmes,

To delete a project, you need to:

  • login with a user which is registered
  • go to the project list: https://app.forestadmin.com/projects
  • move your cursor over the project you want to delete
  • click on the three-dots icon appearing on the left and click settings
  • click “Delete project” in “Danger zone”

This CANNOT be undone, so please be careful :pray:

After this, you will still need to:

  • login with forest login into the remaining project
  • ensure that you Forest Agent uses a FOREST_ENV_SECRET value which matches the development environment

Thanks, I’ll look at that, but may main problem is still that

  1. I can’t create a branch
  2. I can’t see a dev environment

Sorry if I was not clear.

My gut feeling is that you login with a user, but try to create a branch within a project created by another user.

That is why I wanted to know all those IDs and partial secret values in my first answer. To check that all was coherent.

If you delete the old projects, ensure that the FOREST_ENV_SECRET value is right, and the issue remains, we’ll look into another way of fixing it.

Thanks, that clue gave me the info that I needed.

I deleted the .env, and then did a forest init.

All working now!!

Good to know.

Sorry for not suggesting this simpler way from the start :pray:

Thank you for your patience.