# \`value.toString\` is not a function issue

**URL:** <https://community.apollographql.com/t/value-tostring-is-not-a-function-issue/7992>\
**Category:** General\
**Tags:** client, web\
**Created:** [December 10, 2024, 11:02pm UTC](https://community.apollographql.com/t/value-tostring-is-not-a-function-issue/7992 "2024-12-10T23:02:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerelmiller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jerelmiller/32/3314_2.png) [@jerelmiller](https://community.apollographql.com/u/jerelmiller)\
**Post date:** [December 10, 2024, 11:02pm UTC](https://community.apollographql.com/t/value-tostring-is-not-a-function-issue/7992/1 "2024-12-10T23:02:39Z")

</div>

Since December 5, we have received some [reports](https://community.apollographql.com/t/apolloerror-value-tostring-is-not-a-function/7972/13) from Apollo Client users encountering an ApolloError with the message: `value.toString is not a function.`

After thorough investigation, we determined that this issue is not caused by Apollo Client but stems from a bug in certain Kaspersky products. Specifically, this bug interferes with Apollo Client’s functionality when users visit websites utilizing Apollo Client versions older than 3.11.8.

We have informed Kaspersky of this issue, and they are actively investigating. However, at this time, the affected version of Kaspersky’s software is still being shipped.

# How This May Impact You

If an end user has Kaspersky installed on their computer, they may experience the above error when visiting a website if the UI was built using Apollo Client, creating the false impression of a bug in Apollo Client. This can disrupt user experiences and lead to confusion among developers and end-users.

# Recommended Action

To prevent this issue, we strongly recommend any of the following options:

1. Upgrading your Apollo Client to version 3.11.8 or later. This version includes adjustments that mitigate the impact of the Kaspersky bug.
2. Locally backporting the changes made in 3.11.8 using [patch-package](https://www.npmjs.com/package/patch-package). Here is an example patch for Apollo Client 3.7.17: [@apollo+client+3.7.17.patch](https://gist.github.com/bignimbus/738b6f9cffb9a4e1e4c96d03954d3f85)
3. By providing a custom fetch function to HttpLink that replaces the headers before they hit the Kaspersky extension.

```ts
new ApolloClient({
  cache: new InMemoryCache({
  /*...*/
  }),
  link: new HttpLink({
    uri: "...",
    fetch: (input, init) => {
      if (!init || !init.headers) {
        return fetch(input, init);
      }
      return fetch(input, {
        ...init,
        headers: { ...headers },
      });
    },
  }),
});

```

Any of these mitigation techniques will help ensure a seamless experience for end users while Kaspersky works on resolving the issue.

We are closely monitoring this situation and will provide updates to this post as Kaspersky makes progress on resolving the bug. In the meantime, if you experience any related issues after upgrading to Apollo Client 3.11.8 or later, please don’t hesitate to [open an issue](https://github.com/apollographql/apollo-client/issues/new) in our GitHub repo.

---

<div class="post-metadata">

**Author:** ![JeffAuriemma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jeffauriemma/32/2845_2.png) [@JeffAuriemma](https://community.apollographql.com/u/JeffAuriemma)\
**Post date:** [December 18, 2024, 7:24pm UTC](https://community.apollographql.com/t/value-tostring-is-not-a-function-issue/7992/2 "2024-12-18T19:24:40Z")

</div>

Status update: a Kaspersky team member indicated [in this forum post](https://forum.kaspersky.com/topic/kaspersky-is-breaking-apolloclient-requestsgraphql-52752/#findComment-197381) that a fix in their software is on its way in a release slated for late January / early February 2025.

---

<div class="post-metadata">

**Author:** ![JeffAuriemma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jeffauriemma/32/2845_2.png) [@JeffAuriemma](https://community.apollographql.com/u/JeffAuriemma)\
**Post date:** [February 4, 2025, 6:15pm UTC](https://community.apollographql.com/t/value-tostring-is-not-a-function-issue/7992/3 "2025-02-04T18:15:54Z")

</div>

Shipped: in [this forum post](https://forum.kaspersky.com/topic/kaspersky-is-breaking-apolloclient-requestsgraphql-52752/?page=2), Kaspersky indicated that the patch was released.
