Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enviroment name/port prefix etc. will not be updatenetg #428

Closed
volkerrichert opened this issue Mar 5, 2021 · 24 comments
Closed

Enviroment name/port prefix etc. will not be updatenetg #428

volkerrichert opened this issue Mar 5, 2021 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@volkerrichert
Copy link

Describe the bug
If you change the env the top en data will no updated (name, port etc.) when changing env

To Reproduce

  • start mockoon an switch between multiple env. This work fine.
  • click inside the result body of the currently displayed route
  • change env
  • the env data will not be updated anymore

Expected behavior
Always update the env data

Mockoon version:
seen in 1.11.0 + 1.12.0

OS / OS version:
Windows 10

@255kb 255kb added the bug Something isn't working label Mar 5, 2021
@255kb
Copy link
Member

255kb commented Mar 5, 2021

This is quite a serious bug that I cannot reproduce (and never had since a long time).
Could you please export and share your data so I can see if it's related to them?

@volkerrichert
Copy link
Author

I try to break it down. There are some NDA related data in my setup.
maybe some screen sharing?

@volkerrichert
Copy link
Author

But it seems to be one specific collection.

i looked into my data folder and found

[2021-03-05 12:54:55.396] [error] [APPLICATION]Unexpected error: Must supply a value for form control with name: 'endpointPrefix'. - Error: Must supply a value for form control with name: 'endpointPrefix'.
    at file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:4835630
    at file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:4834914
    at Array.forEach (<anonymous>)
    at Hr._forEachChild (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:4834874)
    at Hr._checkAllValuesPresent (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:4835585)
    at Hr.setValue (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:4833723)
    at u._next (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:5195179)
    at u.__tryOrUnsub (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:1427614)
    at u.next (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:1426835)
    at l._next (file:///C:/Users/Volker/AppData/Local/Programs/mockoon/resources/app.asar/main.d661a3fc2ba17d1ca8e6.js:1:1426006)

After that error pops up, the env UI-fields will not updated anymore

@255kb
Copy link
Member

255kb commented Mar 5, 2021

@volkerrichert if you could share just the beginning of your ~/{app_data_folder}/mockoon/storage/environment.json so I can see what is in the endpointPrefix that would be great. You can also join me on Discord to share it privately.

@255kb 255kb self-assigned this Mar 5, 2021
@volkerrichert
Copy link
Author

it's simply missing in that env.

@255kb
Copy link
Member

255kb commented Mar 5, 2021

really? that is strange. There is currently no data validation when the app loads. This is planned in a near future.
Did you modify the data manually?

To fix your issue you need to add it back.

@volkerrichert
Copy link
Author

No, i haved. After adding it it works fine.

@volkerrichert
Copy link
Author

THX for that hint

@255kb
Copy link
Member

255kb commented Mar 5, 2021

ok, did you imported it from an openapi spec file?

@volkerrichert
Copy link
Author

yes, it was imported form an openAPI v3 Sepc

@255kb
Copy link
Member

255kb commented Mar 5, 2021

Could you share these specs? at least the beginning where servers and other root things are defined.

@volkerrichert
Copy link
Author

Stop... I was an mockoon export from a customer. It's missing in that mockoon.json.

@volkerrichert
Copy link
Author


    "source": "mockoon:1.11.0",
    "data": [
        {
            "type": "environment",
            "item": {
                "uuid": "",
                "lastMigration": 13,
                "name": "ntas-mock",
                "latency": 0,
                "port": 3000,
                "routes": [.....

@255kb
Copy link
Member

255kb commented Mar 5, 2021

Still, I wonder how endpointPrefix disappeared. Is it a bug somehow or a manual mistake 🤔
Please, if you encounter this again, try to come up with a reproductible example and reopen the issue. That would help a lot! 👍

@volkerrichert
Copy link
Author

ok!

@volkerrichert
Copy link
Author

The customer promives not to have manually edit the json.

@255kb
Copy link
Member

255kb commented Mar 8, 2021

@volkerrichert thanks for the feedback. If by any chance you can get your hand on the original OpenAPI spec, let me know, that would be great.

@volkerrichert
Copy link
Author

I'll try

@volkerrichert
Copy link
Author

Ok, i can share the origilan openAPI spec, but i tried to import it 3 times.. Works as expected. Sorry. I Think we can close it as "not repoducable"

@255kb
Copy link
Member

255kb commented Mar 8, 2021

I tried to alter some OpenAPI spec files in various ways in order to reproduce it and couldn't either...
It reminded me of something I encountered when developing this feature, so maybe it will reappear in the future. Wait and see.
Thank you again for your help!

@volkerrichert
Copy link
Author

THX for the best mock tool in universe!

@255kb
Copy link
Member

255kb commented Mar 8, 2021

and beyond 🚀
You're welcome😄

@255kb
Copy link
Member

255kb commented Mar 8, 2021

and thank you for the donation @volkerrichert, it means a lot! 😄

@volkerrichert
Copy link
Author

your welcome, too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants