Open pzystorm opened 7 years ago
This is a shortcoming of boomerang-express as it doesn't support trie compression used in newer versions of Boomerang. You could have a look at https://github.com/nicjansma/resourcetiming-compression.js and see if you could implement it here for newer versions of boomerang.
Ah, thanks, works like a charm. npm install resourcetiming-compression and edited the file lib/boomerang/index.js: Around line 80:
this.store(beacon.type, beacon.user, beacon.collection, data, function(oid) {
if (typeof restiming !== "undefined") {
var ResourceTimingDecompression = require("resourcetiming-compression").ResourceTimingDecompression;
restiming = ResourceTimingDecompression.decompressResources(JSON.parse(restiming));
this.restiming(oid, restiming, beacon.user, beacon.collection);
}
}.bind(this));
@pzystorm If you can wrap this in a try/catch and check for older versions that do not use compression I'd be happy to take it as a contribution :)
Following error occured:
This is the corresponding code block:
If I debug this restiming variable, it is a string (not an array) with the following content:
What do I have to do?