Skip to content
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

TypeError: Cannot read properties of undefined (reading 'apply') #574

Open
djmartyhouse opened this issue Jul 4, 2023 · 2 comments
Open

Comments

@djmartyhouse
Copy link

djmartyhouse commented Jul 4, 2023

curl https://api.dropbox.com/oauth2/token \
    -d code=<AUTHORIZATION_CODE> \
    -d grant_type=authorization_code \
    -d redirect_uri=<REDIRECT_URI> \
    -d client_id=<APP_KEY> \
    -d client_secret=<APP_SECRET>
@verhovsky verhovsky changed the title Carll TEst TypeError: Cannot read properties of undefined (reading 'apply') Jul 4, 2023
@dream2333
Copy link

same problem

@verhovsky
Copy link
Member

verhovsky commented Jul 28, 2023

This bug happens when your bash syntax is invalid or uses some syntax the parser doesn't support, in this case it's these lines

    -d code=<AUTHORIZATION_CODE> \
    -d redirect_uri=<REDIRECT_URI> \
    -d client_id=<APP_KEY> \
    -d client_secret=<APP_SECRET>

In Bash < and > are special syntax so these commands aren't valid code and it fails to parse. Replace them with the actual codes/URI/keys/secret or just delete the surrounding <> and it'll work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants