# CanisterError: "ic0\_call\_new" cannot be executed in non replicated query mode

**URL:** <https://forum.dfinity.org/t/canistererror-ic0-call-new-cannot-be-executed-in-non-replicated-query-mode/22483>\
**Category:** Rust\
**Tags:** Discussing\
**Created:** [August 31, 2023, 10:09pm UTC](https://forum.dfinity.org/t/canistererror-ic0-call-new-cannot-be-executed-in-non-replicated-query-mode/22483 "2023-08-31T22:09:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wonder0729](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Wonder0729](https://forum.dfinity.org/u/Wonder0729)\
**Post date:** [August 31, 2023, 10:09pm UTC](https://forum.dfinity.org/t/canistererror-ic0-call-new-cannot-be-executed-in-non-replicated-query-mode/22483/1 "2023-08-31T22:09:17Z")

</div>

Hi, @hpeebles. I got some error when deploying project on the internet computer.

```auto
Uncaught (in promise) Error: Call failed:
  Canister: on724-jqaaa-aaaap-abjbq-cai
  Method: get_posts_by_category (query)
  "Status": "rejected"
  "Code": "CanisterError"
  "Message": "IC0504: Canister on724-jqaaa-aaaap-abjbq-cai violated contract: \"ic0_call_new\" cannot be executed in non replicated query mode"
    at 3171-9e1554add3832ea9.js:16:4497
    at async m (8566-436911c062079394.js:1:10817)
    at async E (32-13d39f95f56180a6.js:1:5788)

```

I think this is because I use inter-canister call, but it works fine on local IC.  
I set environment like this in dfx.json

```auto
  "networks": {
    "local": {
      "bind": "127.0.0.1:8080",
      "type": "ephemeral",
      "replica": {
        "subnet_type": "system"
      }
    },
    "ic": {
      "providers": ["https://ic0.app/"],
      "type": "persistent"
    },
    "ic_test": {
      "providers": ["https://ic0.app/"],
      "type": "persistent"
    },
    "web_test": {
      "providers": ["https://ic0.app/"],
      "type": "persistent"
    }
  },

```

Need to configure anything else when deploying to mainnet?

Hope to your answer.

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [August 31, 2023, 11:42pm UTC](https://forum.dfinity.org/t/canistererror-ic0-call-new-cannot-be-executed-in-non-replicated-query-mode/22483/2 "2023-08-31T23:42:30Z")

</div>

It looks like you’re trying to do a cross\_canister call from a query method. Have you marked your method as a composite query?

The problem you might be having in production is attempting to do a cross\_canister call across subnets, which as far as I know is not currently supported. Just an idea.

---

<div class="post-metadata">

**Author:** ![Wonder0729](https://avatars.discourse-cdn.com/v4/letter/w/90ced4/32.png) [@Wonder0729](https://forum.dfinity.org/u/Wonder0729)\
**Post date:** [September 1, 2023, 12:54am UTC](https://forum.dfinity.org/t/canistererror-ic0-call-new-cannot-be-executed-in-non-replicated-query-mode/22483/3 "2023-09-01T00:54:30Z")

</div>

Thanks for your response.

How do I get information from other canisters in query method?  
Should I replace the query with update?  
But, the update method burns many cycles.

Can you give me any solution for that?
