This message was deleted.
# general
s
This message was deleted.
g
The error with verbose logging:
Copy code
I0208 19:23:55.507051   46896 sink.go:154] defaultSink::Error(error: invalid character '"' after top-level value)
error: invalid character '"' after top-level value
a
Not sure about macOS, but If you're running locally try searching for a
.pulumi
folder in your homedir. That contains all your state files and caching information as well.
g
Just found that. Is it safe to just remove everything in the
workspaces
dir inside
.pulumi
?
a
I genuinely don't know. Make a backup copy of the .pulumi dir first, at least
l
Are you always in the same project when this happens? Have you checked your Pulumi.yaml and Pulumi.<stack>.yaml?
And see if
pulumi stack export --file stack.json
works, maybe? And check that file.
a
Are you just trying things out or do you have a reasonable prod stack in place already?
g
@little-cartoon-10569 I'll check another project real quick. The YML files look fine -- haven't changed. Exporting the stack fails with the same invalid character error.
@ambitious-father-68746 Yeah - we have a dev stack in place. This happened while running integration tests / updating stuff on a personal stack though.
Hmm. the command that fail in the current project work when I switch to another one. 🤔
l
Likely the stack then, somehow... what backend are you using?
g
AWS
l
Cool, so it's easy to download the state file and view it.
a
The first thing I would do is get a hold of that statefile in AWS and run it through
jq
, just to guarantee that it's valid JSON
g
Where / how do I get the state file?
l
If the error message is accurate, then it should be easy to find. There'll be a
"
after the closing
}
In your AWS bucket (specified in Pulumi.yaml). I can't remember the exact path, but once you're in the bucket in the AWS console, it's pretty easy to find.
a
Your backend definition in Pulumi.yaml should tell you where to look
g
Ok cool 👍
a
Should be something like:
s3://<bucket_name>/<project_name>/.pulumi/stacks/<stack-name>.json
g
Yeah, I derped. We're using Pulumi as the backend. Am I able to do the same thing? I don't see a CLI command for getting that state outside of exporting the stack.
Ok - I have fixed it.
🎉 1
a
What fixed it?
g
Deleting the contents of
~/.pulumi/workspaces
seems to have cleared up the issue.
l
Sweet.
g
Assuming the stack file in there got corrupted somehow. Appreciate the help, fellas!
g
@gifted-terabyte-92288 sorry for the trouble you had, and, @ambitious-father-68746 and @little-cartoon-10569, thanks for helping to troubleshoot! I've opened https://github.com/pulumi/pulumi/issues/6287 to provide a better error message and experience in this situation.
🙌 1