TypeError: Cannot set property "childMap" of undefined to "[object Object]". (file Code.gs, line 389)

77 views
Skip to first unread message

Žygimantas Balsys

unread,
Nov 8, 2019, 8:02:55 AM11/8/19
to Google Ads Scripts Forum
Hi,

I believe I am trying to get help from the google ads script team :)

Anyway I am using the Google Shopping bulk ad group creator script. 

The problem is that it works for me. However I have a spreadsheet ready for creation of like 100+ ad groups. But when I run the script it randomly get an error after creating 5, 7, 15 or any random number of ad groups.
Then I delete the last ad group created (with an error) and run the script again. It continues to create ad groups but again stops at a random entry with an error.

TypeError: Cannot set property "childMap" of undefined to "[object Object]". (file Code.gs, line 389)

I'd be happy to give you access to the spreadsheet as well the CID.

Thank you for the help

Google Ads Scripts Forum Advisor

unread,
Nov 8, 2019, 3:32:59 PM11/8/19
to adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.com, adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.co, adwords...@googlegroups.com
Hi Zygimantas,

Can you please provide the CID, script name and spreadsheet so I can investigate directly in your account?

Thanks,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5001UMWglH:ref

Žygimantas Balsys

unread,
Nov 19, 2019, 4:04:43 AM11/19/19
to Google Ads Scripts Forum
Hi Matt,

I wonder if you've received my message with the information requested?  Since it has been a while I did not hear anything back from you.

Thank you

Google Ads Scripts Forum Advisor

unread,
Nov 19, 2019, 2:42:09 PM11/19/19
to adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.com, adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.co, adwords...@googlegroups.com
Hi Zygimantas,

Thanks for your patience on this -- our team is looking into the issue. When I hear back, I will provide you with an update as soon as possible.

Regards,
Matt Yashinsky
Message has been deleted

Žygimantas Balsys

unread,
Jan 13, 2020, 9:55:56 AM1/13/20
to Google Ads Scripts Forum
Hi,

Maybe there is an update on this? I am trying to run the script in the other account and the same happens. One ad group is created but the second one returns an error. Then I delete that ad group with error and run the script again. Then that ad group which had an error is created successfully but the next ad group returns an error. And so on and so on.

Please help.

Google Ads Scripts Forum Advisor

unread,
Jan 13, 2020, 3:26:35 PM1/13/20
to adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.com, adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.co, adwords...@googlegroups.com
Hi All,

Can you try making the following substitution for the createAdGroup function?

function createAdGroup(name, status, defaultBid, campaign) {
  // See if ad group exists. If so, fetch it.
  var adGroup = findAdGroupByName(name, campaign);
  if (adGroup != null) {
    if (adGroup.rootProductGroup()) {
      // If root product group exists and not delete, then skip ad group.
      adGroup.skip = true;
    } else {
      var rootProductGroupOp = adGroup.createRootProductGroup();     // Changed line
      if (!rootProductGroupOp.isSuccessful()) {                      // Inserted line 1
        resultsByRow[0] = 'ERROR';                                   // Inserted line 2
        resultsByRow[1] = 'Error creating root product group: ' +    // Inserted line 3
            rootProductGroupOp.getErrors();                          // Inserted line 4
        return null;                                                 // Inserted line 5
      }                                                              // Inserted line 6
    }
    return adGroup;
  }

Regards,
Matt 

Žygimantas Balsys

unread,
Jan 30, 2020, 8:09:08 AM1/30/20
to Google Ads Scripts Forum
Hi there,

Probably this is my last cry for help :) 

Since I need to run the script 30 times in order for all my 200+ ad groups to be created this is super inconvenient. As I've said when the script runs it creates randomly 3-5 ad groups correct and then the last one gives an error. Then I delete that last ad group and run the script again. Then again 3-5 ad groups are created including the one that has not been created during the previous run. 

I am not sure whether there is a problem in the script. Or in the source worksheet. Either way I'd appreciate the help a lot.  

Google Ads Scripts Forum Advisor

unread,
Jan 30, 2020, 1:32:53 PM1/30/20
to adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.com, adwords-scripts+apn2wqdwsc6xigbm...@googlegroups.co, adwords...@googlegroups.com
Hi Zygimantas,

I'm replying privately on our old thread regarding this issue. The reply contains private information, hence the private email.


Regards,
Matt 
Google Ads Scripts Team

ref:_00D1U1174p._5001UUzq9P:ref

Žygimantas Balsys

unread,
Dec 1, 2020, 2:54:43 AM12/1/20
to Google Ads Scripts Forum
Hello,

I am still coming back to this thread hoping that maybe there would be a solution. But probably I should let it go already? :) 

Google Ads Scripts Forum Advisor

unread,
Dec 1, 2020, 4:25:42 AM12/1/20
to adwords...@googlegroups.com
Hi there,

I work along with Matt. Let me do the best I can to assist you in this.

For us to assist you further, could you please provide the following details via Reply privately to author option?
  • CID
  • Script Name
  • Shareable link of the spreadsheet being used in the script (if any)
  • Summary details of the issue
In case, you encounter an error when using the mentioned option, you can send the requested information on this email (googleadsscr...@google.com) instead, then let us know here once it has been sent.

Regards,
Google Logo
Teejay Wennie Pimentel
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q28m6cu:ref

Žygimantas Balsys

unread,
Dec 1, 2020, 5:44:47 AM12/1/20
to Google Ads Scripts Forum
Thank you.

Since the option 'reply privately' is not active for me I've sent the email to the email address you've provided.

Google Ads Scripts Forum Advisor

unread,
Dec 1, 2020, 11:18:29 PM12/1/20
to adwords...@googlegroups.com
Hi Zygis,

Thank you for sending the requested information to the given email address. As per checking, this has been raised to the rest of team, and I'm afraid that this is still under investigation. Rest assured that the team is actively working on this. I'll let you know the soonest we have our findings.
Message has been deleted

Žygimantas Balsys

unread,
Dec 4, 2020, 6:02:36 AM12/4/20
to Google Ads Scripts Forum

Hi Teejay,

 

Thank you very much for the update. I am trying to create ad groups in another account and there is the same issue. It stops randomly with an ad group and after I delete it and continue it is created successful. Until another stop.. Is it really a big ask for you to find a problem? I am a bit desperate and unfortunately my programming skills are way too little to solve this myself.

 

Eventually I hope the problem is not in my spreadsheet which I've created. Since when I am using this script to create ad groups from another sheets within the same spreadsheet everything goes well without any problems.

Google Ads Scripts Forum Advisor

unread,
Dec 7, 2020, 12:09:04 AM12/7/20
to adwords...@googlegroups.com
Hi there,

Thank you for sharing your thoughts. I've checked you spreadsheet as well, and can confirm that there is not issue in it. I'll let you know the soonest the team provided their feedback on their investigation.

Google Ads Scripts Forum Advisor

unread,
Mar 31, 2022, 7:16:55 AM3/31/22
to adwords...@googlegroups.com
Hello,

I just want to circle back on this. Could you confirm if you were still encounter the reported behavior here?

Regards,
Google Logo
Teejay Wennie
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q28m6cu:ref
Reply all
Reply to author
Forward
0 new messages