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: null is not an object (evaluating 'a.split') #27614

Closed
rcebulko opened this issue Apr 7, 2020 · 2 comments
Closed

Error: null is not an object (evaluating 'a.split') #27614

rcebulko opened this issue Apr 7, 2020 · 2 comments
Assignees
Labels
Type: Bug Type: Error Report An error reported by AMP Error Reporting WG: monetization

Comments

@rcebulko
Copy link
Contributor

rcebulko commented Apr 7, 2020

This error first surfaced last summer, and has reached the first page of errors in AMP Error Reporting

Error: null is not an object (evaluating 'a.split')
    at split (https://raw.githubusercontent.com/ampproject/amphtml/2004030010070/src/url.js:198)
    at url (https://raw.githubusercontent.com/ampproject/amphtml/2004030010070/src/url.js:222)
    at (https://raw.githubusercontent.com/ampproject/amphtml/2004030010070/extensions/amp-ad-custom/0.1/amp-ad-custom.js:73)
    at (https://raw.githubusercontent.com/ampproject/amphtml/2004030010070/extensions/amp-a4a/0.1/amp-ad-network-base.js:155)

The error occurs when trying to .split a URL string. The source of the URL is a call to AmpAdNetworkBase#getRequestUrl, which gets the URL from its element's src attribute. Below this access, there is a devAssert with the message Invalid network configuration: no request URL specified. When that happens in production, however, there is no handling of a missing request URL.

I suspect the component fails to display anything in this failure case. If I understand correctly and this is a misconfiguration on the part of the publisher, maybe this should be caught and logged as a user error?

/cc @ampproject/wg-ads

@rcebulko rcebulko added Type: Bug Type: Error Report An error reported by AMP Error Reporting labels Apr 7, 2020
@powerivq powerivq self-assigned this Apr 7, 2020
@powerivq
Copy link
Contributor

powerivq commented Apr 7, 2020

Look like src is not required in the validator. We are making changes on the validator to outlaw it.

@rcebulko
Copy link
Contributor Author

Closing this because of #27624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Type: Error Report An error reported by AMP Error Reporting WG: monetization
Projects
None yet
Development

No branches or pull requests

2 participants