question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PBFs (protobuf) failing in 3rd party lib

See original GitHub issue

I 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:

screen shot 2018-11-28 at 3 16 44 pm

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:

screen shot 2018-11-28 at 3 21 01 pm

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:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
offirgolancommented, Feb 18, 2019

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.

0reactions
offirgolancommented, Dec 4, 2018

it seems like polly is not available on this: Cannot read property ‘server’ of undefined.

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.

I am still stuck with my 3rd party lib (mapbox-gl) unhappy with the Polly-intercepted (& recorded) XHR requests:

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overview | Protocol Buffers - Google Developers
Protocol buffers provide a language-neutral, platform-neutral, extensible mechanism for serializing structured data in a forward-compatible ...
Read more >
tensorflow protobuf conflict when compiling with third party ...
I built my own tensorflow c++ library(with protobuf 3.4). When compiling with the network framework, there is a big problem.
Read more >
AUR (en) - opencv-git - Arch Linux
6 out of 6 hunks FAILED -- saving rejects to file ... [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/ ...
Read more >
Common protos - ScalaPB
... compiled ScalaPB classes for common third-party protobuf libraries. ... to "import" the third-party protos (without this, protoc would fail with an ...
Read more >
prost_build - Rust - Docs.rs
And finally, in lib.rs , include the generated code: ... If you are using protobuf files from third parties, where the author of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found