very urgent problem, the behavior between development and production environments is different, so it is not possible to develop applications | Community
Skip to main content

very urgent problem, the behavior between development and production environments is different, so it is not possible to develop applications

  • July 12, 2023
  • 4 replies
  • 0 views

Hello,
the behavior between development and production environments is different, so it is not possible to develop applications.

In this video https://streamable.com/zhk7v3  you can see how the behavior is actually different, unfortunately there isn't a way to upload the code but if it's needed and you show me how, I can send it.
This is a trivial example where a component prints text on screen if the metadata variables are true.
Please, I ask you to give top priority to this report.
Thank you
Stefano Stirati

4 replies

  • Author
  • July 12, 2023

here i uploaded the example code:

https://drive.google.com/file/d/1tw1lEsONriSWxTPywCqeTlR1LOO0Z9lG/view?usp=sharing 

In case you need it, I have also enabled access to the zendesk account

Thank you
Stefano Stirati


Tipene
  • July 21, 2023

Hey @stefano13,

I've done some testing on the code you uploaded and it looks like the issue is being caused by a type mismatch in the metadata. Essentially, the metadata is being returned as a string on the local server, whereas it is being returned as a boolean once the app has been uploaded. For the app to function as expected in production, you'll need to update line 54 of your App.js file to be localContext.basic_dashboard==true (boolean instead of string). You'll also need to update the if statement on line 19 in your ChatGptBasic component to evaluate a boolean instead of a string.

I'm sorry for the frustration this must have caused! I'll bring this to our dev team to see how we can ensure consistency between environments in future.

Feel free to reach out if you have any questions!

Tipene


  • Author
  • July 25, 2023

Hello Tipene,
thank you for checking.

Now, with this crucial information, I managed to proceed with the development.
Thanks a lot, I was going crazy! :)


Tipene
  • July 26, 2023

Glad you've got it working!

For future local testing, you could also utilize the ZCLI config file to define your setting values. This will ensure that the correct type is provided when calling the metadata. Here's a link which goes in to more detail:

https://developer.zendesk.com/documentation/apps/getting-started/setting-up-new-apps/#defining-test-settings