forcedotcom / ApexUnit

ApexUnit is a powerful continuous integration tool for the Force.com platform
BSD 3-Clause "New" or "Revised" License
71 stars 51 forks source link

Destination URL not reset. The URL returned from login must be set #65

Open dieffrei opened 7 years ago

dieffrei commented 7 years ago

com.sforce.cd.apexUnit.ApexUnitRunner.main()] INFO com.sforce.cd.apexUnit.client.utils.ApexClassFetcherUtils - Using regex(es): ZT to fetch apex classes [com.sforce.cd.apexUnit.ApexUnitRunner.main()] INFO com.sforce.cd.apexUnit.client.utils.ApexClassFetcherUtils - Using regex: "ZT" to fetch apex classes [com.sforce.cd.apexUnit.ApexUnitRunner.main()] INFO com.sforce.cd.apexUnit.client.testEngine.TestExecutor - ***** debuging[Ljava.lang.String;@4b4172b8 [com.sforce.cd.apexUnit.ApexUnitRunner.main()] INFO com.sforce.cd.apexUnit.client.connection.ConnectionHandler - Bulk connection established. [com.sforce.cd.apexUnit.ApexUnitRunner.main()] ERROR com.sforce.cd.apexUnit.ApexUnitUtils - Caught AsyncApiException exception while trying to deal with bulk connection: InvalidUrl : Destination URL not reset. The URL returned from login must be set [com.sforce.cd.apexUnit.ApexUnitRunner.main()] INFO com.sforce.cd.apexUnit.ApexUnitUtils - Shutting down ApexUnit java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1329) at com.sforce.cd.apexUnit.ApexUnitUtils.shutDownWithErrMsg(ApexUnitUtils.java:48) at com.sforce.cd.apexUnit.ApexUnitUtils.shutDownWithDebugLog(ApexUnitUtils.java:33) at com.sforce.cd.apexUnit.client.testEngine.AsyncBulkApiHandler.handleBulkApiFlow(AsyncBulkApiHandler.java:92) at com.sforce.cd.apexUnit.client.testEngine.TestExecutor.testExecutionFlow(TestExecutor.java:81) at com.sforce.cd.apexUnit.ApexUnitRunner.main(ApexUnitRunner.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745)

vamshi-sfdc commented 6 years ago

@adarsh-ramakrishna-sfdc this seems like an error related to missing mandatory field by the end user. Can you please confirm?

adarsh-ramakrishna-sfdc commented 6 years ago

Looks like Connected App setup issue and not an issue with argument provided by the user.

@dieffrei Does this command curl -v <Salesforce_Org_URL>/services/oauth2/token -d "grant_type=password" -d "client_id=*CLIENT_ID_GOES_HERE*" -d "client_secret= *CLIENT_SECRET_GOES_HERE*" -d "username=*yourusername@yourdomain.com*" -d "password= *your_password_goes_here+* return you access_token ? This ensures connected App is setup correctly.

damiendurant commented 6 years ago

I got the same issue, and the curl command return me an access token : {"access_token":"XXXXXXXXXX.","instance_url":"https://XXXXXXXX.my.salesforce.com","id":"https://test.salesforce.com/id/00D6E00000099OAUAY/005b0000001rRONAA2","token_type":"Bearer","issued_at":"1532439892141","signature":"XXXXXXXXXXXX"}

EDIT : It works if I use the my.slaesforce.com URL returned by the curl command, and not default .salesforce.com URL.