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

amplify mock not reverting aws-exports.js on termination #9338

Closed
4 tasks done
zalanfarkas opened this issue Dec 17, 2021 · 3 comments · Fixed by #9385
Closed
4 tasks done

amplify mock not reverting aws-exports.js on termination #9338

zalanfarkas opened this issue Dec 17, 2021 · 3 comments · Fixed by #9385
Assignees
Labels
bug Something isn't working mock Issues tied to the mock functionality

Comments

@zalanfarkas
Copy link

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v14.17.6

Amplify CLI Version

7.6.4

What operating system are you using?

Mac (Apple Silicon)

Amplify Categories

Not applicable

Amplify Commands

Not applicable

Describe the bug

amplify mock is not reverting aws-exports.js on termination, therefore, it still contains the mock values.

Expected behavior

According to the docs: Once you stop the mock server the config files are updated with the correct cloud endpoints for your project and DangerouslyConnectToHTTPEndpointForTesting is removed from the config file.

Reproduction steps

  1. Run amplify mock
  2. Terminate amplify mock

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

Workaround: after running amplify push or amplify pull, the endpoint values will be correct again. However, we still need to remove "aws_appsync_dangerously_connect_to_http_endpoint_for_testing": true from aws-exports.js manually.

@mdarche
Copy link

mdarche commented Dec 22, 2021

Experiencing this issue as well in the latest 7.6.5

@sundersc sundersc added the pending-response Issue is pending response from the issue author label Dec 27, 2021
@sundersc
Copy link
Contributor

I can confirm that this issue can be reproduced, we will look into this.

@sundersc sundersc added bug Something isn't working and removed pending-response Issue is pending response from the issue author pending-triage Issue is pending triage labels Dec 27, 2021
@sundersc sundersc linked a pull request Dec 29, 2021 that will close this issue
5 tasks
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working mock Issues tied to the mock functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants