Extension causes query response handling to fail. Uncaught TypeError: Cannot convert object to primitive value
Intended outcome:
Open a page that runs a query that loads a list of projects.
Actual outcome:
I see the following error in the Developer Tools Console. It only occurs on the page load. Subsequent app navigation to run the same query works fine.
Uncaught TypeError: Cannot convert object to primitive value
at String (
How to reproduce the issue:
My app is unfortunately not public, and I don't know how to reproduce this. It doesn't occur on all of my pages, just certain ones. When I disable the extension, everything works fine. When I reenable it, I see the error again. It occurs on every full page reload.
It looks like this is happening to others as well as I discovered that it might be the extension from this review: https://chromewebstore.google.com/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm?pli=1
Thanks for looking into it. Let me know if I can provider further information.
Desktop (please complete the following information):
- OS: Mac
- Browser: Chrome
- Browser version 123.0.6312.107 (Official Build) (arm64)
- Extension version 4.11.2
Hey @anthonysapien 👋
Thanks for pointing this out and sorry for the issue! We added the ability for the devtools to decode error messages from the client, but there was a bug with the client messages in a couple patch versions. We will see if we can make this more gracefully degrade with those versions.
Do you mind replying with the client version you're using?
FYI I think its related to these issues in the client. The devtools just amplifies this problem:
- https://github.com/apollographql/apollo-client/issues/11639
- https://github.com/apollographql/apollo-client/issues/11482
Hi Jerel, sure. I'm using version 3.9.9 of the client. I'm going to update to the latest now and report back.
On Sat, Apr 13, 2024 at 12:39 PM, Jerel Miller @.***> wrote:
FYI I think its related to these issues in the client. The devtools just amplifies this problem:
- apollographql/apollo-client#11639 https://github.com/apollographql/apollo-client/issues/11639
- apollographql/apollo-client#11482 https://github.com/apollographql/apollo-client/issues/11482
— Reply to this email directly, view it on GitHub https://github.com/apollographql/apollo-client-devtools/issues/1328#issuecomment-2053696925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJ7OMTU3QPIE5DXDL7IMDY5FNU7AVCNFSM6AAAAABGFSIGV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGY4TMOJSGU . You are receiving this because you were mentioned.Message ID: @.***>
Updated to 3.9.11, and the issue is resolved. Thanks for your help!
On Sun, Apr 14, 2024 at 2:22 PM, Anthony Yam @.***> wrote:
Hi Jerel, sure. I'm using version 3.9.9 of the client. I'm going to update to the latest now and report back.
On Sat, Apr 13, 2024 at 12:39 PM, Jerel Miller @.***> wrote:
FYI I think its related to these issues in the client. The devtools just amplifies this problem:
- apollographql/apollo-client#11639 https://github.com/apollographql/apollo-client/issues/11639
- apollographql/apollo-client#11482 https://github.com/apollographql/apollo-client/issues/11482
— Reply to this email directly, view it on GitHub https://github.com/apollographql/apollo-client-devtools/issues/1328#issuecomment-2053696925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAJ7OMTU3QPIE5DXDL7IMDY5FNU7AVCNFSM6AAAAABGFSIGV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGY4TMOJSGU . You are receiving this because you were mentioned.Message ID: @.***>
Glad to hear it! I'll leave this open for now to see if there is anything else we can do in the devtools for the client versions that have this bug.
If this happens again, I hope that the CodeSandbox I created over in this issue can be a starting point to help debugging:
https://github.com/apollographql/apollo-client/issues/11639#issuecomment-2058663217
Load the Sandbox first:
codesandbox.io/p/sandbox/trigger-cache-warning-cltdvn
Then visit the standalone Sandbox:
Scenarios to check:
- Browser window with DevTools enabled - you should get three warnings, the first a link and the two other "spelled out"
- Browser window with DevTools disabled - you should get three warnings, the first two should be links and the last one "spelled out"