Giter Site home page Giter Site logo

Comments (4)

amphro avatar amphro commented on July 26, 2024 6

Usually you get that if you are using a custom connected app with an invalid callback URL. I'm assuming you are also using a custom connected app in the sfdxurl:store as well?

More specifically, the callback url on the connected app should be http://localhost:1717/OauthRedirect

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_connected_app.htm

from sfdx-travisci.

Lee-Xiao-Long avatar Lee-Xiao-Long commented on July 26, 2024 3

To save anyone some potential hair-pulling, the OAuth callback URL for your custom connected app is case-sensitive, at least for the purposes of the force:org:create command :-|

So even though you will be able to authenticate through a custom connected app with a callback URL such as http://localhost:1717/OAuthRedirect-- using both force:auth:web:login and force:auth:jwt:grant -- you will get that invalid Callback URL error when next trying to spin up a scratch org.

http://localhost:1717/OauthRedirect it must be. That little a was a big pain in the A.

from sfdx-travisci.

jpmonette avatar jpmonette commented on July 26, 2024 1

Out of curiousity, I decided to try as well with the JWT token and this is what I get after a successful login in Travis CI.

capture d ecran 2017-07-07 a 13 04 04

Not too sure where I am suppose to set up a callback URL. Any clue?


And here is my .travis.yml file:

sudo: true
dist: trusty 
cache: false

before_install:
- openssl aes-256-cbc -K $encrypted_55cd0711f34c_key -iv $encrypted_55cd0711f34c_iv -in config/server.key.enc -out config/server.key -d
- wget -qO- https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
  | tar -xvJf - 
- ./sfdx/install
- export SFDX_AUTOUPDATE_DISABLE=true
- export SFDX_USE_GENERIC_UNIX_KEYCHAIN=true
- export SFDX_DOMAIN_RETRY=300
- export PATH=./sfdx/$(pwd):$PATH
- sfdx force:auth:jwt:grant --clientid $CLIENT_ID --jwtkeyfile config/server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg  || travis_terminate 1

script:
- sfdx force:org:create -v HubOrg -s -f scratchdef.json -a Qci || travis_terminate 1
- sfdx force:source:push -u Qci
- sfdx force:apex:test:run -u Qci -c -r human
- sfdx force:org:delete -u Qci -p

from sfdx-travisci.

jpmonette avatar jpmonette commented on July 26, 2024

@amphro Was successful with this. Thanks so much!

from sfdx-travisci.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.