Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The onCancel handler was attached after the promise settled. #111

Open
WillSquire opened this issue Jul 30, 2022 · 3 comments
Open

Comments

@WillSquire
Copy link

I get the following for new Sitemapper({ url: 'https://www.google.com/sitemap.xml' }):

Error: The `onCancel` handler was attached after the promise settled.
@seantomburke
Copy link
Owner

Hey @WillSquire will take a look here, what version are you using?

@seantomburke
Copy link
Owner

@WillSquire if you have a stacktrace this would be helpful too, and you can also add a debug flag to see more details

new Sitemapper({ url: 'https://www.google.com/sitemap.xml', debug: true });

I just ran this on the latest version and it works okay:

const Sitemapper = require("sitemapper");

const sitemap = new Sitemapper({
  url: "https://www.google.com/sitemap.xml",
  debug: true,
});

sitemap.fetch().then((results) => console.log(results.sites));

@seantomburke
Copy link
Owner

Results:

Additional sitemap found during "crawl('https://www.google.com/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/docs/sitemaps.xml')"
Urlset found during "crawl('https://www.google.com/gmail/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/sheets/sitemaps.xml')"
Urlset found during "crawl('https://www.google.com/admob/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/forms/sitemaps.xml')"
Urlset found during "crawl('https://www.google.com/slides/sitemaps.xml')"
Urlset found during "crawl('https://www.google.com/get/sitemap.xml')"
Additional sitemap found during "crawl('https://www.google.com/adsense/start/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/adwords/sitemap.xml')"
Error occurred during "crawl('https://www.google.com/webmasters/sitemap.xml')":
 Error: HTTP Error occurred: Response code 404 (Not Found)
Urlset found during "crawl('https://www.google.com/partners/about/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/search/about/sitemap.xml')"
Error occurred during "crawl('https://www.google.com/flights/sitemap.xml')":
 Error: Error occurred: Error
Urlset found during "crawl('https://www.google.com/business/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/drive/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/chromebook/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/adsense/start/sitemap-2.xml')"
Urlset found during "crawl('https://www.google.com/calendar/about/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/services/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/sitemap_search.xml')"
Urlset found during "crawl('https://www.google.com/retail/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/nonprofits/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/finance/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/photos/sitemap.xml')"
Urlset found during "crawl('https://www.google.com/adsense/start/sitemap-1.xml')"
Urlset found during "crawl('https://www.google.com/chrome/sitemap.xml')"
[
  'https://www.google.com/intl/am/gmail/about/',
  'https://www.google.com/intl/am/gmail/about/for-work/',
  'https://www.google.com/intl/am/gmail/about/policy/',
  'https://www.google.com/intl/ar/gmail/about/',
  'https://www.google.com/intl/ar/gmail/about/for-work/',
  'https://www.google.com/intl/ar/gmail/about/policy/',
  'https://www.google.com/intl/bg/gmail/about/',
  'https://www.google.com/intl/bg/gmail/about/for-work/',
  'https://www.google.com/intl/bg/gmail/about/policy/',
  'https://www.google.com/intl/bn/gmail/about/',
  'https://www.google.com/intl/bn/gmail/about/for-work/',
  'https://www.google.com/intl/bn/gmail/about/policy/',
  'https://www.google.com/intl/cs/gmail/about/',
  'https://www.google.com/intl/cs/gmail/about/for-work/',
  'https://www.google.com/intl/cs/gmail/about/policy/',
  'https://www.google.com/intl/cs/gmail/about/',
  'https://www.google.com/intl/cs/gmail/about/for-work/',
  'https://www.google.com/intl/cs/gmail/about/policy/',
  'https://www.google.com/intl/da/gmail/about/',
  'https://www.google.com/intl/da/gmail/about/for-work/',
  'https://www.google.com/intl/da/gmail/about/policy/',
  'https://www.google.com/intl/de/gmail/about/',
  'https://www.google.com/intl/de/gmail/about/for-work/',
  'https://www.google.com/intl/de/gmail/about/policy/',
  'https://www.google.com/intl/el/gmail/about/',
  'https://www.google.com/intl/el/gmail/about/for-work/',
  'https://www.google.com/intl/el/gmail/about/policy/',
  'https://www.google.com/intl/en_in/gmail/about/',
  'https://www.google.com/intl/en_in/gmail/about/for-work/',
  'https://www.google.com/intl/en_in/gmail/about/policy/',
  'https://www.google.com/intl/en_uk/gmail/about/',
  'https://www.google.com/intl/en_uk/gmail/about/for-work/',
  'https://www.google.com/intl/en_uk/gmail/about/policy/',
  'https://www.google.com/intl/es-419/gmail/about/',
  'https://www.google.com/intl/es-419/gmail/about/for-work/',
  'https://www.google.com/intl/es-419/gmail/about/policy/',
  'https://www.google.com/intl/es/gmail/about/',
  'https://www.google.com/intl/es/gmail/about/for-work/',
  'https://www.google.com/intl/es/gmail/about/policy/',
  'https://www.google.com/intl/et/gmail/about/',
  'https://www.google.com/intl/et/gmail/about/for-work/',
  'https://www.google.com/intl/et/gmail/about/policy/',
  'https://www.google.com/intl/eu_es/gmail/about/',
  'https://www.google.com/intl/eu_es/gmail/about/for-work/',
  'https://www.google.com/intl/eu_es/gmail/about/policy/',
  'https://www.google.com/intl/fa/gmail/about/',
  'https://www.google.com/intl/fa/gmail/about/for-work/',
  'https://www.google.com/intl/fa/gmail/about/policy/',
  'https://www.google.com/intl/fi/gmail/about/',
  'https://www.google.com/intl/fi/gmail/about/for-work/',
  'https://www.google.com/intl/fi/gmail/about/policy/',
  'https://www.google.com/intl/fil/gmail/about/',
  'https://www.google.com/intl/fil/gmail/about/for-work/',
  'https://www.google.com/intl/fil/gmail/about/policy/',
  'https://www.google.com/intl/fr/gmail/about/',
  'https://www.google.com/intl/fr/gmail/about/for-work/',
  'https://www.google.com/intl/fr/gmail/about/policy/',
  'https://www.google.com/intl/gl_es/gmail/about/',
  'https://www.google.com/intl/gl_es/gmail/about/for-work/',
  'https://www.google.com/intl/gl_es/gmail/about/policy/',
  'https://www.google.com/intl/gu_in/gmail/about/',
  'https://www.google.com/intl/gu_in/gmail/about/for-work/',
  'https://www.google.com/intl/gu_in/gmail/about/policy/',
  'https://www.google.com/intl/hi/gmail/about/',
  'https://www.google.com/intl/hi/gmail/about/for-work/',
  'https://www.google.com/intl/hi/gmail/about/policy/',
  'https://www.google.com/intl/hr/gmail/about/',
  'https://www.google.com/intl/hr/gmail/about/for-work/',
  'https://www.google.com/intl/hr/gmail/about/policy/',
  'https://www.google.com/intl/hu/gmail/about/',
  'https://www.google.com/intl/hu/gmail/about/for-work/',
  'https://www.google.com/intl/hu/gmail/about/policy/',
  'https://www.google.com/intl/id/gmail/about/',
  'https://www.google.com/intl/id/gmail/about/for-work/',
  'https://www.google.com/intl/id/gmail/about/policy/',
  'https://www.google.com/intl/is/gmail/about/',
  'https://www.google.com/intl/is/gmail/about/for-work/',
  'https://www.google.com/intl/is/gmail/about/policy/',
  'https://www.google.com/intl/it/gmail/about/',
  'https://www.google.com/intl/it/gmail/about/for-work/',
  'https://www.google.com/intl/it/gmail/about/policy/',
  'https://www.google.com/intl/he/gmail/about/',
  'https://www.google.com/intl/he/gmail/about/for-work/',
  'https://www.google.com/intl/he/gmail/about/policy/',
  'https://www.google.com/intl/ja/gmail/about/',
  'https://www.google.com/intl/ja/gmail/about/for-work/',
  'https://www.google.com/intl/ja/gmail/about/policy/',
  'https://www.google.com/intl/kn_in/gmail/about/',
  'https://www.google.com/intl/kn_in/gmail/about/for-work/',
  'https://www.google.com/intl/kn_in/gmail/about/policy/',
  'https://www.google.com/intl/ko/gmail/about/',
  'https://www.google.com/intl/ko/gmail/about/for-work/',
  'https://www.google.com/intl/ko/gmail/about/policy/',
  'https://www.google.com/intl/lt/gmail/about/',
  'https://www.google.com/intl/lt/gmail/about/for-work/',
  'https://www.google.com/intl/lt/gmail/about/policy/',
  'https://www.google.com/intl/lv/gmail/about/',
  'https://www.google.com/intl/lv/gmail/about/for-work/',
  'https://www.google.com/intl/lv/gmail/about/policy/',
  'https://www.google.com/intl/ml_in/gmail/about/',
  ... 46834 more items
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants