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
Command PhaseScriptExecution failed with a nonzero exit code (0.13.0) #667
Comments
Hey Dmitry, have you added any |
It looks like it's not finding them - that's the |
Thanks, when I add |
That's...weird. |
Yes, it prints correct directory, where schema.json and .graphql file and .swift files are placed |
I'm having the same issue. I used the I also upgraded to Xcode 10.3 this morning. There was a separate Xcode 10.3 issue I had to fix related to simulators not showing up. Finally, |
@DmitryVanyshkin And if you comment out the |
@joninsky The 10.3 syntax highlighting issue is related to UUIDs in the plugin - hopefully I can get that merged and updated shortly. Can you link to which of Dmitry's messages contains the error you're getting? |
I deleted the However, I am at a new issue where all my queries that I am passing into the It looks like some people on the other thread are having the same issue. |
@joninsky and anyone else running into that issue: Please see the 0.13.0 release notes - that's got info on how to fix that (spoiler: it's about the change from a tuple to a |
Yes, if I comment echo line the same error goes back. About DerivedData - there is no such folder, but I use clean Build (cmd+shift+K) and it doesn't resolve my problem. |
Thank you @designatednerd ! So happy to have someone working full time on this library. 🙏🏽🙏🏽🙏🏽 I'm thrilled we have release notes with breaking changes now! |
@DmitryVanyshkin Yeah theoretically that and deleting Derived Data do the same thing, in practice I've found sometimes I still need to nuke it from orbit, just to be sure. Can you send me your project via email? ellen at apollographql dot com. I'll try to take a look in the morning. |
OK the look was quicker than I thought - seems like there was a syntax error in the Anyone else reading: If you're having problems with this, I've been able to identify bad syntax really easily using this formatter - it can't tell you if you're using the wrong queries or properties or anything, but it can tell you if your GQL has a syntax error, and will tell you exactly where. |
Thank you a lot! That was rather stupid mistake from me. You are my hero!! |
Im trying to build the API.swift file for days now and I continue to run into the same error (nonzero exit code). It sopped showing the error code after adding echo $(pwd).
I only use the schema.json file within the project folder and the codegen script is opening the file. I checked this by adding characters to the json file leading to an exact error message. I checked the scheme for correct formatting and uploaded the valid but optimized version to my server and extracted the scheme as json via the apollo command. The error still occurs. At least Xcode is building the app now after I added the echo $(pwd) command. I uploaded the schema.json here. |
It looks like the script isn't finding the query files from this error: Can you take a look at what you're passing in for |
This is the code from build phase:
I have only the query.graphql file in my project: |
The query is not formatted correctly, which is why you're getting those errors. You'd need something more like: query AircraftList {
aircrafts {
... on Aircraft {
id
}
}
} To get a list of aircraft that returns every aircraft's ID from the schema you sent. Try messing around with GraphiQL or a similar tool on your site, that should help you come up with valid queries. |
My fix was to remove a hard version target in my Podfile. Once I changed to |
I update apollo-iOS to a new version (0.13.0)
When I trying to make codegen for schema.json file I get error while running shell-script
i recieve message like this one:
++ npx --no-install apollo codegen:generate --target=swift '--includes=./**/*.graphql' --localSchemaFile=schema.json API.swift Loading Apollo Project [started] Loading Apollo Project [completed] Generating query files [started] Generating query files with 'swift' target [title changed] Generating query files with 'swift' target [failed] → No operations or fragments found to generate code for. (node:1521) UnhandledPromiseRejectionWarning: Error: No operations or fragments found to generate code for. at write (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:61:39) at GraphQLClientProject._onDiagnostics (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:84:29) at GraphQLClientProject.validate (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/client.js:140:18) at GraphQLClientProject.validateIfNeeded (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/base.js:136:14) at Timeout._onTimeout (/Users/dmitrijvanuskin/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo-language-server/lib/project/base.js:128:22) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) (node:1521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:1521) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Error: No operations or fragments found to generate code for. at write (~/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:61:39) at Task.task (~/Desktop/BorrowLend/BorrowLand/Application/BorrowLend/node_modules/apollo/lib/commands/client/codegen.js:86:46) Command PhaseScriptExecution failed with a nonzero exit code
I am currently using apollo 2.16.1 and XCode 10.3. All steps are similar to apollo ios guide
The text was updated successfully, but these errors were encountered: