Hi -- getting a very weird error trying to run any...
# general
f
Hi -- getting a very weird error trying to run any ory commands. Not sure if anyone can help:
Copy code
> ory help

The configuration contains values or keys which are invalid:
secrets: <nil>
         ^-- expected object, but got null

FATA[2025-03-03T09:54:37Z] Unable to load config.                        audience=application error=map[message:I[#/secrets] S[#/properties/secrets/type] expected object, but got null] service_name= service_version=
Copy code
> yarn ory-tunnel
yarn run v1.22.22
$ yarn ory-tunnel:dev
$ ory tunnel --port 4040 --dev --project [redacted] <http://localhost:8000>

The configuration contains values or keys which are invalid:
secrets: <nil>
         ^-- expected object, but got null

FATA[2025-03-03T10:00:40Z] Unable to load config.                        audience=application error=map[message:I[#/secrets] S[#/properties/secrets/type] expected object, but got null] service_name= service_version=
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
I'm not really even sure where to begin with this -- haven't found anything similar online
b
What version of the Ory CLI are you running?
f
In my
package.json
for the project Im trying to use it with
Copy code
"@ory/client@^1.1.41":
  version "1.15.6"
  resolved "<https://registry.yarnpkg.com/@ory/client/-/client-1.15.6.tgz#0a35eb284a3896270d768347961af7b101ea2525>"
  integrity sha512-USOrJ5FDNHMBmYAaslOix0y7YVothW3/pNSvcjbv0DYr2lvLN0olJkyhAVBQ7ikZvN763ZoZWRAYuQsykf5w/w==
  dependencies:
    axios "^1.6.1"
In my terminal
Copy code
> brew info cli
==> ory/tap/cli: stable 1.1.0
Use Ory from the your terminal!
<https://www.ory.sh>
Installed
/opt/homebrew/Cellar/cli/1.1.0 (6 files, 51.3MB) *
  Built from source on 2025-03-03 at 09:21:09
From: <https://github.com/ory/homebrew-tap/blob/HEAD/cli.rb>
License: Apache-2.0
Additional info: Im pretty sure it was all working last week at some point
BTW @tall-keyboard-87198 open to this being an issue with my local set up, however I could do with some pointers what I should be looking out for to debug my local set up here
b
@steep-lamp-91158 can you help here? Bit out of my depth and also not sure where that error is coming from.
s
This is indeed weird... can you send your
env
, specifically
ORY_CONFIG_PATH
,
CONFIG
, and
SECRETS
(obfuscated if it actually contains secrets)
f
Thanks @steep-lamp-91158 These are unset
Copy code
> echo $ORY_CONFIG_PATH

 
> echo $CONFIG
I do have $SECRETS set, but that's something custom from my .zshrc (though happy to change names if theres a clash) and finally in the .env of the project Im meant to be running there's an env var for an ory api key. Additionally I have in my env
Copy code
ORY_PROJECT_SLUG=[REDACTED]
ORY_WORKSPACE=[REDACTED]
s
ok, can you try without the secrets set, I'd expect it to work then
I'll have to check why exactly it picks that up, but I'm pretty sure that is the cause
As a workaround, you can probably use
env -u SECRETS ory help
f
Thanks all -- left a comment on that, seems to work now! https://github.com/ory/cli/issues/404#issuecomment-2697226704