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

4 댓글

  • Stefano Stirati

    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

    0
  • Tipene Hughes
    Zendesk Developer Advocacy

    Hey Stefano Stirati,

    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

    0
  • Stefano Stirati

    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! :)

    0
  • Tipene Hughes
    Zendesk Developer Advocacy

    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

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공