# Getting error while pushing changes to remote environment

**URL:** <https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128>\
**Category:** Help me!\
**Created:** [August 19, 2021, 9:00am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128 "2021-08-19T09:00:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajithmani](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ajithmani/32/2806_2.png) [@ajithmani](https://community.forestadmin.com/u/ajithmani)\
**Post date:** [August 19, 2021, 9:00am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/1 "2021-08-19T09:00:45Z")

</div>

Hi Team,  
I am trying to push the changes from my local forest branch to staging enviroment named ‘qa’ in forest-admin. I am getting the below error.

```javascript
Failed to push branch: source and destination environments must have the same schema 

```

 ![Screenshot 2021-08-19 at 2.22.31 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/f/f1a90706001edba42fdfbaa9249eced98a81b017.png)

I have checked the .forestadmin-schema.json files of my development and remote branches. They are similar.  
When i have tried to send the schema to forest server manually using the `forest schema:apply --secret YOUR_FOREST_ENV_SECRET` command, i got the below error

```javascript
Invalid json: Unexpected number in JSON at position 104989 

```

 ![Screenshot 2021-08-19 at 2.26.21 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/3/3535bc5568695604d81e376a6c7af212d8150b94.png)

Please help me out to resolve this issue.

Regards,  
Ajith mani V.

Project Name: PlutusAdmin

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [August 19, 2021, 9:23am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/2 "2021-08-19T09:23:25Z")

</div>

Hi @ajithmani,

The first message about “_failed to push, source and destination…_” is relevant.

To push layout changes from an environment to another, they must be compatible. The file `forestadmin-schema.json` must be the same for both environments. Only `meta.stack` inside `forestadmin-schema.json` can be different because it’s ignored.

To have the same files, you have to merge the development server to the staging server and restart it.  
Be careful, sometimes this error happened because some versions fields are differents.

Regards

---

<div class="post-metadata">

**Author:** ![ajithmani](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ajithmani/32/2806_2.png) [@ajithmani](https://community.forestadmin.com/u/ajithmani)\
**Post date:** [August 19, 2021, 9:29am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/3 "2021-08-19T09:29:49Z")

</div>

HI @Sliman_Medini,  
I have merged my dev server to staging server and restarted it.  
But still i am getting that error

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [August 19, 2021, 9:32am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/4 "2021-08-19T09:32:32Z")

</div>

Ok

Can you get the `forestadmin-schema.json` from the dev, and also from the staging?  
Like that you can compare them with a tool like diff.

Regards

---

<div class="post-metadata">

**Author:** ![ajithmani](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ajithmani/32/2806_2.png) [@ajithmani](https://community.forestadmin.com/u/ajithmani)\
**Post date:** [August 19, 2021, 9:46am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/5 "2021-08-19T09:46:32Z")

</div>

I have checked both the files using [Diffchecker](https://www.diffchecker.com/diff)  
They are similar

---

<div class="post-metadata">

**Author:** ![louis](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louis/32/4_2.png) [@louis](https://community.forestadmin.com/u/louis)\
**Post date:** [August 19, 2021, 12:19pm UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/6 "2021-08-19T12:19:44Z")

</div>

@ajithmani I noticed some changes in your development environment.

Do you confirm it’s working now? Was it related to your REGEX with the invalid date field?

---

<div class="post-metadata">

**Author:** ![ajithmani](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/ajithmani/32/2806_2.png) [@ajithmani](https://community.forestadmin.com/u/ajithmani)\
**Post date:** [August 20, 2021, 9:33am UTC](https://community.forestadmin.com/t/getting-error-while-pushing-changes-to-remote-environment/3128/7 "2021-08-20T09:33:42Z")

</div>

Hi @louis,  
No, it is not working.  
After our talk, i have removed that particular regex validation and tried to push my changes.  
Still i am getting the schema mismatch error

Also, when I restart my rails server, schema file is getting changed.

 ![Screenshot 2021-08-20 at 2.59.05 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/6/692d9aa98dddfcd1766c30bf5dab666c22357d89.png)
