#romerocox - Stripe CLI Trigger Events
1 messages · Page 1 of 1 (latest)
Hi Rubeus, this happens when I try to run a customized event in VS Code
When I first installed, the JSON file was being opened, so I could edita few parameters.
Now, It doesn't open the JSON file
and it throws that error after I trigger the event
Can you remove and reinstall Stripe CLI and give it another try?
Does it work from the command line?
I haven't tried
I'm not sure how to run a custom event from there, can you please give me an example?
I can run regular default events no problem
The documentation is here, but basically it would be stripe fixtures <path> [flags]: https://stripe.com/docs/cli/fixtures
Okay, so it must be something amiss in VSCode. Unfortunately I don't have much familiarity with VSCode myself, so I'm not sure how much help I can be. Let me see if anyone else is around who may be able to help you out, one moment...
I'm wondering if VSCode doesn't have permission to open the JSON file?
Can you open the JSON file as a regular file in VSCode?
I don't know where the file should be located.
I'm reinstalling VS Code
and will see if I can find the json file
that json file should come with the extension itself.
but I did tried with admin privileges before.
Lets see if reinstalling vs code will fix it
I meant with your custom fixture.
so, when you choose custom fixture, from the menu, VS Code would open a JSON file including the parameters for that specific event
that fixture was not created by me
the only one I created was the test.json one, that worked fine in cmd line
didn't work with reinstalling 😦
Right, but can you open test.json in VSCode?
Okay, but trying to trigger that custom event throws the JSON error you shared in your original message?
Nops, if I load the json, it works fine
changing to an older version to see if it fixes
no luck there
im installing into my other machine
So if you load the JSON first and then run it it works, but if you don't load the JSON first you get the error?
the expected behavior is to have the extension create and load the file.
with the pre-populated parameters
Right, I'm just making sure I understand what's happening.
yeah, its something wrong with my computer, maybe something stuck in regedit breaking the extension that does not gets deleted when reinstalling.
its working fine on my other computer
do you wanna see the video of the expected scenario?
Interesting. I'm guessing it's a permissions issue of some kind, especially since it works on that other computer as expected.
I'm also with the same thought even though I haven't changed anything at all
Strange that it would give a JSON parse error instead of a file access error though...
Do you have any VSCode extensions that could be causing the issue? Maybe try disabling them and try again?
Will try it
can you see if the default fixtures are supposed to be located in my computer?
cause I can't find them
o if this is something that comes from a cdn of some kind
I believe they're inside Stripe CLI itself and aren't accessible on purpose.
Well, I will just don't use the extension for that specific functionality then hehe
Yeah, if the command line works or opening the JSON directly works at least you have some workarounds.
Yup