-
Notifications
You must be signed in to change notification settings - Fork 136
ant deployment failure #48
Comments
I forgot to say, I have this code working in other dev orgs and tests run fine, this is when I try to deploy to a new dev org, is there something I need to update/change with new Salesforce releases? |
https://help.salesforce.com/apex/HTViewSolution?id=000213516&language=en_US If you have accepted the critical update on those orgs for "Predictable Iteration Order for Apex Unordered Collections", then the test classes will fail because the order no longer matches what is returned. In these cases I would re-order the parameters in the MAP in most of the cases, until we can patch the code. This is re-ordered to match the URL.
|
Thanks for your response it helped us alot, we followed your steps and the errors are gone |
I need to add that we had to add a validation for the orgs that hasn't accepted the update yet in order to work in both scenarios.
|
Please reopen this and change if(ordMap.get(key) == 'b' && firstKey)isOrdered = true; to if(ordMap.get(key) == 'b' && firstKey){ isOrdered = true; } This is the error that created a major security hole in OSX, and best-practice is to use curly brackets for every if statement, even on one line. |
I'd be happy to review a pull request for that :) |
re-opened issue and updated the comment and our code, thanks for the heads up |
I have sent the request |
Thank you. Apologies for asking someone else to make the change (faux pas, I know) but I wasn't at a machine that would let me do it myself. Go team! |
no prob, I just haven't had enough time to figure out how to remove whitespacing and indentation :P |
Hi, I'm new to this twilio stuff but when I'm trying to deploy I'm getting the same errors in the salesforce production and also we have the update our org with critical updates. Can you pls let me know on which class I have to update these Lines: map<string,string> params=new map<string,string>(); |
Hi, You need to modify both files: Twilio_TestApplication and Twilio_TestPhoneNumbers |
Is it possible if we can get an updated managed package with this bug fix? |
We currently aren't releasing managed packages for salesforce. |
Sorry, I meant unmanaged package. Is v4.0.0 with this bug fix? |
The latest version has many updates in it, including support for some of our new APIs, and re-ordering the test data expected to the Salesforce Unordered Lists patch which is auto activated on 6/5 by salesforce. However, it also has some restructuring of classes so if you have already installed and are leveraging an older version I would advise you to update the test class yourself versus using v4.0. |
To Fix the issue quickly:
|
@saamabbas very clear on the directions listed above, wanted to comment that this fix worked perfectly. |
Hi, I'm getting the following errors when I try to deploy to a dev org using ANT:
All Test Failures:
Script-thrown exception
Stack trace: Class.TwilioRestClient: line 591, column 1
Class.TwilioResource: line 82, column 1
Class.TwilioResource.ListResource: line 463, column 1
Class.TwilioApplicationList: line 80, column 1
Class.Twilio_TestApplication.testTwilioAplications_filter: line 139, column
1
ilioRestException: Script-thrown exception
Stack trace: Class.TwilioRestClient: line 591, column 1
Class.TwilioResource: line 82, column 1
Class.TwilioResource.ListResource: line 463, column 1
Class.TwilioAvailablePhoneNumberList: line 106, column 1
Class.Twilio_TestPhoneNumbers.testTwilioAvailablePhoneNumbers_AreaCodeFilter
: line 274, column 1
n Failed: Expected: cat=dog&foo=bar, Actual: foo=bar&cat=dog
Stack trace: Class.TwilioCapability.testGenerateParamString: line 273, colum
n 1
I have traced the error by running just the Twilio_TestPhoneNumbers.testTwilioAvailablePhoneNumbers_AreaCodeFilter method. What I found is the following message:
"Did not find Resource for GET https://api.twilio.com/2010-04-01/Accounts/ACba8bc05eacf94afdae398e642c9cc32d/AvailablePhoneNumbers/US/Local.json"
And that's because the uri passed to the Twilio_TestHTTPMock Reponse is not contained in the resourceMap.keySet();
Params:
(uri:)HTTPS://API.TWILIO.COM/2010-04-01/ACCOUNTS/ACBA8BC05EACF94AFDAE398E642C9CC32D/AVAILABLEPHONENUMBERS/US/LOCAL.JSON
(resourceMap().keySet()) Keys :{HTTPS://API.TWILIO.COM/2010-04-01/ACCOUNTS/ACBA8BC05EACF94AFDAE398E642C9CC32D/AVAILABLEPHONENUMBERS/US/LOCAL.JSON?AREACODE=510&CONTAINS=51034*****
Need help!
The text was updated successfully, but these errors were encountered: