Skip to content

Locations sometimes fail to save #5

@kitschpatrol

Description

@kitschpatrol

Huge thanks for this utility.

I noticed one intermittent issue in a large migration (500+ locations) where some locations were not actually saved to the target list despite the utility reporting them as ✔ Saved.

It looks like we need to wait for Google to report that the location was successfully saved to the target list before loading the page for the next location in order to get 100% reliability.

You can patch over this by adding window.delay(500); after the listCheckbox.click();, or perhaps a sounder and speedier strategy is to wait for the pop-up confirmation.

I accomplished the latter by moving a bunch of the logic out of the call to page.evaluate, and instead used puppeteer's waitForSelector method to wait until the save confirmation pop-up is displayed:

e.g.

await page.click(`[data-index="${listIndex}"]`);
await page.waitForSelector(
  "div[jsaction='mouseover:snackbar.hover;mouseout:snackbar.hover']",
  {
    visible: true,
  }
);

My fork is a mess because of some one-off functionality, but can clean up and send a PR when time permits — and regardless I wanted to open this in case it helps anyone else troubleshoot.

Thanks again for sharing your efforts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions