# smartAction not created

**URL:** <https://community.forestadmin.com/t/smartaction-not-created/6551>\
**Category:** Help me!\
**Created:** [August 7, 2023, 7:48pm UTC](https://community.forestadmin.com/t/smartaction-not-created/6551 "2023-08-07T19:48:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fletoxIsHere](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@fletoxIsHere](https://community.forestadmin.com/u/fletoxIsHere)\
**Post date:** [August 7, 2023, 7:48pm UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/1 "2023-08-07T19:48:00Z")

</div>

## Feature(s) impacted

smartAction

## Problem

i created a smart action “import Completed Rides” on RidesCompleted collection, but i can’t see it.

## Context

- Project name: Roby
- Team name: Developer
- Environment name: UAT
- Agent (forest package) name & version: “forest-express-mongoose”: “^8.0.0”
- Database type: mongoDB

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [August 8, 2023, 8:40am UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/3 "2023-08-08T08:40:01Z")

</div>

Hello @fletoxIsHere,

`UAT` is a remote environment, are you sure that you are developing smart actions on it? The usual process is to develop smart actions locally on development environments, and then release them on remote environments.

I’m sharing this question because I noticed that the environment `UAT` had a few changes on August 3rd (changes in field definitions), but we did not receive any change since then.

The schema associated to the development environment on this project has not been changed since July.

Can you please share the 3 last characters of the environment secret that is configured on the environment you’re working on?

Also, can you check the value of `NODE_ENV` on this environment? When `NODE_ENV` is set to `production`, the schema is not automatically updated, which could explain why we did not receive any change.

Last question: can you see your action in your `.forestadmin-schema.json` file, which should have been generated inside your project’s folder.

---

<div class="post-metadata">

**Author:** ![fletoxIsHere](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@fletoxIsHere](https://community.forestadmin.com/u/fletoxIsHere)\
**Post date:** [August 8, 2023, 9:45pm UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/4 "2023-08-08T21:45:33Z")

</div>

yes i am developing directly on UAT server with ssh tunnel on vs insider.

the last 3 characters of the environment secret: b23

the project is runnig on container, this is the dockerfile of UAT env:  
FROM node:14-bullseye  
RUN mkdir -p /usr/src/app  
WORKDIR /usr/src/app  
COPY .npmrc package.json yarn.lock server.js /usr/src/app/  
RUN yarn install --production  
COPY data /usr/src/app/data  
COPY config /usr/src/app/config  
COPY src /usr/src/app/src  
RUN yarn add nodemon  
RUN npm install -g nodemon  
EXPOSE 8080  
CMD [“npm”, “run”, “dev”]  
ARG VERSION=“latest”  
ENV VERSION “$VERSION”

there is changes that i can see on forest and forest ask me to refresh the page but still not added to the file .forestadmin-schema.json.

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [August 9, 2023, 9:06am UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/5 "2023-08-09T09:06:11Z")

</div>

Can you please share

- the value of `NODE_ENV` on this server?
- the code declaring the new smart actions (I don’t need the implementation, just the declaration)

Have there been any other recent changes on the agent?

---

<div class="post-metadata">

**Author:** ![fletoxIsHere](https://avatars.discourse-cdn.com/v4/letter/f/ad7895/32.png) [@fletoxIsHere](https://community.forestadmin.com/u/fletoxIsHere)\
**Post date:** [August 9, 2023, 7:54pm UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/6 "2023-08-09T19:54:19Z")

</div>

hi,  
magenta.env.getString(“VERSION”, “dev”);  
smart action declaration: name: ‘import Completed Rides’  
we made migration on the agent from 7.9.1 to 8.0.0  
thank you

---

<div class="post-metadata">

**Author:** ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)\
**Post date:** [August 10, 2023, 6:57am UTC](https://community.forestadmin.com/t/smartaction-not-created/6551/7 "2023-08-10T06:57:40Z")

</div>

Do you have access to the console on your server?

The latest released version of `forest-express-mongoose` on v8 (`8.7.10`, released yesterday) displays warnings in the console on the reasons why the schema is not updated. It could help to ugprade to this version and read the console message.

Could you please do the upgrade and copy/paste the messages here?

I don’t know how your servers are configured, but I’m not sure to see the link between `magenta.env.getString(“VERSION”, “dev”);` and the environment variable named `NODE_ENV`.

I took a look at the [documentation for migrating from v7 to v8](https://docs.forestadmin.com/documentation/extra-help/maintain/upgrade-notes-sql-mongodb/upgrade-to-v8), and I did not find anything that seems related to your issue. It could be worth to check this documentation anyway to find if there are any changes needed regarding your customizations.
