ampproject / error-reporting

Contains production error tracking issues.
Apache License 2.0
2 stars 5 forks source link

🚨 Error: Unexpected token } in JSON at position 144 #80

Open ampprojectbot opened 3 years ago

ampprojectbot commented 3 years ago

Details

Error report: link First seen: Sep 13, 2019 Frequency: ~ 7,523/day

Stacktrace

Error: Unexpected token } in JSON at position 144
    at parse (src/json.js:112:42)
    at getConfig (extensions/amp-story-auto-ads/0.1/amp-story-auto-ads.js:213:51)

Notes

@rsimha modified src/json.js:112-112 in #21212 (May 16, 2019) @calebcordry modified extensions/amp-story-auto-ads/0.1/amp-story-auto-ads.js:208-216 in #24049 (Aug 22, 2019)

Seen in:

/cc @ampproject/release-on-duty

rcebulko commented 3 years ago

Appears only on https://thebridge-in.cdn.ampproject.org; seems to be a publisher configuration issue. @ampproject/wg-stories can we add error handling for StoryAdConfig#getConfig here: https://github.com/ampproject/amphtml/blob/5245f9651f20b96963d01e6f359f6512fff95d66/extensions/amp-story-auto-ads/0.1/story-ad-config.js#L62

Optionally consider using tryParseJson provided here: https://github.com/ampproject/amphtml/blob/main/src/json.js#L133

gmajoulet commented 3 years ago

@calebcordry can you look into this? Thanks!

calebcordry commented 3 years ago

Sure I think we still want to error here but I can change it to user error with better message.