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 on amphtml-validator #9164

Closed
rbenvenuto opened this issue Oct 22, 2019 · 9 comments
Closed

Error on amphtml-validator #9164

rbenvenuto opened this issue Oct 22, 2019 · 9 comments

Comments

@rbenvenuto
Copy link

rbenvenuto commented Oct 22, 2019

Bug report

Describe the bug

Serving an amp-enabled page returns the following error:

TypeError: this.sandbox.amp.validator.categorizeError is not a function

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Make an amp enabled page
  2. Access the created page from browser
  3. See error

bug image

Expected behavior

Expected to see working page

System information

  • OS: macOS Mojave
  • Browser: Chrome 77.0
  • Version of Next.js: 9.1.1

Additional context

There is a release of amphtml-validator that apparently fix the problem, maybe the solution is to update the amphtml-validator version in package.json

Related issue on amphtml repo

@ijjk
Copy link
Member

ijjk commented Oct 22, 2019

This is an upstream issue see ampproject/amphtml#25188 for more info

@rbenvenuto
Copy link
Author

Yes, i forgot to mention the issue.
Correct me if i'm wrong, but i see this issue could be solved on Next's side by updating the amphtml-validator package, right?

@Timer
Copy link
Member

Timer commented Oct 22, 2019

No, this bug affects all versions of amphtml-validator.

@rbenvenuto
Copy link
Author

rbenvenuto commented Oct 22, 2019

No, this bug affects all versions of amphtml-validator.

All stable releases, you mean?
This pre-release fixes the bug

@rbenvenuto
Copy link
Author

rbenvenuto commented Oct 22, 2019

I've been able to fix the bug locally by just removing this snippet on line 279:

node_modules/amphtml-validator/index.js

error.category = this.sandbox.amp.validator.categorizeError(internalError);

Which is what that pre-release does

@dmouse
Copy link

dmouse commented Oct 22, 2019

A new version of amphtml-validator was launched 1.0.27 but this version now needs node:12

@dmouse
Copy link

dmouse commented Oct 22, 2019

Update:
Support for "^10.0.0 || ^12.0.0 || ^14.0.0" is pending

https://github.com/ampproject/amphtml/pull/25208/files

@ijjk
Copy link
Member

ijjk commented Oct 23, 2019

This has been resolved upstream

@ijjk ijjk closed this as completed Oct 23, 2019
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants