Closed galczo5 closed 2 years ago
Hi @galczo5, may we ask where you found the amplitude snippet? We'll take a look and resolve any issues!
Yeah, sure.
I found it in page after url like: https://analytics.amplitude.com/
It looks like this:
It has worked for me on Friday, right now it's throwing that error.
Btw. I see that in the docs, there is different SHA https://developers.amplitude.com/docs/javascript
;r.integrity="sha384-MBHPie4YFudCVszzJY9HtVPk9Gw6aDksZxfvfxib8foDhGnE9A0OriRHh3kbhG3q"
Which one is the right one?
Hmm that's odd. Both seem incorrect for the latest version. We'll have to investigate further why the Amplitude dashboard is providing a different hash value. The hash value from https://developers.amplitude.com/docs/javascript is for v8.16.1. In the meantime, this file has the correct hash value: https://github.com/amplitude/Amplitude-JavaScript/blob/main/src/amplitude-snippet.js. Let me know if this works!
@galczo5, Thanks again for flagging this. The fix to Amplitude dashboard is in progress.
The fix to Amplitude dashboard is now in prod environment. Closing.
It's working now, thanks!
Expected Behavior
Correct SHA provided in the docs.
Current Behavior
Error in console after adding script to page: Failed to find a valid digest in the 'integrity' attribute for resource 'https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js' with computed SHA-384 integrity '+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+'. The resource has been blocked.
Possible Solution
SHA-384 provided by Amplitude is correct.
Steps to Reproduce
Add script to any html file.
Environment