-
Notifications
You must be signed in to change notification settings - Fork 79
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
Empty API Mock editor #1269
Comments
I have the same issue. Also using amplify 10.7.0. I am on a Mac M1. Looks very similar to this issue that already got resolved in 9.0.0 couple months ago: aws-amplify/amplify-cli#10578 |
Same issue on amplify 10.7.1. I am also on a Mac M1. |
Hey @dan-hook 👋 thanks for raising this! Was the
@raphipaffi @issakr on M1 macs you will need to install the 64-bit version of Java For example, this is the Java version I am running locally on my M1 mac
|
I already use openjdk openjdk version "17.0.4.1" 2022-08-12 |
I think that log item is spurious and may have even been caused by my computer going to sleep. There was 5-10 minutes between each "Re-Trying with a new shard". I stopped checking the Explorer after about six of them. This is a complicated Amplify project and this is the first time I've tried running aws mock api on it. There were a number of issues such as VTL parsing errors that I needed to fix before I got this far, and I'm not surprised that there are still more issues. I'm not surprised it doesn't work, I just wish there was a better error message. |
I already have Java 64bit installed ➜ route-planner git:(master) ✗ java -version Let me know if there is anything else I can try. |
Hey @raphipaffi @issakr given the M1 issue is different than what this issue is describing, would y'all mind filing a separate bug report to track your issue separately? We want to be sure this is addressed and documentation is updated if necessary. Do you experience the same issue using the official distribution from the OpenJDK downloads page?
Would you be open to sharing your Upon further review of the error messaging I see the following error, are you using a Relational Database with your GraphQL API?
|
I also started suffering this issue. I was trying on the 10.7.3 and 10.7.2 client builds. The following comment helped me resolve it for now: aws-amplify/amplify-cli#10488 (comment) - downgrade to 10.6.2 and it's working again. |
@NicholasAllen thank you so much for that tip! That downgrade also "fixed" it for me. |
Hi, there is an ETA for the resolution of this bug? |
@josefaidt. We are still experiencing this issue in 11.0.5. Any update on the fix? FYI. Clearing mock files does not help. . I have @searchable annotations so I am unable to go back to 10.x.x |
We are experiencing the same issue on 11.0.5. |
@josefaidt @phani-srikar This issue still exists in 11.1.0. I would love to have this addressed if possible. I cannot downgrade to 10.6.2 because I am using OpenSearch mocking, which is only available in 11.x.x. I realize this may not seem like a priority but as a longtime Amplify. user it's a huge disadvantage to not have this feature in API mocking. Any updates? |
@josefaidt @phani-srikar ... any updates on this bug? It has really slowed development to not be able to use the tools to test locally. I am commenting here because It has been so long and I would really love to get this bug addressed so I can be on an updated amplify version. I am still stuck on 10.6.2 just to be able to get this to work :( |
Checking for any updates on this bug. Still exists in 12.1.0 |
@josefaidt Hi josefaidt. Thank you for your response. You have transfered this issue from amplify-cli repository to here. amplify mock is very useful and important function for developers. A lot of developers are stuck in this bug for months. Best regards, |
I found that the error directly comes from adding Cognito User Pool auth to the api, no matter if API or IAM is also enabled. Working with amplify -v 12.0.0 since amplify mocks fail completely on m2 Mac using the latest version of the cli. |
Any updates ? Same issue with Amplify CLI version 12.3.0. |
I have confirmed that it also occurs in v12.4.0. |
Still occurs in v12.7.0. |
It's been months and still not able to see anything on Amplify GraphiQL Explorer. There is this Also, when I try to execute a query, I always get the unauthorized error: {
"errors": [
{
"errorType": "UnauthorizedException",
"message": "UnauthorizedException: Missing authorization"
}
]
} |
As mentioned by others developing and testing locally is very important and without it the development process is far slower. @josefaidt Are there any updates? |
Hi everyone, this issue was opened almost 1 year ago. It is NOT a MINOR bug. There are teams around the world that are not able to use the latest version of Amplify just because of this problem. Could you help us, @josefaidt, @alharris-at ? |
I would like to share my experience, maybe will help someone. Yes, I'm having the same issue as everyone. But, given that I use nvm to control my node versions, I "manage" to deal with this problem installing different amplify-cli version on different node version as mentioned here.
Also, I do agree with @kmy90. It should not be treated as a minor thing. |
Hey folks, this is a serious issue here impacting everyone and disrupting the development process. Using workarounds, like downgrading the Amplify version, isn't the most convenient solution. Personally, I struggled with testing my projects locally using the explorer, and it really bothered me that such an important issue had been left unattended for a year. I fixed it by creating a PR (aws-amplify/amplify-cli#13555). Can you please support it? We need the Amplify team to review and approve the fix. Thanks! |
Still occurs in v12.10.1. |
Fixed in version 12.11.0 |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v18.14.0
Amplify CLI Version
10.7.0
What operating system are you using?
Ubuntu 22.04 on WSL2 on Windows 10
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Yes, the changes are extensive.
Describe the bug
I ran apt-get install java-11-amazon-corretto-jdk to install Java.
Running amplify mock api launches Amplify GraphiQL Explore on localhost:20002, but it's empty saying "No Schema Available".
The CLI output is:
vscode ➜ .../panel-api/project/amplify/backend (features/VCD-504-ecv-api ✗) $ amplify mock api
GraphQL schema compiled successfully.
Edit your schema at /workspaces/gene-panel-api/project/amplify/backend/api/genepanelapi/schema.graphql or place .graphql files in a directory at /workspaces/gene-panel-api/project/amplify/backend/api/genepanelapi/schema
Mock does not handle CloudFormation resource of type AWS::IAM::ManagedPolicy. Skipping processing resource AuthRolePolicy01.
Mock does not handle CloudFormation resource of type AWS::IAM::ManagedPolicy. Skipping processing resource AuthRolePolicy02.
Mock does not handle CloudFormation resource of type AWS::IAM::ManagedPolicy. Skipping processing resource AuthRolePolicy03.
Data source of type RELATIONAL_DATABASE is not supported by local mocking. A NONE data source will be used.
Data source of type HTTP is not supported by local mocking. A NONE data source will be used.
Data source of type HTTP is not supported by local mocking. A NONE data source will be used.
Data source of type HTTP is not supported by local mocking. A NONE data source will be used.
Could not find ref for "RdsPanelDbName". Using unsubstituted value.
Could not find ref for "RdsPanelDbName". Using unsubstituted value.
Running GraphQL codegen
✔ Generated GraphQL operations successfully and saved at ../../src/graphql
AppSync Mock endpoint is running at http://172.17.0.2:20002
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Re-Trying with a new shard
Mock DB deletion detected. Clearing the OpenSearch indices...
Re-Trying with a new shard
Re-Trying with a new shard
Failed to start API Mocking. Running cleanup tasks.
MockProcessFault: Failed to start API Mocking.. Reason: null
at APITest.start (/snapshot/repo/build/node_modules/amplify-util-mock/lib/api/api.js:151:13)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async start (/snapshot/repo/build/node_modules/amplify-util-mock/lib/api/index.js:18:5)
at async Object.run (/snapshot/repo/build/node_modules/amplify-util-mock/lib/commands/mock/api.js:21:5)
at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/amplify-util-mock/lib/amplify-plugin-index.js:47:3)
at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:142:5)
at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:40:9)
at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:117:5) {
classification: 'FAULT',
options: {
message: 'Failed to start API Mocking.. Reason: null',
link: 'https://docs.amplify.aws/cli/graphql/troubleshooting/'
},
downstreamException: undefined,
toObject: [Function (anonymous)],
details: undefined,
resolution: undefined,
code: undefined,
link: 'https://docs.amplify.aws/cli/graphql/troubleshooting/'
}
Expected behavior
I expected to see the API in the explorer.
Reproduction steps
Run 'amplify mock api'
Project Identifier
9c19ea5526c1afd0a3e1987ea44f96af
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: