Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad string formatting when constructing error - "Cannot convert object to primitive value" #11640

Closed
andreimatei opened this issue Mar 4, 2024 · 3 comments

Comments

@andreimatei
Copy link

Issue Description

I think there's a bug on some code path that's trying to construct an error. Looks similar too what was fixed in #11516, but I'm running 3.9.5 which should have that fix.
I see:

index.ts:97 Uncaught (in promise) ApolloError: Cannot convert object to primitive value
    at new ApolloError2 (index.ts:97:5)
    at Object.error (QueryManager.ts:353:48)
    at notifySubscription (module.js:137:18)
    at onNotify (module.js:176:3)
    at SubscriptionObserver2.error (module.js:229:5)
    at asyncMap.ts:45:28

The underlying error returned by the server is the requested element is null which the schema does not allow.

The problem seems to only happen in Chrome, not Firefox.


I've tried recording with replay, but I've failed to get recordings using the chromium backend. If needed, I'll try harder.

Link to Reproduction

N/A

Reproduction Steps

No response

@apollo/client version

3.9.5

@jerelmiller
Copy link
Member

Hey @andreimatei 👋

I'm going to close this in favor of #11639 since this looks like a duplicate 🙂

@jerelmiller jerelmiller closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Copy link
Contributor

github-actions bot commented Apr 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants