Hi, i did your advice by Catching the error and retrying it after 5-10 sec. but it didn't work for me. any update on this issue?
On Friday, September 11, 2015 at 6:42:16 AM UTC+8, Josh Radcliff (AdWords API Team) wrote: > > Hi, > > Thanks for raising this -- I was able to reproduce this issue as well. > I've reported it and will let you know as soon as I have an update. > > In the meantime, one work around would be to catch the INVALID_CAMPAIGN_ID > error if it occurs, then wait 5-10 seconds and try the request again. I > realize this isn't ideal, but it will at least allow your app to gracefully > handle this problem while we're investigating. > > Thanks, > Josh, AdWords API Team > > On Thursday, September 10, 2015 at 8:40:39 AM UTC-4, John Geliberte wrote: >> >> Hi guys, im having trouble every time i i run my CustomerSync Function. >>> >>> i always got this error : >> >> AxisFault >> >> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server >> >> faultSubcode: >> >> faultString: [CustomerSyncError.INVALID_CAMPAIGN_ID @ selector] >> >> faultActor: >> >> faultNode: >> >> faultDetail: >> >> {https://adwords.google.com/api/adwords/ch/v201506}ApiExceptionFault:<message>[CustomerSyncError.INVALID_CAMPAIGN_ID >> >>> @ >>> selector]</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors >>> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xsi:type="ns2:CustomerSyncError"><fieldPath>selector</fieldPath><trigger/><errorString>CustomerSyncError.INVALID_CAMPAIGN_ID</errorString><ApiError.Type>CustomerSyncError</ApiError.Type><ns2:reason>INVALID_CAMPAIGN_ID</ns2:reason></errors> >> >> >>> [CustomerSyncError.INVALID_CAMPAIGN_ID @ selector] >> >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) >> >> at >>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) >> >> at >>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) >> >> at java.lang.reflect.Constructor.newInstance(Constructor.java:422) >> >> at java.lang.Class.newInstance(Class.java:442) >> >> >> My customer sync is in a loop for every 15 sec it will check if there is >> a new campaign added. >> While my system is running and then i added a new campaign it will sent >> me back that error. >> >> This is my code regarding this issue: >> >> public static void getStatus(AdWordsServices adWordsServices, >> AdWordsSession session) >> throws Exception { >> // Get the CampaignService. >> CampaignServiceInterface campaignService = >> adWordsServices.get(session, CampaignServiceInterface.class); >> >> // Get the CustomerSyncService. >> CustomerSyncServiceInterface customerSyncService = >> adWordsServices.get(session, CustomerSyncServiceInterface.class); >> >> //ResultSyncEntity parentChecker = new ResultSyncEntity(); >> >> >> // Get a list of all campaign IDs. >> List<Long> campaignIds = new ArrayList<Long>(); >> Selector selector = new SelectorBuilder() >> .fields(CampaignField.Id) >> .build(); >> CampaignPage campaigns = campaignService.get(selector); >> if (campaigns.getEntries() != null) { >> for (Campaign campaign : campaigns.getEntries()) { >> campaignIds.add(campaign.getId()); >> } >> } >> >> // Create date time range for the past 24 hours. >> DateTimeRange dateTimeRange = new DateTimeRange(); >> dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd HHmmss").format(new >> Date(System >> .currentTimeMillis() - 1000L * 60 * 60 * 24))); >> dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd HHmmss").format(new >> Date())); >> >> // Create selector. >> CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector(); >> customerSyncSelector.setDateTimeRange(dateTimeRange); >> customerSyncSelector >> .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] >> {}))); >> >> // Get all account changes for campaign. >> CustomerChangeData accountChanges = >> customerSyncService.get(customerSyncSelector); >> >> // Display changes. >> if (accountChanges != null && accountChanges.getChangedCampaigns() != >> null) { >> System.out.println("Most recent change: " >> + accountChanges.getLastChangeTimestamp() + "\n"); >> >> >> ResultSyncEntity.setCheckLastDateChecked(accountChanges.getLastChangeTimestamp()); >> >> for (CampaignChangeData campaignChanges : >> accountChanges.getChangedCampaigns()) { >> System.out.println("Campaign with id \"" + campaignChanges.getCampaignId() >> + "\" was changed: "); >> System.out.println("\tCampaign changed status: " >> + campaignChanges.getCampaignChangeStatus()); >> StatusChecker = campaignChanges.getCampaignChangeStatus().toString(); >> if (StatusChecker == "NEW") >> { >> ChildCampaignId = campaignChanges.getCampaignId(); >> fetchCampaigns(adWordsServices, session); >> >> }else >> { >> >> } >> >> >> } >> } else { >> System.out.println("No account changes were found."); >> } >> } >> >> Hope you guys can help me determine what cause and what is the fix for >> this issue thanks. >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/0209c60a-8273-4a15-801c-269563602575%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.