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

ERR_INVALID_URL with --spider flag #13

Open
nachtfunke opened this issue Apr 22, 2022 · 3 comments
Open

ERR_INVALID_URL with --spider flag #13

nachtfunke opened this issue Apr 22, 2022 · 3 comments

Comments

@nachtfunke
Copy link

Hello!

I am running into a weird problem - as soon as I use the --spider flag, I am getting errors:

GlyphHanger Fetch Error:  TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:371:5)
    at onParseError (node:internal/url:552:9)
    at new URL (node:internal/url:628:5)
    at normalizeUrl (/Users/user/.nvm/versions/node/v17.3.0/lib/node_modules/glyphhanger/node_modules/normalize-url/index.js:98:17)
    at SpiderPig.cleanupHref (/Users/user/.nvm/versions/node/v17.3.0/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:22:10)
    at SpiderPig.fetchLocalUrls (/Users/user/.nvm/versions/node/v17.3.0/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:118:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async MultipleSpiderPig.fetchUrls (/Users/user/.nvm/versions/node/v17.3.0/lib/node_modules/glyphhanger/src/MultipleUrlSpiderPig.js:50:17)
    at async /Users/user/.nvm/versions/node/v17.3.0/lib/node_modules/glyphhanger/cmd.js:88:5 {
  input: 'http:javascript:void(0);',
  code: 'ERR_INVALID_URL'
}

I thought it might have to do something with node 17, so I used nvm to switch to node 16, but the error persistent. I am not sure how to proceed here.

@zuzanasumlanska
Copy link

zuzanasumlanska commented Nov 18, 2022

Hello, I have similar problem. The HTML page with telephone number will drop the error:

GlyphHanger Fetch Error:  TypeError [ERR_INVALID_URL]: Invalid URL: http:tel:+420731159973
    at onParseError (internal/url.js:258:9)
    at new URL (internal/url.js:334:5)
    at normalizeUrl (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/normalize-url/index.js:98:17)
    at SpiderPig.cleanupHref (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:22:10)
    at SpiderPig.fetchLocalUrls (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:118:16)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async MultipleSpiderPig.fetchUrls (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/src/MultipleUrlSpiderPig.js:50:17)
    at async /Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/cmd.js:88:5 {
  input: 'http:tel:+420731159973',
  code: 'ERR_INVALID_URL'
}

Most likely the spider doesn't know how to handle links with telephone number or javascript in it.

@ali-baykal
Copy link

Hello, I have similar problem. The HTML page with telephone number will drop the error:

GlyphHanger Fetch Error:  TypeError [ERR_INVALID_URL]: Invalid URL: http:tel:+420731159973
    at onParseError (internal/url.js:258:9)
    at new URL (internal/url.js:334:5)
    at normalizeUrl (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/normalize-url/index.js:98:17)
    at SpiderPig.cleanupHref (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:22:10)
    at SpiderPig.fetchLocalUrls (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/node_modules/@zachleat/spider-pig/SpiderPig.js:118:16)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async MultipleSpiderPig.fetchUrls (/Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/src/MultipleUrlSpiderPig.js:50:17)
    at async /Users/zuzanasumlanska/.nvm/versions/node/v12.22.12/lib/node_modules/glyphhanger/cmd.js:88:5 {
  input: 'http:tel:+420731159973',
  code: 'ERR_INVALID_URL'
}

Most likely the spider doesn't know how to handle links with telephone number or javascript in it.

I can confirm, that telephone links in the page cause glyphhanger to crash. I was about to open an issue for that.

@ShahriarKh
Copy link

ShahriarKh commented Oct 17, 2023

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

4 participants