PBFs (protobuf) failing in 3rd party lib
See original GitHub issueI have Polly caching this request:
[https://tiles.planninglabs.nyc/fonts/Metropolis Regular,Noto Sans Regular/0-255.pbf](https://tiles.planninglabs.nyc/fonts/Metropolis Regular,Noto Sans Regular/0-255.pbf
)
But it seems to fail:

I’m having trouble understanding what’s being changed when being cached by Polly. Here’s my invocation for Polly:
const polly = new Polly('Simple Example', {
adapters: ['fetch', 'xhr'],
persister: 'local-storage',
logging: true,
});
const { server: pollyServer } = polly;
Creating a passthrough for it produces the same issue.
I noticed that the Proxy object includes an “undefined” body, but I’m not sure why. When I check the network tab, it appears to request the protobuf successfully:

I also can’t seem to find where in localstorage this is being kept. There’s no entry in my browser for it.
For context, I’m using EmberCLI and Mirage, which includes Pretender (so that is probably interfering, but I can’t be sure).
Thanks for any help you’re able to provide!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
I’ve created #183 in order to better track this issue. I’m gonna go ahead and close this in favor of the other. Feel free to reopen if you have any further questions.
It seems like something is interrupting setupPolly from setting
this.polly
on the test context. You would need to debug this more to figure out why this is happening.As of right now, the XHR and fetch adapters do not support binary response data. I would need some time to get that working correctly. I would instead just intercept the font call and respond with a Blob or binary string.