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

"Cannot read property 'hasTypekitJS' of undefined" when running just with -f #9

Closed
DanielRuf opened this issue Jun 1, 2018 · 5 comments

Comments

@DanielRuf
Copy link
Contributor

DanielRuf commented Jun 1, 2018

Describe the bug

--fonts does not initialize the JSParser as it needs it
To Reproduce
Steps to reproduce the behavior:

$ node index.js scan example.com -f
fonts
[21:04:54] Checking the URL ...
[21:04:54] Loading HTML file
[21:04:54] Setup additional content
[21:04:54] Loading CSS files

GENERAL INFORMATION

Title:              Example Domain
Description:
URL:                http://example.com/
Software:           Unknown
Cannot read property 'hasTypekitJS' of undefined

Expected behavior

fonts should be detected
Screenshots

Desktop:

  • OS: [e.g. iOS]
  • Node Version [e.g. 8.11.2 LTS] 10
  • Version [e.g. 0.3.2] 0.3.4

Additional context

@DanielRuf
Copy link
Contributor Author

Overall: the code is unnecessary complicated and hard to understand.

@mirkoschubert
Copy link
Owner

@DanielRuf I can't reproduce this »bug« 😏

› gdpr scan -f example.com                                                                                          gdpr-cli · dev ! 14h25m

[09:05:47] Checking the URL ...
[09:05:47] Loading HTML file
[09:05:47] Setup additional content
[09:05:47] Loading CSS files

GENERAL INFORMATION

Title:              Example Domain
Description:
URL:                http://example.com/
Software:           Unknown

FONTS IMPLEMENTATION

There were no Fonts found.

Same versions - on macOS. (And yes, with your node index.js example.com -f it's the same...)

Are you sure, you're referring to version 0.3.4? Because with this version the entire fonts section doesn't rely on the JSParser and CSSParser anymore and uses it's own FontsParser instead.

I found that the css parser I used doesn't work anymore when in a CSS file on the website someone made a mistake (e.g. an } too much). And since most of the features don't need a full blown CSS parser (and the handling is much more complicated than now), I wrote my own little parser for the fonts instead.

@DanielRuf
Copy link
Contributor Author

Well, I guess I had 0.3.3 so I think you are right (I thought I upgraded and installed a fresh version as I forked and cloned it directly with the latest changes, will try to rebase and sync with upstream and check again).

Anyway. If there is an issue in between the next commands are aborted as they are not async in most cases (dependent).

@DanielRuf
Copy link
Contributor Author

Ok, synced the remotes locally.

Current findings:

gdpr/ node index scan
[22:57:42] Checking the URL ...
C:\Users\Daniel\GITHUB\gdpr-cli\lib\tasks.js:581
    url = url.replace(/(https?:)?\/\//, ''); // delete the protocol
              ^

TypeError: Cannot read property 'replace' of undefined

missing check for input(s)

Missing warning when v and m are set.

@mirkoschubert
Copy link
Owner

@DanielRuf Sorry, I didn't see your proposal - I already fixed it @dev.

This issue was closed.
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